[python-win32] makepy.py "Some COM library"

Steven Manross steven at manross.net
Tue May 30 13:44:28 EDT 2023


Command I ran:

C:\Python311\Lib\site-packages\win32com\client>python makepy.py "ADODB.Connection.6.0"

Output:
Generating to C:\Users\someuser\AppData\Local\Temp\13\gen_py\3.11\B691E011-1797-432E-907A-4D8C69339129x0x6x1.py
Building definitions from type library...
Generating...
Importing module

---

I am running the command above, and if I do this, my Classic ASP does not see the resulting B691E011-1797-432E-907A-4D8C69339129x0x6x1.py file because it saved the file in the user temp directory as opposed to in the site-packages directory structure.


  *   When I installed Python, I told it to install the application for "All Users" (Default Directory = C:\Program Files\Python311 -- but I removed the Program Files portion for the installation)

Is there some way to make it save the file in the correct place for the python installation from the command line so I don't have to move the files it generates?

Keep in mind that the files it generates seems to live in a 3.11 directory, but python seems to want it in:

C:\Python311\Lib\site-packages\win32com\gen_py\B691E011-1797-432E-907A-4D8C69339129x0x6x1.py
C:\Python311\Lib\site-packages\win32com\gen_py\dicts.dat
C:\Python311\Lib\site-packages\win32com\gen_py\__init__.py

I saw the -o parameter in the makepy.py script but if I use that, it doesn't seem to build the dicts.dat or __init__.py files - which already exist (is that a problem?).

Please and thank you for any comments,
Steven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/python-win32/attachments/20230530/30a48ae1/attachment.html>


More information about the python-win32 mailing list