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...

UsingCommandLineArguments (last edited 2008-03-12 02:47:13 by localhost)