[python-win32] incorrect timezone on Windows XP

2009-01-11 Thread TK Soh
Greeting! I am using ActivePython 2.5 on Windows XP SP2 in timezone GMT+0800. Somehow the time.localtime() always gives a timezone value of zero, and same thing on time.timezone. Appreciate if anyone can tell me what I'm missing. TIA. ___ python-win32 m

Re: [python-win32] killing overlay extensions

2008-07-08 Thread TK Soh
On Tue, Jul 8, 2008 at 7:29 AM, Mark Hammond <[EMAIL PROTECTED]> wrote: > >> The debugging trace suggests that IsMemberOf are called after >> GetOverlayInfo, which itself is called when Explorer starts up. > > That is correct - GetOverlayInfo is called just once per process IIUC. > Having this fun

Re: [python-win32] killing overlay extensions

2008-07-08 Thread TK Soh
viously wouldn't help on > things like svn/hg which have to stat around a bit and look at their context > to establish applicability. That's true. > Tk Soh - do you find, even if the IsMemberOf does nothing > but return its "No" value, that Explorer still slows

Re: [python-win32] killing overlay extensions

2008-07-08 Thread TK Soh
On Tue, Jul 8, 2008 at 7:08 AM, Mark Hammond <[EMAIL PROTECTED]> wrote: >> I am trying to provide a way for user to [totally] disable the overlay >> extension, and enable them later if they want, without having to go >> through the pain to remove the shell extension from windows registry. > > Why i

Re: [python-win32] killing overlay extensions

2008-07-07 Thread TK Soh
On Mon, Jul 7, 2008 at 11:03 AM, Tim Golden <[EMAIL PROTECTED]> wrote: > TK Soh wrote: >> >> I'd like to know what's the 'proper' way to stop a pythonwin's overlay >> shell extension from kicking in. I've not been able find much &g

Re: [python-win32] killing overlay extensions

2008-07-07 Thread TK Soh
On Mon, Jul 7, 2008 at 7:14 AM, Mark Hammond <[EMAIL PROTECTED]> wrote: >> I'd like to know what's the 'proper' way to stop a pythonwin's overlay >> shell extension from kicking in. I've not been able find much >> documentation on this, particularly the return values of >> GetOverlayInfo() function

[python-win32] killing overlay extensions

2008-07-05 Thread TK Soh
I'd like to know what's the 'proper' way to stop a pythonwin's overlay shell extension from kicking in. I've not been able find much documentation on this, particularly the return values of GetOverlayInfo() function. Based on sample that I've found, the GetOverlayInfo() function returns a tuple of

[python-win32] shelve data corruption

2008-03-05 Thread TK Soh
I ran into strange problem with my program that uses the shelve module to maintain program settings, which later turned out to be caused by the corrupted shelve data. It looks like the shelve module itself is not capable of detecting the data corruption. I wonder if there's anything we can do to ad

[python-win32] context menu extension get called twice

2008-02-25 Thread TK Soh
I'm having some problem with my Explorer context menu extension. I have registered the extension to the following registry: (_winreg.HKEY_CLASSES_ROOT, r"Directory\Background\shellex\ContextMenuHandlers\TortoiseHg"), (_winreg.HKEY_CLASSES_ROOT, r"Directory\shellex\ContextMenuHandle

[python-win32] gc does not free memory

2008-02-17 Thread TK Soh
I am trying to understand Python's garbage collection mechanism. I have a long running program (actually a shell extension) that needs to allocate large arrays occasionally, which I'd del after use, then call gc.collect() to collect them. But although gc.get_objects() reported the arrays have been

Re: [python-win32] shell.SHChangeNotify failed to refresh icons

2008-02-15 Thread TK Soh
On Thu, Feb 14, 2008 at 11:56 PM, TK Soh <[EMAIL PROTECTED]> wrote: > On Thu, Feb 14, 2008 at 10:55 PM, Mark Hammond > <[EMAIL PROTECTED]> wrote: > > MSDN documents that " For performance reasons, multiple notifications may > > be combined into a single no

