Changeset 1081 for framspy/frams.py


Ignore:
Timestamp:
02/17/21 16:59:46 (3 years ago)
Author:
Maciej Komosinski
Message:

Cosmetic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • framspy/frams.py

    r1078 r1081  
    1212All non-Framsticks Python attributes start with '_' to avoid conflicts with Framsticks attributes.
    1313Framsticks names that are Python reserved words are prefixed with 'x' (currently just Simulator.ximport).
    14 
    1514"""
    1615
     
    2120
    2221class ExtValue(object):
     22        """All Framsticks objects and values are instances of this class."""
     23
    2324        _reInsideParens = re.compile('\((.*)\)')
    2425        _reservedWords = ['import']  # this list is scanned during every attribute access, only add what is really clashing with framsticks properties
     
    247248
    248249
    249 def init(dllpath, *args):
     250def init(lib_path, *args):
    250251        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 found
    252         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')
    254255        os.chdir(original_dir)
    255256
Note: See TracChangeset for help on using the changeset viewer.