[python-win32] Boolean type changed in Python 3.0?

2010-01-06 Thread Roger Upole
From looking at the source of PyCom_VariantFromPyObject in oleargs.cpp, the check for a boolean is done after the check for an int. PyLong_Check is used to determine if the object should be converted to one of the variant integer types. Apparently in Python 3.x, this now returns True for a boo

Re: [python-win32] Still looking for a method to get CPUID info ...

2010-01-06 Thread Gertjan Klein
Tim Roberts wrote: >In my opinion, you could have solved this all much quicker and easier >just by writing a trivial DLL. Out of pure curiousity (I used to write a lot of assembler, but those days are long gone) I tried your code, and it works as advertised -- on Python 2.6. It fails on Python 2.

Re: [python-win32] Still looking for a method to get CPUID info ...

2010-01-06 Thread Tim Roberts
Gertjan Klein wrote: > Out of pure curiousity (I used to write a lot of assembler, but those > days are long gone) I tried your code, and it works as advertised -- on > Python 2.6. It fails on Python 2.5 with "WindowsError: exception code > 0x20800", but oddly I've also seen error code 0x1020800. I

[python-win32] mapi.ATTACH_EMBEDDED_MSG

2010-01-06 Thread lduchesne
Hi, I'm tying to embed a mail message in another mail using the following code: [...] imsg = draftFolder.CreateMessage(None, 0) message = outboxFolder.CreateMessage(None, 0) attach = message.CreateAttach(None, 0) attach[1].SetProps([(mapitags.PR_ATTACH_METHOD, mapi.ATTACH_EMBEDDED_MSG),

[python-win32] HKLM\Software\Python\PythonCore\2.6\PythonPath - does it serve any purpose?

2010-01-06 Thread Paul Keating
What is the registry key HKLM\Software\Python\PythonCore\2.6\PythonPath for? The docs (http://www.python.org/doc/2.6/using/windows.html) say Modifying the module search path can also be done through the Windows registry: Edit HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\version\PythonPath bu

Re: [python-win32] HKLM\Software\Python\PythonCore\2.6\PythonPath - does it serve any purpose?

2010-01-06 Thread David Robinow
On Wed, Jan 6, 2010 at 2:39 PM, Paul Keating wrote: > What is the registry key HKLM\Software\Python\PythonCore\2.6\PythonPath for? > The docs (http://www.python.org/doc/2.6/using/windows.html) say > > Modifying the module search path can also be done through the Windows > registry: Edit > HKEY_LOC

Re: [python-win32] HKLM\Software\Python\PythonCore\2.6\PythonPath - does it serve any purpose?

2010-01-06 Thread David Robinow
On Wed, Jan 6, 2010 at 2:39 PM, Paul Keating wrote: > What is the registry key HKLM\Software\Python\PythonCore\2.6\PythonPath for? > The docs (http://www.python.org/doc/2.6/using/windows.html) say > > Modifying the module search path can also be done through the Windows > registry: Edit > HKEY_LOC

Re: [python-win32] mapi.ATTACH_EMBEDDED_MSG

2010-01-06 Thread Mark Hammond
On 7/01/2010 6:15 AM, lduchesne wrote: Hi, I'm tying to embed a mail message in another mail using the following code: [...] imsg = draftFolder.CreateMessage(None, 0) message = outboxFolder.CreateMessage(None, 0) attach = message.CreateAttach(None, 0) attach[1].SetProps([(mapitags.PR_ATTACH_M

[python-win32] Porting code from Python 2.x code to Python 3.x

2010-01-06 Thread Santosh Mohan
HI, I installed new version of Python 3.1. I tried to run my older programs, but I couldn't run. I had used "print" statements, in Newer version print statement syntax is changed. Python2.x >>>x=20 >>>print x >>> 20 Python 3.x >>>x=20 >>> print x File "", line 1 print x ^ Syntax

Re: [python-win32] Porting code from Python 2.x code to Python 3.x

2010-01-06 Thread Mario Alejandro Vilas Jerez
Try this script, it comes with your Python 3 installation: http://docs.python.org/library/2to3.html You may have to review the source code manually in non trivial cases, though. Regards, -Mario On Thu, Jan 7, 2010 at 2:40 AM, Santosh Mohan wrote: > HI, > > I installed new version of Python 3.