os.path.getmtime on windows, error: 206 - path or extension too long

2009-01-21 Thread mynthon
I have very long path on windows and i get error when try to get modification time. So i tried do chdir path and then get file. It now gives me error that file doesn't exists # code def getmtimeWIN32(p): mycwd = os.getcwd() if p.startswith('?\\'): p = p.replace('?\\', '',

Re: os.path.getmtime on windows, error: 206 - path or extension too long

2009-01-21 Thread mynthon
On Jan 21, 11:50 am, mynthon wrote: > I have very long path on windows and i get error when try to get > modification time. So i tried do chdir path and then get file. It now > gives me error that file doesn't exists > > # code > def getmtimeWIN32(p): >     mycw

Re: os.path.getmtime on windows, error: 206 - path or extension too long

2009-01-21 Thread mynthon
On Jan 21, 2:13 pm, mynthon wrote: > On Jan 21, 11:50 am, mynthon wrote: > > > > > I have very long path on windows and i get error when try to get > > modification time. So i tried do chdir path and then get file. It now > > gives me error that file doesn

Re: os.path.getmtime on windows, error: 206 - path or extension too long

2009-01-21 Thread mynthon
On Jan 21, 2:58 pm, mynthon wrote: > On Jan 21, 2:13 pm, mynthon wrote: > > > > > On Jan 21, 11:50 am, mynthon wrote: > > > > I have very long path on windows and i get error when try to get > > > modification time. So i tried do chdir path and then get

wxPython.button.disabled still catching clicks

2008-12-23 Thread mynthon
Hello! (sorry for my english) I have a problem with buttons in wxPython. When button is disabled (by .Disable() or .Enable(False)) it is grayed out but still receive clicks. Eg. i have button that disable itself, runs long action and enable itself: def onClick(self, evt): self.btn.Enable(Fal

Re: wxPython.button.disabled still catching clicks

2008-12-23 Thread mynthon
On Dec 23, 11:58 am, Aaron Brady wrote: > On Dec 23, 4:50 am, mynthon wrote: > > > > > Hello! (sorry for my english) > > > I have a problem with buttons in wxPython. When button is disabled > > (by .Disable() or .Enable(False)) it is grayed out but still rec

Re: wxPython.button.disabled still catching clicks

2008-12-30 Thread mynthon
On Dec 23, 6:12 pm, Mike Driscoll wrote: > On Dec 23, 7:27 am,mynthon wrote: > > > > > On Dec 23, 11:58 am, Aaron Brady wrote: > > > > On Dec 23, 4:50 am,mynthon wrote: > > > > > Hello! (sorry for my english) > > > > > I have

imp.load_source() - explanation needed

2009-04-01 Thread mynthon
Hi! I need help. I don't understand what doc says. I load module from path testmod/mytest.py using imp.load_source(). My code is import imp testmod = imp.load_source('koko', 'testmod/mytest.py) print testmod but i don't understand whatt is first (name) argument for. Docs says that "The name arg

logging module, SMTPHandler and gmail in python 2.6

2009-12-04 Thread mynthon
You cannot use gmail account for sending emails with logging module. It is because google requires TLS connection and logging module doesn't support it. To use gmail you have to extend logging.handlers.SMTPHandler class and override SMTPHandler.emit() method. Here is source code. (There really sho

Re: editor with autocompletion

2009-12-04 Thread mynthon
On 4 Gru, 13:37, Tim Chase wrote: > > So I want an editor with auto complete. > > I there any such tool in Python ?(not only in python any other) > > I want it for my new lang > > vim?  emacs?  or do you want the editor to be written in Python? > > -tkc Try ActiveState Komodo (or free version: Ko