I wanted to use PyDS for some of my other hobbies too and I didn't want to mix with this instance. I prefer to use this one only for computer related things. I guess I'll move the jokes too.
There were 2 problems I had to take care of: the location of the data files on my laptop and the serverport.
The serverport could easily be configured in %PYDS_HOME%etcPyDSConfig.py but I found it to be easier adding one line to pandora-start.py.
PyDS first looks for the PYDS_HOME environment variable to find the location of its homedir. If it isn't found, it looks for HOME. On Windows, if that failes also it uses:
home = os.environ['HOMEDRIVE'] + os.environ['HOMEPATH']
The problem here is that you can only specify one location. The solution was to set the PYDS_HOME environment variable in pandora-start.py as you can see below:
import sys
import getopt
import os
os.environ['PYDS_HOME'] = r"G:\PyDS\Pandora"
import PyDS.ConfigLoader
_PyDS.serverport = 4335
import PyDS.Context
import PyDS.Translation
print _("Loading desktop server ...")
import PyDS.Server
(opts, args) = getopt.getopt(sys.argv[1:], 'fved')
for o in opts:
if o[0] == '-f':
_PyDS.daemon = 0
elif o[0] == '-v':
_PyDS.verbose = 1
elif o[0] == '-e':
_PyDS.echoLog = 1
elif o[0] == '-d':
import libwadpy
PyDS.Server.start_server(daemon=_PyDS.daemon)
|