Changeset 1085 for framspy/frams-test.py


Ignore:
Timestamp:
02/18/21 22:51:55 (3 years ago)
Author:
sz
Message:
  • more sophisticated frams.py init() so frams-test.py (and other python programs) don't have to bother with framsticks paths
  • './'+name for loading .so from the current directory in linux
File:
1 edited

Legend:

Unmodified
Added
Removed
  • framspy/frams-test.py

    r1083 r1085  
    22import frams
    33
    4 frams_path = sys.argv[1] # set to the directory where Framsticks binaries and libraries exist
    5 frams.init(frams_path, sys.argv[2] if len(sys.argv) > 2 else None, "-Ddata")  # "-D"+os.path.join(framspath,"data")) # not possible (maybe python windows issue) because of the need for os.chdir(). So we assume "data" is where the dll/so is
     4frams.init(*(sys.argv[1:])) #pass whatever args we have, init() is the right place to deal with different scenrios:
     5# frams.init() - should try to figure out everything (and might fail)
     6# frams.init('path/to/frams') - load the library from the specified dir and configure framsticks path as "data" inside the dir
     7# frams.init('path/to/frams','-d/tmp/workdir/data') - as above, but set the working (writable) directory somewhere else
    68
    79print('Available objects:', dir(frams))
Note: See TracChangeset for help on using the changeset viewer.