Differences between revisions 15 and 16
Revision 15 as of 2005-03-22 14:17:54
Size: 781
Editor: d120
Comment:
Revision 16 as of 2008-03-12 02:47:13
Size: 781
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

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)