Python reading Oracle path
Question: On my desktop I have written a small Pylons app that connects to Oracle. I'm
now trying to deploy it to my server which is running Win2k3 x64. (My desktop
is 32-bit XP) The Oracle installation on the server is also 64-bit.

I was getting errors about loading the OCI dll, so I installed the 32 bit
client into `C:\oracle32`.

If I add this to the `PATH` environment variable, it works great. But I also
want to run the Pylons app as a service ([using this
recipe](http://wiki.pylonshq.com/display/pylonscookbook/How+to+run+Pylons+as+a+Windows+service))
and don't want to put this 32-bit library on the path for all other
applications.

I tried using `sys.path.append("C:\\oracle32\\bin")` but that doesn't seem to
work.


Answer: sys.path is python's internal representation of the PYTHONPATH, it sounds to
me like you want to modify the PATH.

I'm not sure that this will work, but you can try:

    
    
    import os
    os.environ['PATH'] += os.pathsep + "C:\\oracle32\\bin"
    

