On Wed, Dec 25, 2019 at 10:20:42PM +, Cihan Göksu wrote:
> Is there a way to communicate between the interactive pyshell (by typing
> ">") and an external python script? For example, how can I send commands
> to py Interactive shells via another python script? Is it possible to
> import e.g. gnubg.match object into another python script?
gnubg.* is not a module that you can import in another python
interpreter, it is only available to gnubg's embedded python.
The general idea is to do the reverse: run your python script inside
gnubg's python shell, where you can use anything available in your
Python path. Something like:
% ./gnubg -t
...
(No game) >
...
>>> from pytz import *
>>> timezone('Europe/Paris');
etc...