Created
November 18, 2015 14:15
-
-
Save trevrosen/7239fdb11eb826abe616 to your computer and use it in GitHub Desktop.
Python ARGV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
╭─trevorrosen@Saramago ~ | |
╰─$ cat argv-test.py | |
#!/usr/bin/env python | |
from sys import argv | |
print argv | |
╭─trevorrosen@Saramago ~ | |
╰─$ ./argv-test.py | |
['./argv-test.py'] | |
╭─trevorrosen@Saramago ~ | |
╰─$ ./argv-test.py foo | |
['./argv-test.py', 'foo'] | |
╭─trevorrosen@Saramago ~ | |
╰─$ python argv-test.py | |
['argv-test.py'] | |
╭─trevorrosen@Saramago ~ | |
╰─$ python argv-test.py foo | |
['argv-test.py', 'foo'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment