Deprecated: Creation of dynamic property ContentPage::$metadata is deprecated in /home/public/nerdparadise20620_2026_jun_16_12_55_36/code.php on line 4510
Accepting Command Line Arguments in Python Scripts : Nerd Paradise
Login | Register
Nerd ParadiseArtisanal tutorials since 1999

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