Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: py2exe and dynamic service installation ?

Reply
Thread Tools

Re: py2exe and dynamic service installation ?

 
 
Thomas Heller
Guest
Posts: n/a
 
      06-24-2003
writes:

> The attached diff to py2exe v.0.3.4 run_svc.c adds the following optional
> command line args to the users exe file:
>
> -service <desired name>
> -display <display name>
> -depends <pipe|separated|dependencies>
> -user <account name>
> -pass <password>
> -auto no param, sets service to autostart
>
> Rebuild the py2exe interpreters by running 'python setup.py build' in
> the py2exe directory.
>
> This is only lightly tested and not yet used in production.
>
> I also have a run_svc_w.c which provides a consoleless analog to
> run_w.c (usefull for avoiding 'flashing window syndrome' when bundling
> exe's for use within an installer such as NSIS or Inno Setup).


If you want this to be included in the next px2exe release,
please upload it as a patch to the SF tracker:
http://sourceforge.net/tracker/?grou...83&atid=315583

Myself I use Wise, which can register the service itself, so I had no
need for this. Is a separate console version and console-less version
needed? For debugging?

Besides, I would think that eventually the best approach would be to
rewrite PythonService.cpp (which is used by run_svc.c) in pure python
with ctypes, but currently I have neither a need nor time for this.

Thomas
 
Reply With Quote
 
 
 
 
Harald Schneider
Guest
Posts: n/a
 
      06-24-2003
> If you want this to be included in the next px2exe release,
> please upload it as a patch to the SF tracker:
> http://sourceforge.net/tracker/?grou...83&atid=315583
>


At the moment I'm not able to run the patch on my sytem, since the
executable
which Mark has sent me has got some references to Python21.dll (I run 2.2).
But it is a good approach wich makes a flexible tool even more flexible

It would be nice, if Mark could contribute this to the project. I'm not that
deep in C to modify the files myself ...

> Myself I use Wise, which can register the service itself, so I had no
> need for this. Is a separate console version and console-less version
> needed? For debugging?


Console-less only would be OK.

> Besides, I would think that eventually the best approach would be to
> rewrite PythonService.cpp (which is used by run_svc.c) in pure python
> with ctypes, but currently I have neither a need nor time for this.


I absolutely understand this!
But if you are hit someday by the urgent need to write 1.000 lines in Python
(like I do sometimes), it would be nice to see this feature

>
> Thomas


-- Harald


 
Reply With Quote
 
 
 
 
Harald Schneider
Guest
Posts: n/a
 
      06-24-2003
Thomas,

do I need to prepare my Python app for the use with WISE, when I want to
install it as a service? Does it need to provide a certain service API or
some special response codes ?

--Harald


"Thomas Heller" <> schrieb im Newsbeitrag
news:...
> writes:
>
> > The attached diff to py2exe v.0.3.4 run_svc.c adds the following

optional
> > command line args to the users exe file:
> >
> > -service <desired name>
> > -display <display name>
> > -depends <pipe|separated|dependencies>
> > -user <account name>
> > -pass <password>
> > -auto no param, sets service to autostart
> >
> > Rebuild the py2exe interpreters by running 'python setup.py build' in
> > the py2exe directory.
> >
> > This is only lightly tested and not yet used in production.
> >
> > I also have a run_svc_w.c which provides a consoleless analog to
> > run_w.c (usefull for avoiding 'flashing window syndrome' when bundling
> > exe's for use within an installer such as NSIS or Inno Setup).

>
> If you want this to be included in the next px2exe release,
> please upload it as a patch to the SF tracker:
> http://sourceforge.net/tracker/?grou...83&atid=315583
>
> Myself I use Wise, which can register the service itself, so I had no
> need for this. Is a separate console version and console-less version
> needed? For debugging?
>
> Besides, I would think that eventually the best approach would be to
> rewrite PythonService.cpp (which is used by run_svc.c) in pure python
> with ctypes, but currently I have neither a need nor time for this.
>
> Thomas



 
Reply With Quote
 
Thomas Heller
Guest
Posts: n/a
 
      06-24-2003
"Harald Schneider" <> writes:

> Thomas,
>
> do I need to prepare my Python app for the use with WISE, when I want to
> install it as a service? Does it need to provide a certain service API or
> some special response codes ?


No, you create your service with py2exe as always, and Wise does the
rest - create a windows installer, install the files on the target
machine and register the serice there. The registration is done from the
installer, not from the service.

I'll try to attach a screenshot of the dialogbox that the wise program
displays (at build time), so you can see the options which are
available.
Hm, doesn't work in the newsgroup - will send by private mail.

Thomas
 
Reply With Quote
 
Harald Schneider
Guest
Posts: n/a
 
      06-24-2003
OK -- I catched the point
I generated the service exe like usual and used XNET.EXE (part of the free
KIX package, see www.kixstart.org ) to install the service under any name.
Thanks!

--Harald


"Thomas Heller" <> schrieb im Newsbeitrag
news:...
> "Harald Schneider" <> writes:
>
> > Thomas,
> >
> > do I need to prepare my Python app for the use with WISE, when I want to
> > install it as a service? Does it need to provide a certain service API

or
> > some special response codes ?

>
> No, you create your service with py2exe as always, and Wise does the
> rest - create a windows installer, install the files on the target
> machine and register the serice there. The registration is done from the
> installer, not from the service.
>
> I'll try to attach a screenshot of the dialogbox that the wise program
> displays (at build time), so you can see the options which are
> available.
> Hm, doesn't work in the newsgroup - will send by private mail.
>
> Thomas



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: [Py2exe-users] py2exe 0.6.9 released Chris Spencer Python 3 12-08-2008 05:17 PM
RE: [Py2exe-users] py2exe 0.6.9 released Mark Hammond Python 0 11-17-2008 05:27 AM
about py2exe, I installed it, but can't find py2exe.exe in my computer. python Python 3 05-22-2006 02:08 PM
[py2exe] py2exe and datetime -> No module named datetime F. GEIGER Python 0 08-16-2004 01:13 PM
Re: py2exe and dynamic service installation ? Harald Schneider Python 0 06-24-2003 09:03 AM



Advertisments