Re: [python-win32] shell.SHChangeNotify failed to refresh icons

2008-02-14 Thread TK Soh
On Thu, Feb 14, 2008 at 10:55 PM, Mark Hammond <[EMAIL PROTECTED]> wrote: > MSDN documents that " For performance reasons, multiple notifications may > be combined into a single notification. For example, if a large number of > SHCNE_UPDATEITEM notifications are generated for files in the same f

[python-win32] shell.SHChangeNotify failed to refresh icons

2008-02-14 Thread TK Soh
I have noticed quite frequently that shell.SHChangeNotify does not trigger the refreshing of icons on Explorer windows. This happens mostly when relative large number of shell.SHChangeNotify() calls are made on files residing in the same folder. I am using pythonwin b210.5 (special test build by Ma

Re: [python-win32] overlay icons handler freezes file dialog

2008-01-15 Thread TK Soh
On Jan 15, 2008 9:50 AM, TK Soh <[EMAIL PROTECTED]> wrote: > > On Jan 15, 2008 9:29 AM, Mark Hammond <[EMAIL PROTECTED]> wrote: > > > I wonder if anyone can provide some clue or pointer on how I can > > > resolve this issue. > > > > The best way wou

Re: [python-win32] overlay icons handler freezes file dialog

2008-01-15 Thread TK Soh
On Jan 15, 2008 9:29 AM, Mark Hammond <[EMAIL PROTECTED]> wrote: > > I wonder if anyone can provide some clue or pointer on how I can > > resolve this issue. > > The best way would be to create an example which reproduces your problem. > Its likely that I would be able to simply locate the source o

[python-win32] overlay icons handler freezes file dialog

2008-01-15 Thread TK Soh
Greeting. I have a shell extension that provide the overlay icons on Explorer, using pythonwin bundled with ActivePython 2.5.1.1. However, when it extension is installed, it causes the win32gui.GetSaveFileNameW file dialog to freeze. During the investigation, I noticed that by returning None from

[python-win32] release status of pythonwin build 212

2007-12-01 Thread TK Soh
Just wondering if there's any update on the release of pythonwin build 212 installer. Any news? ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] win32tracutil traceback on Vista

2007-11-19 Thread TK Soh
On Nov 19, 2007 12:28 PM, Mark Hammond <[EMAIL PROTECTED]> wrote: > I'm afraid I can't suggest a work-around (other than the obvious "catch the > AttributeError"), but would be happy to look at a patch that adds such an > attribute. Unfortunately I don't currently meet the minimum requirement to

Re: [python-win32] win32tracutil traceback on Vista

2007-11-19 Thread TK Soh
On Nov 19, 2007 10:31 AM, Mark Hammond <[EMAIL PROTECTED]> wrote: > Yes - a user running without elevated credentials can't create objects in > the "Global\\" namespace under Vista - which is exactly what win32trace > tries to do. This has been fixed in CVS, and I really hope to get a new > build

Re: [python-win32] win32tracutil traceback on Vista

2007-11-19 Thread TK Soh
On Nov 19, 2007 7:56 PM, Mark Hammond <[EMAIL PROTECTED]> wrote: > > While we are here, is it possible to add a 'closed' attribute to > > win32trace also, as I mention in an earlier post to the list? > > Sure - although I'm afraid your earlier post has been lost (by me). > Adding a patch to the pyw

Re: [python-win32] win32tracutil traceback on Vista

2007-11-19 Thread TK Soh
On Nov 19, 2007 7:49 PM, TK Soh <[EMAIL PROTECTED]> wrote: > On Nov 19, 2007 10:31 AM, Mark Hammond <[EMAIL PROTECTED]> wrote: > > Yes - a user running without elevated credentials can't create objects in > > the "Global\\" namespace under Vista - which

[python-win32] win32tracutil traceback on Vista

2007-11-18 Thread TK Soh
On Vista, win32tracutil traceback with a "pywintypes.error": >>> import win32traceutil Traceback (most recent call last): File "", line 1, in File "C:\Python25\Lib\site-packages\win32\lib\win32traceutil.py", line 53, in SetupForPrint() File "C:\Python25\Lib\site-packages\win32\lib\win3

[python-win32] COM server support on Vista

2007-11-05 Thread TK Soh
I was wondering if the COM server support in pythonwin works the same way on Vista. I was informed that the Explorer shell extension I wrote on XP does not function when installed on Vista. Just want to find if there's any known bug on Vista. Thanks. ___

Re: [python-win32] sys.stdout.closed missing with win32trace

2007-11-04 Thread TK Soh
On 11/4/07, Michael Foord <[EMAIL PROTECTED]> wrote: > TK Soh wrote: > > It looks like the "closed" attribute for sys.stderr and sys.stdout are > > missing when win32trace is in effect. Any way to work around this? > > > > I have no idea about win32t

[python-win32] sys.stdout.closed missing with win32trace

2007-11-03 Thread TK Soh
It looks like the "closed" attribute for sys.stderr and sys.stdout are missing when win32trace is in effect. Any way to work around this? python script: -- import win32traceutil import sys if not sys.stdout.closed: print "stdout is opened" -- Tr

Re: [python-win32] polling with os.popen3

2007-07-08 Thread TK Soh
On 6/30/07, Tim Roberts <[EMAIL PROTECTED]> wrote: > TK Soh wrote: > > On 6/29/07, Tim Roberts <[EMAIL PROTECTED]> wrote: > >> TK Soh wrote: > >> > I'm trying to use os.popen3 to replace subprocess.Popen for python 2.3 > >> > compa

Re: [python-win32] polling with os.popen3

2007-06-29 Thread TK Soh
On 6/29/07, Tim Roberts <[EMAIL PROTECTED]> wrote: > TK Soh wrote: > > I'm trying to use os.popen3 to replace subprocess.Popen for python 2.3 > > compatibility. According to the document, os.Popen3 class is not > > supported on Win32, so I can't poll() the pipe

[python-win32] polling with os.popen3

2007-06-28 Thread TK Soh
I'm trying to use os.popen3 to replace subprocess.Popen for python 2.3 compatibility. According to the document, os.Popen3 class is not supported on Win32, so I can't poll() the pipe. I wonder how I can check if the process open by os.popen3 is still running. Thanks in advance for any advice or poi

[python-win32] path to py2exe-generated package

2007-06-07 Thread TK Soh
My program uses some custom icons and data that are locate in a subdir within the program root. However, when executing the package created by py2exe, the program was not able to access these icons and data through relative paths. Any advice on how to handle this would be greatly appreciated. Thank

Re: [python-win32] shell extension property sheet

2007-05-29 Thread TK Soh
On 5/27/07, Mark Hammond <[EMAIL PROTECTED]> wrote: > > On 5/27/07, Mark Hammond <[EMAIL PROTECTED]> wrote: > > > > I'm try to add a property sheet to my shell extension project, but > > > > found that pywin32 doesn't support it. What's the best > > thing I can do, > > > > other than hoping it will

Re: [python-win32] shell extension property sheet

2007-05-27 Thread TK Soh
On 5/27/07, Mark Hammond <[EMAIL PROTECTED]> wrote: > > I'm try to add a property sheet to my shell extension project, but > > found that pywin32 doesn't support it. What's the best thing I can do, > > other than hoping it will supportef pywin32 soon? I'm using pywin32 > > bundled with ActivePython

[python-win32] shell extension property sheet

2007-05-26 Thread TK Soh
I'm try to add a property sheet to my shell extension project, but found that pywin32 doesn't support it. What's the best thing I can do, other than hoping it will supportef pywin32 soon? I'm using pywin32 bundled with ActivePython 2.4. ___ Python-win32 m

Re: [python-win32] HookMessage fails

2007-05-24 Thread TK Soh
On 5/23/07, Mark Hammond <[EMAIL PROTECTED]> wrote: > I think the problem is likely related to the "main frame" issue quoted below. > I suggest you debug what the app's "main frame" is at any given point in > time, and confirming the value is still appropriate. I tried putting this statement in th

Re: [python-win32] Python Programmming on win32 - the book

2007-05-23 Thread TK Soh
On 5/23/07, Mark Hammond <[EMAIL PROTECTED]> wrote: > > Will this book continue to be relevant for a number of years to come? > > > > Are there any plans for a 2nd Edition in the next 6 months or so? > > I'm afraid that I've been messing poor John around for many months now. I'd > like to think a

Re: [python-win32] HookMessage fails

2007-05-23 Thread TK Soh
On 5/23/07, Mark Hammond <[EMAIL PROTECTED]> wrote: > I think the problem is likely related to the "main frame" issue quoted below. > I suggest you debug what the app's "main frame" is at any given point in > time, and confirming the value is still appropriate. Being new to pywin32, I'm not sur

Re: [python-win32] HookMessage fails

2007-05-23 Thread TK Soh
On 5/15/07, Mark Hammond <[EMAIL PROTECTED]> wrote: > > > This is the magic of MFC - if no parent is specified, the > > "main window" for > > > the application is automatically used. > > > > > > > Isn't that the issue, then? He's writing a dialog to plug in to > > Explorer, and every time he runs,

Re: [python-win32] error on shell.SHChangeNotify

2007-05-23 Thread TK Soh
On 5/22/07, Roger Upole <[EMAIL PROTECTED]> wrote: > Try a newer build of pywin32. There was a bug in some older versions > regarding how the function determined whether it needed a file path > or an id list. BTW, any idea which versions of pywin32 have the bug, or which version has the fix? Just

Re: [python-win32] error on shell.SHChangeNotify

2007-05-22 Thread TK Soh
On 5/22/07, Roger Upole <[EMAIL PROTECTED]> wrote: > Try a newer build of pywin32. There was a bug in some older versions > regarding how the function determined whether it needed a file path > or an id list. Thanks. Actually I'm using the win32 extension bundled with ActivePython, so I'd like to

[python-win32] [Python-Win32] error on shell.SHChangeNotify

2007-05-21 Thread TK Soh
I am trying to use SHChangeNotify to refresh the icon on the explorer windows in the following script, but got an error: -- import sys from win32com.shell import shell, shellcon def notify(f): shell.SHChangeNotify(shellcon.SHCNE_UPDATEITEM,

Re: [python-win32] HookMessage fails

2007-05-15 Thread TK Soh
On 5/15/07, Tim Roberts <[EMAIL PROTECTED]> wrote: > TK Soh wrote: > > > > Thanks for the info, but I'm not sure about Platform SDK. I started > > doing this windows thing directly with python32. > > > > The HookMessage is called in OnInitDialog(),

Re: [python-win32] HookMessage fails

2007-05-15 Thread TK Soh
On 5/15/07, Tim Roberts <[EMAIL PROTECTED]> wrote: > TK Soh wrote: > > The hooks are working, so I guess PYWIN_WITH_WINDOWPROC support has > > indeed been compiled into ActivePython. The only problem now is the > > strange behavior when sometime the hooks don't get

Re: [python-win32] HookMessage fails

2007-05-15 Thread TK Soh
On 5/15/07, Niki Spahiev <[EMAIL PROTECTED]> wrote: > >> In order to hook more messages (e.g. WM_SIZE) you must recompile pywin32 > >> with PYWIN_WITH_WINDOWPROC defined > > > > I'm confused. The hooks appeared to work fine, though only in the > > dialog opened from the specific explorer window as

Re: [python-win32] HookMessage fails

2007-05-15 Thread TK Soh
On 5/15/07, Niki Spahiev <[EMAIL PROTECTED]> wrote: > TK Soh wrote: > > Greeting. > > > > I built a custom dialog which would be resized by a handler connected > > with HookMessage() to win32con.WM_SIZE. The dialogs are actually > > called from the shell ex

[python-win32] HookMessage fails

2007-05-14 Thread TK Soh
Greeting. I built a custom dialog which would be resized by a handler connected with HookMessage() to win32con.WM_SIZE. The dialogs are actually called from the shell extension's context menu. Every seemed to work well at first. The I noticed the resize handler is only called on the dialogs that