Changeset 1081 for framspy/frams.py
- Timestamp:
- 02/17/21 16:59:46 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
framspy/frams.py
r1078 r1081 12 12 All non-Framsticks Python attributes start with '_' to avoid conflicts with Framsticks attributes. 13 13 Framsticks names that are Python reserved words are prefixed with 'x' (currently just Simulator.ximport). 14 15 14 """ 16 15 … … 21 20 22 21 class ExtValue(object): 22 """All Framsticks objects and values are instances of this class.""" 23 23 24 _reInsideParens = re.compile('\((.*)\)') 24 25 _reservedWords = ['import'] # this list is scanned during every attribute access, only add what is really clashing with framsticks properties … … 247 248 248 249 249 def init( dllpath, *args):250 def init(lib_path, *args): 250 251 original_dir = os.getcwd() 251 os.chdir( dllpath) # because under Windows, frams.dll requires other dll's which reside in the same directory, so we must change current dir for them to be found252 global c_api 253 c_api = ctypes.CDLL('frams _c_api.so' if os.name == 'posix' else 'frams.dll')252 os.chdir(lib_path) # because under Windows, frams.dll requires other dll's which reside in the same directory, so we must change current dir for them to be found while loading the main dll 253 global c_api # access global variable 254 c_api = ctypes.CDLL('frams-objects.so' if os.name == 'posix' else 'frams-objects.dll') 254 255 os.chdir(original_dir) 255 256
Note: See TracChangeset
for help on using the changeset viewer.