Changeset 1106


Ignore:
Timestamp:
03/13/21 00:50:05 (4 years ago)
Author:
Maciej Komosinski
Message:

Since 5.0rc19 there is no need to restore the current working directory because Framsticks does not change it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • framspy/frams.py

    r1100 r1106  
    302302                print("*** Could not find or open '%s' from '%s'.\n*** Did you provide proper arguments and is this file readable?\n" % (lib_name, os.getcwd()))
    303303                raise
    304         os.chdir(original_dir) # restore current working dir after loading the library so framsticks sees the expected directory
     304        os.chdir(original_dir)  # restore current working dir after loading the library so Framsticks sees the expected directory
    305305
    306306        c_api.init.argtypes = [ctypes.c_int, ctypes.POINTER(ctypes.c_char_p)]
     
    345345        c_args = (ctypes.c_char_p * len(initargs))(*list(a.encode(ExtValue._encoding) for a in initargs))
    346346        c_api.init(len(initargs), c_args)
    347         os.chdir(original_dir) # restore current working dir again, because framsticks changes dir to 'data'
     347
    348348        Root = ExtValue._rootObject()
    349349        for n in dir(Root):
     
    353353                                attr = attr._value()
    354354                        setattr(sys.modules[__name__], n, attr)
     355                       
    355356        print('Using Framsticks version: ' + str(Simulator.version_string))
    356357        print('Home (writable) dir     : ' + home_dir)
Note: See TracChangeset for help on using the changeset viewer.