pmGenPmFeatures.py

00001 #!/usr/bin/env python
00002 
00003 # This file is Copyright 2010 Dean Hall.
00004 #
00005 # This file is part of the Python-on-a-Chip program.
00006 # Python-on-a-Chip is free software: you can redistribute it and/or modify
00007 # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
00008 #
00009 # Python-on-a-Chip is distributed in the hope that it will be useful,
00010 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00012 # A copy of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1
00013 # is seen in the file COPYING up one directory from this.
00014 
00015 """
00016 Generates C definitions on stdout for all features in the input set to True
00017 
00018 Expects name of a pmfeatures.py file as the only argument.
00019 """
00020 
00021 
00022 import sys, time
00023 
00024 
00025 execfile(sys.argv[1])
00026 sys.stdout.write("/* Automatically generated by %s on %s.  DO NOT EDIT. */\n"
00027                  % (sys.argv[0], time.ctime(time.time())))
00028 map(sys.stdout.write,
00029     ("#define %s\n" % s for s in PM_FEATURES.keys() if PM_FEATURES[s]))

Generated on Mon Oct 18 07:40:47 2010 for Python-on-a-chip by  doxygen 1.5.9