__init__.py (2889:9e367e03d656) | __init__.py (2969:d2f8f9a23082) |
---|---|
1# Copyright (c) 2005 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 30 unchanged lines hidden (view full) --- 39# import the m5 compile options 40import defines 41 42# define this here so we can use it right away if necessary 43def panic(string): 44 print >>sys.stderr, 'panic:', string 45 sys.exit(1) 46 | 1# Copyright (c) 2005 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 30 unchanged lines hidden (view full) --- 39# import the m5 compile options 40import defines 41 42# define this here so we can use it right away if necessary 43def panic(string): 44 print >>sys.stderr, 'panic:', string 45 sys.exit(1) 46 |
47def makeList(objOrList): 48 if isinstance(objOrList, list): 49 return objOrList 50 return [objOrList] 51 |
|
47# Prepend given directory to system module search path. We may not 48# need this anymore if we can structure our config library more like a 49# Python package. 50def AddToPath(path): 51 # if it's a relative path and we know what directory the current 52 # python script is in, make the path relative to that directory. 53 if not os.path.isabs(path) and sys.path[0]: 54 path = os.path.join(sys.path[0], path) --- 149 unchanged lines hidden --- | 52# Prepend given directory to system module search path. We may not 53# need this anymore if we can structure our config library more like a 54# Python package. 55def AddToPath(path): 56 # if it's a relative path and we know what directory the current 57 # python script is in, make the path relative to that directory. 58 if not os.path.isabs(path) and sys.path[0]: 59 path = os.path.join(sys.path[0], path) --- 149 unchanged lines hidden --- |