Re: develop for Windows on GNU/Linux, using Python

Discussion in 'Python' started by Kev Dwyer, Sep 19, 2010.

  1. Kev Dwyer

    Kev Dwyer Guest

    On Sun, 19 Sep 2010 12:55:43 -0500, Default User wrote:

    > Consider:
    >
    > Can someone do development of programs for use on Windows systems, but
    > developed totally on a GNU/Linux system, using standard, contemporary 32
    > and / or 64-bit PC hardware?
    >
    > This would be for someone who can not or will not use Windows, but wants
    > to create software for those who do.
    >
    > This might not include the use of VM for developing on GNU/Linux, as
    > that would seem to require a Windows installation disk, which the
    > developer may not be able or willing to obtain and use.
    >
    > Is the correct answer:
    > 1) no.
    > 2) yes.
    > 3) yes, a "Hello World" program will run just fine on the Windows Python
    > interpreter.
    > 4) other.


    Hello,

    The answer is "it depends", or 4 on your list of responses.

    You can write pure python on a Linux machine and it will run fine on
    Windows as long as you've taken care to program in a portable fashion.

    However, writing the code isn't everything. To be confident that your
    code is good you need to test it on a Windows box (we all test, right?).
    If you want to distribute your application to non-developers you'll
    need to wrap it in a Windows installer; if you have C-extensions in
    your code you'll need to compile them over Windows. If you want to
    program against the Windows API you'll need access to a Windows box.

    So, if you really want to develop code for Windows (or cross-platform
    code) I think you need to bite the bullet and get access to a Windows
    (virtual) machine.

    Cheers,

    Kev

    PS - You might be able to get away with using an emulator like WINE,
    but given the ubiquity of Windows in business/home computing I think
    you're better of testing on the real thing.
     
    Kev Dwyer, Sep 19, 2010
    #1
    1. Advertising

  2. Kev Dwyer

    J.O. Aho Guest

    Kev Dwyer wrote:
    > On Sun, 19 Sep 2010 12:55:43 -0500, Default User wrote:
    >
    >> Consider:
    >>
    >> Can someone do development of programs for use on Windows systems, but
    >> developed totally on a GNU/Linux system, using standard, contemporary 32
    >> and / or 64-bit PC hardware?
    >>
    >> This would be for someone who can not or will not use Windows, but wants
    >> to create software for those who do.
    >>
    >> This might not include the use of VM for developing on GNU/Linux, as
    >> that would seem to require a Windows installation disk, which the
    >> developer may not be able or willing to obtain and use.
    >>
    >> Is the correct answer:
    >> 1) no.
    >> 2) yes.
    >> 3) yes, a "Hello World" program will run just fine on the Windows Python
    >> interpreter.
    >> 4) other.

    >
    > Hello,
    >
    > The answer is "it depends", or 4 on your list of responses.
    >
    > You can write pure python on a Linux machine and it will run fine on
    > Windows as long as you've taken care to program in a portable fashion.


    And not use modules not yet converted to microsoft, seems to happen from time
    to time.


    > if you have C-extensions in
    > your code you'll need to compile them over Windows. If you want to
    > program against the Windows API you'll need access to a Windows box.


    You can always cross compile, not only over OS but even CPU architecture, but
    of course testing will be more difficult, on x86 based Linux you can use wine
    or similar to test, but can give you some differences to run on a native or
    virtualized instance.


    --

    //Aho
     
    J.O. Aho, Sep 19, 2010
    #2
    1. Advertising

  3. On Monday 20 September 2010, it occurred to Default User to exclaim:
    > On Sun, Sep 19, 2010 at 14:31, J.O. Aho <> wrote:
    > > Kev Dwyer wrote:
    > > > if you have C-extensions in
    > > > your code you'll need to compile them over Windows. If you want to
    > > > program against the Windows API you'll need access to a Windows box.

    > >
    > > You can always cross compile, not only over OS but even CPU architecture,
    > > but
    > > of course testing will be more difficult, on x86 based Linux you can use
    > > wine
    > > or similar to test, but can give you some differences to run on a native
    > > or virtualized instance.

    >
    > < sigh > . . .
    >
    > Well, that's about what I expected, unfortunately. But thanks for the
    > honest replies.
    >
    > [OT]
    > So what's the alternative -- use the end user's browser as an interpreter
    > for JavaScript or HTML5?
    > [/OT]


    Umn, what?

    Python makes it rather easy to write portable code. But you still need to test
    it properly on all platforms you want to support, because maybe there's some
    platform-specific glitch you weren't aware of.

    If you use web technologies, then you really have to test against browsers
    such as Opera, Safari, and Microsoft IE. Same difference, really.

    If you're doing something that requires C extensions to Python, things get
    more complicated, and probably impossible with web technologies.
     
    Thomas Jollans, Sep 20, 2010
    #3
  4. Kev Dwyer

    CM Guest

    On Sep 20, 12:46 pm, Thomas Jollans <> wrote:
    > On Monday 20 September 2010, it occurred to Default User to exclaim:
    >
    >
    >
    > > On Sun, Sep 19, 2010 at 14:31, J.O. Aho <> wrote:
    > > > Kev Dwyer wrote:
    > > > > if you have C-extensions in
    > > > > your code you'll need to compile them over Windows.  If you want to
    > > > > program against the Windows API you'll need access to a Windows box..

    >
    > > > You can always cross compile, not only over OS but even CPU architecture,
    > > > but
    > > > of course testing will be more difficult, on x86 based Linux you can use
    > > > wine
    > > > or similar to test, but can give you some differences to run on a native
    > > > or virtualized instance.

    >
    > > < sigh > . . .

    >
    > > Well, that's about what I expected, unfortunately.   But thanks for the
    > > honest replies.

    >
    > > [OT]
    > > So what's the alternative -- use the end user's browser as an interpreter
    > > for JavaScript or HTML5?
    > > [/OT]

    >
    > Umn, what?
    >
    > Python makes it rather easy to write portable code. But you still need to test
    > it properly on all platforms you want to support, because maybe there's some
    > platform-specific glitch you weren't aware of.


    My guess is, if the application the person is writing uses basic
    features of Python and is more like a utility that one runs from the
    command line, there will not be that many concerns--maybe none. He
    might get lucky and it will just work on Windows. But if it is a GUI
    app and he uses, say, wxPython, I know there can be fairly significant
    differences in appearance between the two platforms, sometimes deal-
    breakingly so (but definitely able to be worked around). A lot
    depends on how complex/fancy the GUI is.
     
    CM, Sep 21, 2010
    #4
  5. In message <>, Kev Dwyer
    wrote:

    > To be confident that your code is good you need to test it on a Windows
    > box (we all test, right?).


    Preferably more than one. Test with Seven as well as Vista (yes, there are
    still some Vista users out there). What about the difference between Starter
    versus Home Basic versus Home Premium versus Professional versus Ultimate
    versus whatever? To be 100% safe, you probably need to test with all those
    as well.

    Test on machines running the various major antivirus packages, because you
    have no idea how they might screw things up.

    In other words, with Windows the guideline is: test till it hurts. Then test
    some more.
     
    Lawrence D'Oliveiro, Sep 21, 2010
    #5
    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. Peter

    1 day gnu, whole life gnu?

    Peter, Jan 10, 2005, in forum: Java
    Replies:
    3
    Views:
    353
    John C. Bollinger
    Jan 10, 2005
  2. Peter
    Replies:
    17
    Views:
    613
    Chris Smith
    Jan 13, 2005
  3. Markus Elfring
    Replies:
    2
    Views:
    380
    Markus Elfring
    Feb 23, 2005
  4. patrickwayodi
    Replies:
    6
    Views:
    925
    Anssi Saari
    Dec 14, 2011
  5. hon123456
    Replies:
    1
    Views:
    511
    Victor Bazarov
    Feb 17, 2012
Loading...

Share This Page