Posix return or exit

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • M.N.A.Smadi

    #1

    Posix return or exit

    hi;
    my script must return codes which are based on the POSIX spec of
    returning a positive value. A work perl version of my code uses
    exit(code_num). I am not sure if the equivilant in python is also:
    exit(code_num)
    or
    return code_num

    any ideas?

    thanks
    moe smadi
  • Sybren Stuvel

    #2
    Re: Posix return or exit

    M.N.A.Smadi enlightened us with:[color=blue]
    > my script must return codes which are based on the POSIX spec of
    > returning a positive value. A work perl version of my code uses
    > exit(code_num).[/color]

    Use sys.exit(code_n um).


    Sybren
    --
    The problem with the world is stupidity. Not saying there should be a
    capital punishment for stupidity, but why don't we just take the
    safety labels off of everything and let the problem solve itself?
    Frank Zappa

    Comment

    Working...