Writing a program under GNU/Linux for MS Windows.

Discussion in 'Python' started by Levi Campbell, Jul 18, 2008.

  1. Hi, I'm trying to write a program for a friend of mine who uses
    windows but I use GNU/Linux. I know you can use mingw and link to the
    python dll, but is there a way to create a win32 service under Linux?
     
    Levi Campbell, Jul 18, 2008
    #1
    1. Advertising

  2. If you're just writing Python code then it will run unmodified on his
    Windows machine.

    Are you planning on using other languages too?

    -----Original Message-----
    From: python-list-bounces+sneuberger=
    [mailto:python-list-bounces+sneuberger=] On Behalf
    Of Levi Campbell
    Sent: Friday, July 18, 2008 4:27 PM
    To:
    Subject: Writing a program under GNU/Linux for MS Windows.

    Hi, I'm trying to write a program for a friend of mine who uses
    windows but I use GNU/Linux. I know you can use mingw and link to the
    python dll, but is there a way to create a win32 service under Linux?
    --
    http://mail.python.org/mailman/listinfo/python-list
     
    Neuberger, Sheldon N., Jul 18, 2008
    #2
    1. Advertising

  3. On Jul 18, 3:26 pm, Levi Campbell <> wrote:
    > Hi, I'm trying to write a program for a friend of mine who uses
    > windows but I use GNU/Linux. I know you can use mingw and link to the
    > python dll, but is there a way to create a win32 service under Linux?


    Technically, you can probably write the code for the service in Linux,
    but I doubt you could test it. Here are some links on the subject,
    though:

    http://essiene.blogspot.com/2005/04/python-windows-services.html
    http://agiletesting.blogspot.com/2005/09/running-python-script-as-windows.html

    Mike
     
    Mike Driscoll, Jul 18, 2008
    #3
  4. On 7/18/08, Levi Campbell <> wrote:
    > Hi, I'm trying to write a program for a friend of mine who uses
    > windows but I use GNU/Linux. I know you can use mingw and link to the
    > python dll, but is there a way to create a win32 service under Linux?
    > --
    > http://mail.python.org/mailman/listinfo/python-list
    >

    Hi Levi

    (First off, I apologise if I sound a bit incoherent, but I've got flu
    and I'm on medication :( )

    After having just completed a project where had to write a windows
    service I can offer you some insight. Writing of a service on windows,
    as opposed to a daemon on linux/unix in python - you will need to use
    the pywin32 module (http://sourceforge.net/projects/pywin32/)

    The libraries in the pywin32 package you will need to use are most
    likely going to be the followowing:
    1) win32service
    2) win32serviceutil
    3) win32api
    4) win32con and
    5) servicemanager

    The fact that the pywin32 package is just an interface to the win32api
    means (as far as I understand) that [sadly] you will need to develop
    this in windows.

    Some stuff you might want to check out:
    1) http://agiletesting.blogspot.com/2005/09/running-python-script-as-windows.html
    (I don't recommend this one - a bit dated)
    2) http://groups.google.com/group/comp.lang.python/msg/3775b8265f1b220f
    (this is the template for the win32 service i finally used.)

    Also as an interesting alternative, something I recently came across -
    you can create a windows service, using the web2py web framework
    (http://mdp.cti.depaul.edu/AlterEgo/default/show/77). This could save
    you some time, as all the libraries/modules are already set up for you
    in the source download
    (http://mdp.cti.depaul.edu/examples/default/download)

    Hope this helps.

    Regards

    Nicolaas

    --
    Peesowt
     
    Nicol van der Merwe, Jul 20, 2008
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hshdude
    Replies:
    12
    Views:
    1,064
    Dimitri Maziuk
    Nov 4, 2004
  2. Peter

    1 day gnu, whole life gnu?

    Peter, Jan 10, 2005, in forum: Java
    Replies:
    3
    Views:
    346
    John C. Bollinger
    Jan 10, 2005
  3. Peter
    Replies:
    17
    Views:
    607
    Chris Smith
    Jan 13, 2005
  4. Markus Elfring
    Replies:
    2
    Views:
    373
    Markus Elfring
    Feb 23, 2005
  5. Jorgen Grahn

    Re: GNU C++ Profiling under Linux

    Jorgen Grahn, Jun 14, 2009, in forum: C++
    Replies:
    0
    Views:
    607
    Jorgen Grahn
    Jun 14, 2009
Loading...

Share This Page