SConscript (5517:3ad997252dd2) | SConscript (5518:70caf53d9d7c) |
---|---|
1# -*- mode:python -*- 2 3# Copyright (c) 2004-2005 The Regents of The University of Michigan 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 243 unchanged lines hidden (view full) --- 252 if basename(srcfile) == '__init__.py': 253 mod.__path__ = fullname.split('.') 254 mod.__file__ = srcfile 255 256 exec file(srcfile, 'r') in mod.__dict__ 257 258 return mod 259 | 1# -*- mode:python -*- 2 3# Copyright (c) 2004-2005 The Regents of The University of Michigan 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 243 unchanged lines hidden (view full) --- 252 if basename(srcfile) == '__init__.py': 253 mod.__path__ = fullname.split('.') 254 mod.__file__ = srcfile 255 256 exec file(srcfile, 'r') in mod.__dict__ 257 258 return mod 259 |
260class ordered_dict(dict): 261 def keys(self): 262 keys = super(ordered_dict, self).keys() 263 keys.sort() 264 return keys 265 266 def values(self): 267 return [ self[key] for key in self.keys() ] 268 269 def items(self): 270 return [ (key,self[key]) for key in self.keys() ] 271 272 def iterkeys(self): 273 for key in self.keys(): 274 yield key 275 276 def itervalues(self): 277 for value in self.values(): 278 yield value 279 280 def iteritems(self): 281 for key,value in self.items(): 282 yield key, value 283 | |
284py_modules = {} 285for source in py_sources: 286 py_modules[source.modpath] = source.srcpath 287 288# install the python importer so we can grab stuff from the source 289# tree itself. We can't have SimObjects added after this point or 290# else we won't know about them for the rest of the stuff. 291sim_objects_fixed = True --- 668 unchanged lines hidden --- | 260py_modules = {} 261for source in py_sources: 262 py_modules[source.modpath] = source.srcpath 263 264# install the python importer so we can grab stuff from the source 265# tree itself. We can't have SimObjects added after this point or 266# else we won't know about them for the rest of the stuff. 267sim_objects_fixed = True --- 668 unchanged lines hidden --- |