What would be the best way to run python client in the background

G

gel

Hi
I have written a python client server app that keeps an eye on
processes starting and ending on a client and makes decision on what to
do based on information from the server end. I want to run the client
end of the app more or less invisibly (no console) on the XP clients
when ever a users logs on. What would be the best way to get this
done? A bit more info on the purpose of the app... it is to act as a
licence server, where we have a limited number of licences for software
and the software installed on all PCs. The app will only allow a pre
defined number of clients to run the software at any one time.
 
R

Roger Upole

You can use the Task Scheduler to run a script at login.
It's not as robust as creating a service, but it's much less
work.

Roger
 
G

gel

Roger said:
You can use the Task Scheduler to run a script at login.
It's not as robust as creating a service, but it's much less
work.

Roger
OK thanks Roger I will have a bit a look at that option. It is fairly
important for the solution to be robust, but this maybe enough.

Cheers
 
R

Ravi Teja

gel said:
Hi
I have written a python client server app that keeps an eye on
processes starting and ending on a client and makes decision on what to
do based on information from the server end. I want to run the client
end of the app more or less invisibly (no console) on the XP clients
when ever a users logs on. What would be the best way to get this
done? A bit more info on the purpose of the app... it is to act as a
licence server, where we have a limited number of licences for software
and the software installed on all PCs. The app will only allow a pre
defined number of clients to run the software at any one time.

To run a python script without a console - use *.pyw extension.

But from what you stated you perhaps don't want to do this. Whether you
deploy this check as a service (through py2exe for example) or a
straight script, the users may simply kill it if they want to bypass
the check. Plus it is not common to use a seperate persistant process
to check for licenses. A better way is to incorporate the check
directly into the process of the software.
 
G

gel

Ravi said:
To run a python script without a console - use *.pyw extension.

But from what you stated you perhaps don't want to do this. Whether you
deploy this check as a service (through py2exe for example) or a
straight script, the users may simply kill it if they want to bypass
the check. Plus it is not common to use a seperate persistant process
to check for licenses. A better way is to incorporate the check
directly into the process of the software.

The reason for the a seperate persistant check is because it will be
used to enable software to be installed in whole lab of PCs but only
allow a predifined number to run the software at any time one time.
And then when a user stop using the software a licence will become
available to for someone else on the same or another PC to use the
software. The reason that the process of the software being check is
not used is because it will be used for software written by other
people. I hope this makes what and why a little clearer. Let me know
if you think that I have misunderstoood you.
 
R

Ravi Teja

The reason for the a seperate persistant check is because it will be
used to enable software to be installed in whole lab of PCs but only
allow a predifined number to run the software at any time one time.
And then when a user stop using the software a licence will become
available to for someone else on the same or another PC to use the
software. The reason that the process of the software being check is
not used is because it will be used for software written by other
people. I hope this makes what and why a little clearer. Let me know
if you think that I have misunderstoood you.

Hmm... I don't have experience with such architecture personally. The
software being managed must have some sort of dependency on the license
manager if the manager is to be external. I don't know how you can
reliably manage external programs that are decoupled from the license
manager. You can however create a plug-in of sorts if the other authors
would be willing to incorporate it without much work to them.

I mostly explored license management in Delphi apps. Since Delphi
is/was a Shareware favorite, it has quite a few open source /
commercial components available to manage such licensing, usually with
trivial effort from the component user. You could take a look at them
(http://www.torry.net/quicksearchd.php?String=shareware&Title=No). Some
of them might even compile on Lazarus to expose them to Python. By
large, the culture of Python is open source and such expertise may not
be common place here.

You might want to subscribe to the mailing lists of "Association of
Shareware Professionals" (http://www.asp-shareware.org/). I have not
been on this path in 5 years and so am out of touch.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,165
Latest member
JavierBrak
Top