plataform dependent code

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Zunbeltz Izaola

    plataform dependent code

    Hi

    I am using wxPython and i want to have some code plataform dependent.
    Is it possible? I can't find any information about this in the net.

    TIA

    Zunbeltz

    --
    Remove XXX from email: zunbeltz@wm.lc. ehu.esXXX
  • Rene Pijlman

    #2
    Re: plataform dependent code

    Zunbeltz Izaola:[color=blue]
    >I am using wxPython and i want to have some code plataform dependent.
    >Is it possible?[/color]

    import sys
    if sys.platform == 'win32':
    pass
    elif sys.platform == 'linux2':
    pass
    [color=blue]
    >I can't find any information about this in the net.[/color]

    You've got to be kidding.

    --
    René Pijlman

    Comment

    • Zunbeltz Izaola

      #3
      Re: plataform dependent code

      Rene Pijlman <reply.in.the.n ewsgroup@my.add ress.is.invalid > writes:

      [color=blue]
      > import sys
      > if sys.platform == 'win32':
      > pass
      > elif sys.platform == 'linux2':
      > pass[/color]

      Thanks. (so odbious)[color=blue]
      >[color=green]
      > >I can't find any information about this in the net.[/color]
      >
      > You've got to be kidding.
      >[/color]
      no I've googled (is it a verb? :) platform dependent python in (alson
      in complang.python ) and i haven't been pointed to the library
      referend.

      I didn't search in the reference :( ,next time i'll not forgeto to
      search there

      Zunbeltz
      [color=blue]
      > --
      > René Pijlman[/color]

      --
      Remove XXX from email: zunbeltz@wm.lc. ehu.esXXX

      Comment

      • Peter Hansen

        #4
        Re: plataform dependent code

        Zunbeltz Izaola wrote:[color=blue]
        >
        > Rene Pijlman <reply.in.the.n ewsgroup@my.add ress.is.invalid > writes:
        > [Zunbeltz Izaola wrote:][color=green][color=darkred]
        > > >I can't find any information about this in the net.[/color]
        > >
        > > You've got to be kidding.
        > >[/color]
        > no I've googled (is it a verb? :) platform dependent python in (alson
        > in complang.python ) and i haven't been pointed to the library
        > referend.
        >
        > I didn't search in the reference :( ,next time i'll not forgeto to[/color]

        Don't feel too bad. I remember learning about this particular piece
        of Python as well, and being equally surprised.

        Of course, at that point I realized the value of bringing up an
        interactive session and typing "import amodule; dir(amodule)" and
        then checking out all the little goodies that it suggested were
        there. Reading the docs is one thing; actually typing the name
        (e.g. sys.version_inf o) yourself is quite a different thing altogether:
        if you type it yourself, it _might_ actually stick in your memory! :-)

        -Peter

        Comment

        Working...