[python-win32] eggs and pythonservices
jose at cybergalvez.com
jose at cybergalvez.com
Mon Mar 12 23:08:16 CET 2007
can sites be manipulated within a service? I tried to use
site.addsitedir to add the correct eggs to my project but that failed
Jose
> -------- Original Message --------
> Subject: Re: [python-win32] eggs and pythonservices
> From: "Norm Petterson" <njp at njp.us>
> Date: Mon, March 12, 2007 2:31 pm
> To: "jose at cybergalvez.com" <jose at cybergalvez.com>
> Cc: python-win32 at python.org
>
>
>
> On 3/12/07, jose at cybergalvez.com <jose at cybergalvez.com> wrote: Dear win32 experts
>
> I am trying to write a win32 service for a paste/pylons application
> which works well from the command line, however if I try to make it
> into a service the application can no longer find "eggs" that it needs.
> I'm including the command line program (which works) and the winservice
> (which noes not work) hopping that someone can point me the right
> direction. One that that I'm doing to complicate things is the eggs it
> needs to find are not installed in the usual place, which for the
> command line program simply means manipulating sys.path, however doing
> the same thing for the windows service does not have the same result.
>
> Any and all help is appreciated
>
> I usually put something like:
>
> os.chdir(os.path.abspath(os.path.dirname(__file__)))
>
> in the initialization of my service and reference other files (like config files and log files) by relative directory locations:
>
> opts = LoadConfig('../conf/server.cfg') # Fetch server options
>
> This works on any platform I use (win32 service or linux daemon).
>
> HTH,
>
> Norm
>
> _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
>
>
>
More information about the Python-win32
mailing list