I know this is only tangentially related to ArcGIS, but I thought I'd give this a try and see if anyone could help. I need to edit a script/tool created by someone who no longer works at my organization. The tool has a simple GUI that staff use to "promote" a Geocortex site (which contains ArcGIS map services) from our dev server to our prod server. This basically just involves copying a folder. We need the tool because staff aren't given direct access to the prod server. My goal is to simply add the names of our new servers so users can select those.
The folder that contains all the tool's files does not have a .py file. It only has lots of .pyd and .pyc and .dll files, plus an .exe which is the GUI. I have no idea how the previous employee built it. Those files are not human readable or editable. Is there any way to edit any of it?
I noticed that the copysites.exe.log file contains text that refers to a file called copysites.py, but that does not exist in the folder or any of the subfolders.
Solved! Go to Solution.
Looks like he might have used QTCreator or QT Designer to make the GUI part - can you access his computer and see if QT has a recent file that points to a .UI extention?
Thank you! Turns out we were able to find a folder of his backup files, even though we can't access his "real" files, and there was a copy of the script files. It included a .py file that seems to be the basis for most of the rest of it, so I have been working on editing it. You were right, he used QT Designer, I discovered, and there were a couple of .ui files in the folder we found; your hints were helpful! Thanks!
Allen
pyd .... like
C:\install folder\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgisscripting\_arcgisscripting.pyd
which is one of the files when you import arcpy
As for pyc...
compiled - If Python is interpreted, what are .pyc files? - Stack Overflow
An interesting read and there are many links about pyc, pyd etc and whether you can decompile them etc.
In short... not really worth the try on the practical level.
They are compiled for a reason, one of them being to retain ownership of the code.
Thanks, Dan. That's good to know about the files being compiled for a reason - makes sense.
Allen
Looks like he might have used QTCreator or QT Designer to make the GUI part - can you access his computer and see if QT has a recent file that points to a .UI extention?
Thank you! Turns out we were able to find a folder of his backup files, even though we can't access his "real" files, and there was a copy of the script files. It included a .py file that seems to be the basis for most of the rest of it, so I have been working on editing it. You were right, he used QT Designer, I discovered, and there were a couple of .ui files in the folder we found; your hints were helpful! Thanks!
Allen