Nerd Paradise
Home
About
Puzzles
Math
Programming
Origami
Japanese
MSPaint
Home > Programming > Accepting Command Line Arguments in Python Scripts

Accepting Command Line Arguments in Python Scripts

Since it's not quite as obvious as it is in other languages like Java and C# where the main function always accepts a string array, I figured it was worth mentioning. And also a really quick and easy blog post:

import sys
args = sys.argv

You are visitor #001049
Get notified about new posts by following the newfangled twitter account.
Best viewed with
© 1999 Nerd Paradise