Re: Pythoncom and pywintypes

2008-08-28 Thread Gabriel Genellina

En Wed, 27 Aug 2008 21:17:22 -0300, Vistro [EMAIL PROTECTED] escribi�:


Hey, there. I've been coding in python for about three weeks now. I have
made basic games, tools to check forum PMs for me, and other general
utilities with python, but I'm now encountering problems.

http://ubuntuforums.org/archive/index.php/t-511211.html

I want to do that, and I have installed both sets needed from source  
forge,

but I always get this issue when I run the code, and there isn't a single
listing on the internet that addresses this.



Traceback (most recent call last):
  File C:/Documents and Settings/Guest Editor/Desktop/key.py, line 3,  
in

module
import pythoncom
  File C:\Python25\lib\site-packages\pythoncom.py, line 2, in module
import pywintypes
ImportError: No module named pywintypes

I've installed pythoncom right from the box. I don't know whats wrong,  
but

I'm sure it has something to do with my stupidity.


Reinstalling the pywin32 package should fix that, I presume.


BUT, here is the strangest part.

# Magic utility that redirects to pythoncomxx.dll
import pywintypes
pywintypes.__import_pywin32_system_module__(pythoncom, globals())


That is ALL that pythoncom.py seems to be. ALL that.

I think that it's trying to import something, THEN tell the interpreter
where it is. That seems kinda stupid.


In fact that __import_whatever function does a rather complex task, it  
must ensure that the *right* pywintypes25.dll (or pythoncom25.dll) is  
loaded, even when it's implicitely loaded.


--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Re: Pythoncom and pywintypes

2008-08-28 Thread Vistro
A Reinstall seems to have done nothing...

On Thu, Aug 28, 2008 at 4:49 AM, Gabriel Genellina
[EMAIL PROTECTED]wrote:

 En Wed, 27 Aug 2008 21:17:22 -0300, Vistro [EMAIL PROTECTED] escribi�:

  Hey, there. I've been coding in python for about three weeks now. I have
 made basic games, tools to check forum PMs for me, and other general
 utilities with python, but I'm now encountering problems.

 http://ubuntuforums.org/archive/index.php/t-511211.html

 I want to do that, and I have installed both sets needed from source
 forge,
 but I always get this issue when I run the code, and there isn't a single
 listing on the internet that addresses this.

 

 Traceback (most recent call last):
  File C:/Documents and Settings/Guest Editor/Desktop/key.py, line 3, in
 module
import pythoncom
  File C:\Python25\lib\site-packages\pythoncom.py, line 2, in module
import pywintypes
 ImportError: No module named pywintypes

 I've installed pythoncom right from the box. I don't know whats wrong, but
 I'm sure it has something to do with my stupidity.


 Reinstalling the pywin32 package should fix that, I presume.

  BUT, here is the strangest part.

 # Magic utility that redirects to pythoncomxx.dll
 import pywintypes
 pywintypes.__import_pywin32_system_module__(pythoncom, globals())


 That is ALL that pythoncom.py seems to be. ALL that.

 I think that it's trying to import something, THEN tell the interpreter
 where it is. That seems kinda stupid.


 In fact that __import_whatever function does a rather complex task, it must
 ensure that the *right* pywintypes25.dll (or pythoncom25.dll) is loaded,
 even when it's implicitely loaded.

 --
 Gabriel Genellina

 --
 http://mail.python.org/mailman/listinfo/python-list
--
http://mail.python.org/mailman/listinfo/python-list

Pythoncom and pywintypes

2008-08-27 Thread Vistro
Hey, there. I've been coding in python for about three weeks now. I have
made basic games, tools to check forum PMs for me, and other general
utilities with python, but I'm now encountering problems.

http://ubuntuforums.org/archive/index.php/t-511211.html

I want to do that, and I have installed both sets needed from source forge,
but I always get this issue when I run the code, and there isn't a single
listing on the internet that addresses this.



Traceback (most recent call last):
  File C:/Documents and Settings/Guest Editor/Desktop/key.py, line 3, in
module
import pythoncom
  File C:\Python25\lib\site-packages\pythoncom.py, line 2, in module
import pywintypes
ImportError: No module named pywintypes

***

http://ubuntuforums.org/archive/index.php/t-511211.html With the code:

import winsound
import pyHook
import pythoncom

def funkytown(event): #Play Funky Town
if event.Key == 'Back':
winsound.Beep(38, 3000)
winsound.Beep(392, 100) #Frequency (Hz), Duration(ms)
winsound.Beep(38, 100)
winsound.Beep(392, 100)
winsound.Beep(38, 100)
winsound.Beep(349, 100)
winsound.Beep(38, 100)
winsound.Beep(392, 300)
winsound.Beep(38, 100)
winsound.Beep(294, 300)
winsound.Beep(38, 100)
winsound.Beep(294, 100)
winsound.Beep(38, 100)
winsound.Beep(392, 100)
winsound.Beep(38, 100)
winsound.Beep(523, 100)
winsound.Beep(38, 100)
winsound.Beep(494, 100)
winsound.Beep(38, 100)
winsound.Beep(392, 200)

hm = pyHook.HookManager()
hm.KeyDown = funkytown
hm.HookKeyboard()
pythoncom.PumpMessages()


I've installed pythoncom right from the box. I don't know whats wrong, but
I'm sure it has something to do with my stupidity.


BUT, here is the strangest part.

# Magic utility that redirects to pythoncomxx.dll
import pywintypes
pywintypes.__import_pywin32_system_module__(pythoncom, globals())


That is ALL that pythoncom.py seems to be. ALL that.

I think that it's trying to import something, THEN tell the interpreter
where it is. That seems kinda stupid.

Anyway, what have I done wrong, and how do I fix it?
--
http://mail.python.org/mailman/listinfo/python-list