Please note:The SCons wiki is now restored from the attack in March 2013. All old passwords have been invalidated. Please reset your password if you have an account. If you note missing pages, please report them to webmaster@scons.org. Also, new account creation is currently disabled due to an ongoing spam flood (2013/08/27).

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)