So, I wrote a Python script that does some simple things. It originally started on a Unix server, but because of the crappy network security settings that TPTB refuse to change, we need to run it on a Windows server. However, the administrators of the mentioned Windows server refuse to do anything useful, for example, install Python.
What are my options for running a Python script on Windows without Python?
Consideration 1:
Something like Py2Exe - I found this after a quick google search, and that seems promising. From what I can say, it will generate a bunch of files, but we can just copy this directory to our Windows machine and it will be completely isolated and will not have any external dependencies. Does anyone know how well this works? Obviously, this depends on my Python script, but, fortunately, this script is pretty simple and only uses Python built-in libraries like urllib2 and urlparse.
Consideration 2:
We can assume that at least some version of the .NET Framework is installed on the Windows server, which makes IronPython think. I have never used this before, but I always wanted it. From what I can tell, it compiles Python code into CLS-compatible IL code that can be run natively under .NET runtime. However, this requires additional .NET libraries to be installed on the server? Can I just link these DLLs to my program? Or do I need to rewrite my Python script to call certain .NET Framework classes instead of using things like urllib2 or urlparse?
Thanks!
PS - The ironic part: I practically do not know Python, and I am a .NET expert, but I wrote a script in Python because I was told that it will work on a Unix server. If I knew that we would finish this on a Windows server, I would write it in C # to start in about 1/10 time. Failure.
source share