On Thursday 24 April 2014 18:05:59 Mike Alexander wrote: > --On April 24, 2014 2:48:29 PM -0700 John Ralls <jra...@ceridwen.us> > > wrote: > > It disables calling python from inside of GnuCash, but I don’t > > think we actually do that anywhere. It shouldn’t affect using the > > GnuCash API from a python program. > > I guess that's ok for now, but we might want to call it from inside > GnuCash someday. From earlier statements made by John I had inferred that is was not possible to call python scripts from within gnucash.
My solution/workaround was offered from that point of view. I see now that I probably misunderstood what he meant. In any case the python module shows python code can be called from gnucash, although we are not doing it (except for the init.py script). > It seems to me that the other workaround, to ignore > SIGTTOU, is better. You could just ignore it while initializing > Python if you want to limit the possibility of ignoring one you care > about. > > Also, has anyone tried to use a Python script that access GnuCash with > the patch to not initialize the Python module in gnucash-bin.c > applied? I didn't and it seems to me that calling GnuCash from a > Python script might trigger the SIGTTOU hang. Won't init.py be > executed then? If so it will probably hang when it imports > pycons.console. > I have just tested this. init.py won't be executed when running a python script that imports the gnucash code. This doesn't rule out that a python script could trigger a SIGTTOU anyway, but I can't tell because I'm not getting these signals on my system at all, not even when running gnucash. > Another workaround would be to remove the console support from > init.py. It's currently not used, but it still imports pycons.console > which triggers the hang. > Hmm, I suppose you tested this already ? That would confirm the issue starts in pycons.console. Yet there must be another factor here because I can't reproduce this at all. We may still have to dig a bit deeper to find the real root cause. But I have no idea where to start as it works on my machine... Geert _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel