A python API for generating native FlightStream scripts. This is an open source project, but is sponsored in part by Research In Flight. Development is on-going.
pyFlightscript contains all of the traditional scripting functions found in FlightStream. The functions are nested within
submodules categorized by function. for example pyFlighscript.solver.initialize_solver()
No dependencies required at this time. Simply download the repo and install with:
python setup.py install
- Generates FlightStream scripts with a user-friendly Pythonic interface
- Modules broken into categories for ease of search.
See example code folder for more detailed examples. The general flow for a pyFlightscript based script is:
import pyFlightscript as pyfs
fsexe_path = r'C:\filepath\FlightStream.exe' #specify file path to FS exe
pyfs.script.hard_reset() # (optional) clear lines from local memory, delete existing script.txt
### Enter FlightStream macro commands ###
### Example code ####
pyfs.fsinit.open_fsm(fsm_filepath=f)
pyfs.exec_solver.close_flightstream
################################
# all macro commands done
pyfs.script.write_to_file() # now write script_out.txt
pyfs.execute_fsm_script(fsexe_path=fsexe_path, hidden=True) # execute the script in headless FS
pyfs.script.display_lines()
pyfs.script.hard_reset() # clear the lines from local memory and delete the script.txt file
run the index.html file in your browser. HTML documentation can be found: https://danielenriquez59.github.io/pyFlightscript/
within \sphinx directory
simply run generate_docs.bat
within \sphinx directory remove _build directory run 'sphinx-apidoc -o . ../pyFlightscript/' rename pyFlighscript.rst to index.rst run 'make.bat html' docs are in '._build\html\index.html'
Contributions are welcome!
- Fork the repository.
- Create a new branch.
- Make your changes.
- Submit a pull request.
Please post bugs to the 'issues' section. Feel free to create a branch and submit a pull request. An admin will be notified.
GNU AFFERO GENERAL PUBLIC LICENSE