-
-
Notifications
You must be signed in to change notification settings - Fork 322
UsingCommandLineArguments
garyo edited this page Dec 13, 2014
·
15 revisions
The ARGUMENTS dictionary contains the command line arguments you passed in, for example:
C:\projects> scons.py myproject release=1
The value retrieved from the dictionary is a string. Here's an example:
if ARGUMENTS.get('release', '0') == '1':
print "*** Release build..."
buildroot = 'release'
else:
print "*** Debug build..."
buildroot = 'debug'
If the command line is :
C:\projects> scons.py myproject -c
The output is:
*** Debug build...
If the command line is :
C:\projects> scons.py myproject -c release=0
The output is:
*** Debug build...
If the command line is :
C:\projects> scons.py myproject -c release=1
The output is:
*** Release build...