D33wakar 36 Posting Whiz in Training

I was using winsound module for the first time to use it on one of my small app,and it didn't even gave me a BEEP!.

I imported winsound module first.

>>> import winsound
>>>

then

winsound.Beep(37,10)

leads to nothing!
Any kinda help is appreciated.

D33wakar 36 Posting Whiz in Training

Link are not working but look the where working on a skinning system with xml.
http://wiki.wxpython.org/TG.Skinning
Media player use a xml skinning system i think.
Did find it here,but dont look like much have happend i last 4 years.
http://techgame.net/projects/Framework/wiki/SkinningFramework

We could make this a post where we share idèe how to get wxpython to look fancy and modern.
I think we are many that like wxpython and want it to look good.

Here are a link for a fancy window.
http://hasenj.wordpress.com/2009/04/14/making-a-fancy-window-in-wxpython/

Mores style tips are welcome.......


It should be possible i think.


Here is my alarmclock made for fun,where i testet out diffrent style with wxpython.
Use transparent png images ang png image buttons.

how bout window having circular or oval or any random shape.Is that possible?Is the idea practical ?

D33wakar 36 Posting Whiz in Training

Can anyone provide information on available gui c toolkits?

D33wakar 36 Posting Whiz in Training

here is my setup file

from distutils.core import setup
import py2exe
import sys
if len(sys.argv) == 1:
    sys.argv.append("py2exe")

setup( options = {"py2exe": {"compressed":1, "optimize": 2, "ascii":1,"includes": ["Tkinter"], "bundle_files": 3}},
       zipfile = None,
       
       
       windows = [{"script": "C:\\Python27\\ask.py"}])
D33wakar 36 Posting Whiz in Training

Insert the full path to the script instead of just the 'ask.py'.

Cheers and Happy coding

i really appreciated ur reply but still didn't work for me ,though displayed some more lines of processing.... still stuck with

Traceback (most recent call last):
  File "C:\Python27\setup.py", line 14, in <module>
    windows = [{"script": "C:\\Python27\\ask.py"}])
  File "C:\Python27\lib\distutils\core.py", line 169, in setup
    raise SystemExit, "error: " + str(msg)
SystemExit: error: command 'C:\Python27\pythonw.exe' failed with exit status 1

my program script is:

'C:/Python 27/python.exe'
from Tkinter import *
import tkCommonDialog
import Dialog
import tkMessageBox,tkFileDialog
import zipfile

var=bool

class Application(Frame):
    def __init__(self,master=None):
        Frame.__init__(self,master)
        self.grid()
        
        
        self.createWidgets()
        
        
    def confirm(self):
        class my_msg(Frame):
            def __init__(self,master=Application):
                Frame.__init__(self,master)
                
                self.pack(expand=False)
                self.createmsg()
            def createmsg(self):
                self.mssg=Label(self,text="Do you really want to exit?")
                self.mssg.grid(column=2,row=4)
                self.yesbutton=Button(self,text='Yes',relief='raised',command=self.kill)
                self.yesbutton.grid(column=2,row=6,sticky=S+E)
                self.nobutton=Button(self,text='No',relief='raised',command=root.destroy)
                self.nobutton.grid(column=3,row=6,sticky=N+W)
                
            def kill(self):
                root.destroy()
                app.master.destroy()
        root=Tk()
        msg1=my_msg(master=root)
        msg1.master.resizable(False,False)
        msg1.mainloop() 
        

    def createWidgets(self):
        
        self.quitButton = Button (self,text = 'Quit',activeforeground = 'red',
                                  relief = 'raised' )
        if var==True:
            self.quitButton["command"]=msg1.destroy()
        else:
            self.quitButton["command"]=self.confirm
        self.quitButton.grid()
        self._openf =Button(self,text ='extract file',relief = 'groove',command=self.openf)
        self._openf.grid()
       
    def openf(self):
        e=tkFileDialog.askopenfilename(title='extract file',defaultextension="zip,(.zip)",filetypes=[("ZIP COMPRESSED FILES",".zip")])
        
        
        f=zipfile.ZipFile(e)
        j=tkFileDialog.asksaveasfile(title='extract to:')
        f.extractall(j)
        
      
        
       
       
        
root = Tk()
app=Application(master=root)
app.master.title("The Zip EXtractor")
app.mainloop()

i just wanted to make my program executable on windows without python installed in it.

D33wakar 36 Posting Whiz in Training
from distutils.core import setup
import py2exe
import sys

if len(sys.argv) == 1:
    sys.argv.append("py2exe")

setup( options = {"py2exe": {"compressed": 1, "optimize": 2, "ascii": 1, "bundle_files": 3}},
       zipfile = None,
       
       ##data_files = ['apple.jpg', 'cheese.jpg'],
       
       #Can use windows or console,replace my_file.py with py file you want to make exe off.
       #If not run in same folder give path /mydir/my_file.py
       windows = [{"script": 'my_file.py'}])

Or use gui2exe

I was searching solution for py2exe problem(the exe file didn't work for my simple gui program using tkinter).then i found ur code.I tried it using python2.7 idle ,reaching bout halfway raised following error:

running py2exe
*** searching for required modules ***
*** parsing results ***
creating python loader for extension '_tkinter' (C:\Python27\DLLs\_tkinter.pyd -> _tkinter.pyd)
creating python loader for extension '_ctypes' (C:\Python27\DLLs\_ctypes.pyd -> _ctypes.pyd)
creating python loader for extension 'select' (C:\Python27\DLLs\select.pyd -> select.pyd)
creating python loader for extension 'bz2' (C:\Python27\DLLs\bz2.pyd -> bz2.pyd)
*** finding dlls needed ***
*** create binaries ***
*** byte compile python files ***
writing byte-compilation script 'c:\docume~1\deewakar\locals~1\temp\tmpwd7pdi.py'
C:\Python27\pythonw.exe -OO c:\docume~1\deewakar\locals~1\temp\tmpwd7pdi.py

Traceback (most recent call last):
  File "C:\Python27\setup.py", line 14, in <module>
    windows = [{"script": 'ask.py'}])
  File "C:\Python27\lib\distutils\core.py", line 169, in setup
    raise SystemExit, "error: " + str(msg)
SystemExit: error: command 'C:\Python27\pythonw.exe' failed with exit status 1

any suggestions on that!