Ahoj, no nevim, me to funguje...
starenka /tmp % cat meh.py #!/usr/bin/env python # coding=utf-8 import sys print sys.argv starenka /tmp % python meh.py -20 ['meh.py', '-20'] BTW koukni se spis na argparse (stdlib) nebo docopt (pip / https://github.com/docopt/docopt) s. --- In Perl you shoot yourself in the foot, but nobody can understand how you did it. Six months later, neither can you. | print 'aknerats'[::-1] 2014-02-10 23:47 GMT+01:00 pythoncaha <[email protected]>: > Zdravim vsechny, nemuzu prekonat nasledujici problem, snad nekdo poradi... > > Spoustim program program.py -20 tedy s parametrem minus20. > Ale sys.argv[1] mi hodnotu minus 20 nedava. > > Jak toho docilit. > > diky Ondra > > _______________________________________________ > Python mailing list > [email protected] > http://www.py.cz/mailman/listinfo/python > > Visit: http://www.py.cz _______________________________________________ Python mailing list [email protected] http://www.py.cz/mailman/listinfo/python Visit: http://www.py.cz
