Re: [python-win32] writing DWORD values > 0x7ffffff

2012-03-26 Thread Scott Leerssen
On Mar 26, 2012, at 3:20 PM, Tim Roberts wrote: > Scott Leerssen wrote: >> I'm trying to write a DWORD value to the registry using _winreg.SetValueEx >> and anything greater than 0x7fff yields a "ValueError: Could not convert >> the data to the specifie

Re: [python-win32] writing DWORD values > 0x7ffffff

2012-03-26 Thread Scott Leerssen
On Mar 26, 2012, at 3:20 PM, Tim Roberts wrote: > Scott Leerssen wrote: >> I'm trying to write a DWORD value to the registry using _winreg.SetValueEx >> and anything greater than 0x7fff yields a "ValueError: Could not convert >> the data to the specifie

[python-win32] writing DWORD values > 0x7ffffff

2012-03-26 Thread Scott Leerssen
I'm trying to write a DWORD value to the registry using _winreg.SetValueEx and anything greater than 0x7fff yields a "ValueError: Could not convert the data to the specified type." I've seen a few posts saying that taking the complement of the large integer (basically making it a negative v

Re: [python-win32] win32file.CreateFile versus win32file.CreateFileW

2012-02-07 Thread Scott Leerssen
On Feb 7, 2012, at 5:36 PM, Mark Hammond wrote: > Re-added python-win32 - please follow-up there. > > On 8/02/2012 1:06 AM, Scott Leerssen wrote: >> Thanks Mark. You wouldn't happen to know the encoding of the 8.3 >> filename, would you? I'm having a heck of a

Re: [python-win32] win32file.CreateFile versus win32file.CreateFileW

2012-02-06 Thread Scott Leerssen
On Feb 6, 2012, at 11:03 AM, Amaury Forgeot d'Arc wrote: > 2012/2/6 Scott Leerssen > I'm trying to open files with names that contain Japanese characters, and > found that win32file.CreateFile would raise an exception indicating that 'The > filename, directory name

[python-win32] win32file.CreateFile versus win32file.CreateFileW

2012-02-06 Thread Scott Leerssen
I'm trying to open files with names that contain Japanese characters, and found that win32file.CreateFile would raise an exception indicating that 'The filename, directory name, or volume label syntax is incorrect'. I found win32file.CreateFileW (documented to deal with 'unicode'), and that did

Re: [python-win32] file descriptor issues using msvcrt.open_osfhandle()+os.fdopen()

2011-12-19 Thread Scott Leerssen
On Dec 19, 2011, at 7:38 PM, Amaury Forgeot d'Arc wrote: > 2011/12/19 Scott Leerssen > >>> I just tried that, and after closing the file object and attempting to > >>> call win32api.ClosHandle() on the value returned by detach, I get an > >>>

Re: [python-win32] file descriptor issues using msvcrt.open_osfhandle()+os.fdopen()

2011-12-19 Thread Scott Leerssen
adding python-win32 to the rest of the thread... I missed a reply-all in here somewhere... On Dec 19, 2011, at 5:06 PM, Scott Leerssen wrote: > > On Dec 19, 2011, at 5:01 PM, Mark Hammond wrote: > >> Note you are also closing h. But more generally, I wouldn't be at all

Re: [python-win32] file descriptor issues using msvcrt.open_osfhandle()+os.fdopen()

2011-12-19 Thread Scott Leerssen
On Dec 19, 2011, at 4:32 PM, Mark Hammond wrote: > On 18/12/2011 4:34 AM, Scott Leerssen wrote: >> >> On Dec 17, 2011, at 12:25 PM, Amaury Forgeot d'Arc wrote: >> >>> 2011/12/17 Scott Leerssen >> <mailto:sleers...@gmail.com>> >>> >

Re: [python-win32] file descriptor issues using msvcrt.open_osfhandle()+os.fdopen()

2011-12-17 Thread Scott Leerssen
On Dec 17, 2011, at 12:25 PM, Amaury Forgeot d'Arc wrote: > 2011/12/17 Scott Leerssen > I did see that, but I interpreted that to mean that the PyHANDLE would be > dereferenced from the underlying Windows file handle, > > It's the other way round: the PyHandle just

Re: [python-win32] file descriptor issues using msvcrt.open_osfhandle()+os.fdopen()

2011-12-17 Thread Scott Leerssen
On Dec 17, 2011, at 11:36 AM, Amaury Forgeot d'Arc wrote: > 2011/12/17 Scott Leerssen > Closing the PyHANDLE leaves the file object with an invalid descriptor, and > closing the file object leaves the PyHANDLE with an invalid descriptor, but > only sometimes > > Afte

[python-win32] file descriptor issues using msvcrt.open_osfhandle()+os.fdopen()

2011-12-17 Thread Scott Leerssen
, I'm no more sure that I've found a problem with the underlying classes that manage descriptors on Windows than I've just replaced my own bad code with other not-as-bad code, but I hope that this rings a bell for someone that can set me straight. Thanks, Scott Leerssen __