FGPythonSys: Difference between revisions

Jump to navigation Jump to search
Line 259: Line 259:


=== Main Loop Impact ===
=== Main Loop Impact ===
{{FGCquote
|1= I like Python as a language and use it all the time, but in an embedded context it is quite large and the GIL makes using multiple Python instances on parallel threads tricky.
|2= {{cite web
  | url    = http://sourceforge.net/p/flightgear/mailman/message/34790212/
  | title  = <nowiki>Re: [Flightgear-devel] A FGPythonSys implementation: The embedded
Python interpreter as a FlightGear subsystem.</nowiki>
  | author = <nowiki>James Turner</nowiki>
  | date  = Jan 23rd, 2016
  | added  = Jan 23rd, 2016
  | script_version = 0.23
  }}
}}
{{FGCquote
{{FGCquote
|1= I wonder why a C++/subsystem integration of Python would be necessary. I am successfully using JavaScript via nodejs for a private project with FlightGear. Communication with FGFS runs via websocket and the http/fgcommand interface. I don't miss a single feature and everything works as one would expect. I would assume, the same technique would be possible with Python or any other scripting language that supports websockets, http-get, http-post and has some support for JSON (python has, ruby has, lua has). That being said, I don't see a benefit having a binary integration of Python in the flightgear core. Using python to get/set properties and run fg-commands is already possible without any c++ integration.
|1= I wonder why a C++/subsystem integration of Python would be necessary. I am successfully using JavaScript via nodejs for a private project with FlightGear. Communication with FGFS runs via websocket and the http/fgcommand interface. I don't miss a single feature and everything works as one would expect. I would assume, the same technique would be possible with Python or any other scripting language that supports websockets, http-get, http-post and has some support for JSON (python has, ruby has, lua has). That being said, I don't see a benefit having a binary integration of Python in the flightgear core. Using python to get/set properties and run fg-commands is already possible without any c++ integration.

Navigation menu