Changeset 1085 for framspy/frams-test.py
- Timestamp:
- 02/18/21 22:51:55 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
framspy/frams-test.py
r1083 r1085 2 2 import frams 3 3 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 4 frams.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 6 8 7 9 print('Available objects:', dir(frams))
Note: See TracChangeset
for help on using the changeset viewer.