Re: Question regarding python scripting

2019-12-29 Thread Philippe Michel
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...



Question regarding python scripting

2019-12-25 Thread Cihan Göksu
Dear GNUbg,

First, I would like to greatly thank you for this fantastic software and 
express a big big applause! Here, I'm trying to check out python 
scripting and a little rookie :-)
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?

Thank you very much for your help in advance!

Cheers,
Cihan