Malte Skarupke schrieb: > OK so I got the following traceback: > > > > # Generating comtypes.gen._7858B9E0_5793_4BE4_9B53_661D922790D2_0_1_0 > # Generating comtypes.gen._00020430_0000_0000_C000_000000000046_0_2_0 > Traceback (most recent call last): [...] > ImportError: No module named _00020430_0000_0000_C000_000000000046_0_2_0 > > > > > In my effort to find out what is going on here, I added these lines to the > buggy method: > print "======================================" > print "_my_import(", fullname, ")" > print "comtypes.gen.__path__: ", comtypes.gen.__path__ > print "======================================" > > > > > And this is the output I got from that: > > > > > ====================================== > _my_import( comtypes.gen._7858B9E0_5793_4BE4_9B53_661D922790D2_0_1_0 ) > comtypes.gen.__path__: [u'C:\\Dokumente und > Einstellungen\\Mareike\\Anwendungsdaten\\Python\\Python25\\comtypes_cache'] > ====================================== > # Generating comtypes.gen._7858B9E0_5793_4BE4_9B53_661D922790D2_0_1_0 > ====================================== > _my_import( comtypes.gen._00020430_0000_0000_C000_000000000046_0_2_0 ) > comtypes.gen.__path__: [u'C:\\Dokumente und > Einstellungen\\Mareike\\Anwendungsdaten\\Python\\Python25\\comtypes_cache'] > ====================================== > # Generating comtypes.gen._00020430_0000_0000_C000_000000000046_0_2_0 > ====================================== > _my_import( comtypes.gen._00020430_0000_0000_C000_000000000046_0_2_0 ) > comtypes.gen.__path__: [u'C:\\Dokumente und > Einstellungen\\Mareike\\Anwendungsdaten\\Python\\Python25\\comtypes_cache'] > ====================================== > [... the same Traceback as above here...] > > > > > The folder, that comtypes.gen.__path__ is set to, contains two files: > _00020430_0000_0000_C000_000000000046_0_2_0.py and > _7858B9E0_5793_4BE4_9B53_661D922790D2_0_1_0.py. So most likely the > first two generates worked alright, and the third one now is buggy.
Hm, which 'third one'? > I'm pretty new to Python, but I believe there is probably just a > missing reference here somewhere, that prevents the program from > finding the generated modules. > > > > When I run the same code from the Python console, it works fine. When > I copy the files generated from the Python console (those in > C.\Python25\Lib\...\gen) to the same folder, that this comtypes is > in, (C:\Programme\...\entities\common\Lib\site-packages\comtypes\gen) > it works fine. When I copy the files generated from the Python > console to the folder that comtypes.gen.__path__ (from the last > output) is set to, it does not work. I do not understand your setup. Why is the 'console' generating files in the C.\Python25\Lib\...\gen folder, and why is it in the other case comtypes in C:\Programme\...\entities\common\Lib\site-packages\comtypes\gen ? Do you have two comtypes installations? In different folders? -- Thanks, Thomas ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users