Run as service

Larry Bates lbates at swamisoft.com
Mon Jul 19 10:38:50 EDT 2004


You should probably get your hands on Mark Hammond's,
excellent book, Python Programming on Win32.  It
has a very good section on writing services.  I'm not
sure you want this to run as a service.

Also take a look at Sam Rushing's site.  There is an
example of a POP3 mailbox system-tray app.  Should
be a good example to work from.  It may already to
what you want.

HTH,
Larry Bates
Syscon, Inc.

"André Nobre" <andre at andrenobre.com.br> wrote in message
news:mailman.509.1090009498.5135.python-list at python.org...
> Hello,
> i´m starting with python and i made this little piece of code, to know
> if i have new mails to receive.
>
> import poplib, getpass
> arquivo = 'mails.txt'
> info = file(arquivo).read().split('\n')
> d = {}
> for e in info:
>     a = e.split('\t')
>     print "Verificando e-mail de %s" % (a[1],)
>     p = poplib.POP3(a[0])
>     p.user(a[1])
>     p.pass_(getpass.getpass())
>     print "\n%s mensagens em seu mailbox.\n" % p.stat()[0]
>     p = None
> print "Final"
>
>
> it gets some information from mails.txt* file and watch new mails. I
> want to know how to leave this code running as service under windows and
> send a warning message (like that windows popup messages) when a there
> is a new e-mail.
>
> * my file is like this (simple text)
> mailserver \t maillogin \n
>
> Tkz and sorry about my english....
>
> --
> André





More information about the Python-list mailing list