Page 3 of 3

Re: Golly 2.7 is now available

Posted: November 10th, 2015, 5:55 pm
by Andrew
Scorbie wrote:If I write a Python library (with similar features) that calls the gollybase C code, would writing Python scripts with that library be substantially slower than running Python scripts in Golly?
Should be a little bit faster given that there's no GUI stuff to worry about. But if you want speed then forget Python and write everything in C/C++. Have a look at calcyman's code for apgnano.
I simply want to let Golly open the "rle.gz" files downloaded from conwaylife.
Yep, no way to do that at the moment. I could add a new button somewhere that would let you enter an arbitrary URL so you could download any pattern/rule. I'll add the idea to my TODO file. But I'm a bit mystified why you'd want to load such files into Android/iOS Golly if you've got the option of using desktop Golly.

Re: Golly 2.7 is now available

Posted: November 10th, 2015, 6:34 pm
by Scorbie
Thanks for your helpful comments.
Andrew wrote:
I wrote:If I write a Python library (with similar features) that calls the gollybase C code, would writing Python scripts with that library be substantially slower than running Python scripts in Golly?
Should be a little bit faster given that there's no GUI stuff to worry about. But if you want speed then forget Python and write everything in C/C++. Have a look at calcyman's code for apgnano.
Andrew wrote:
I wrote:I simply want to let Golly open the "rle.gz" files downloaded from conwaylife.
Yep, no way to do that at the moment. I could add a new button somewhere that would let you enter an arbitrary URL so you could download any pattern/rule. I'll add the idea to my TODO file. But I'm a bit mystified why you'd want to load such files into Android/iOS Golly if you've got the option of using desktop Golly.
Yep, I agree with you that it isn't a common operation. I use Android Golly for quick small runs of the patterns in the forum posts when I'm not using my computer, e.g. like when I'm commuting. And sometimes, I just would like to view the rle.gz files. That's all when it's needed. Don't need it often and I can just move files manually. I don't think others would have the same needs as I have, so this could be at the bottom of the TODO list, I think. By the way, In case you haven't seen it, here's my small wish list on Golly. Still I'm not sure if others would see these as necessary too.

Re: Golly 2.7 is now available

Posted: February 12th, 2016, 7:50 pm
by David
I can't use python scripts... I'm using x86-64 system, 64bit Golly, 64bit Python version 2.7.
And python27.dll is located at C:\Windows\SysWOW64.
I've entered that, but it doesn't work.

Re: Golly 2.7 is now available

Posted: February 12th, 2016, 8:07 pm
by Andrew
David wrote:I can't use python scripts... I'm using x86-64 system, 64bit Golly, 64bit Python version 2.7.
Did you use the installer for Python 2.7.11? If so there's a bug that breaks apps like Golly that try to load the .dll file (see http://bugs.python.org/issue25824). Try uninstalling Python 2.7.11 and download an installer for an older version (any other 2.7.* version should work with Golly).

Re: Golly 2.7 is now available

Posted: February 12th, 2016, 8:15 pm
by David
Andrew wrote: Did you use the installer for Python 2.7.11? If so there's a bug that breaks apps like Golly that try to load the .dll file (see http://bugs.python.org/issue25824). Try uninstalling Python 2.7.11 and download an installer for an older version (any other 2.7.* version should work with Golly).


I installed Python 2.7.10 and tried again, but it still doesn't work. I'm using Windows 10.


32bit Python works... Why the heck?

Re: Golly 2.7 is now available

Posted: February 12th, 2016, 10:27 pm
by Andrew
David wrote:32bit Python works... Why the heck?
Your Golly must be 32-bit.

Re: Golly 2.7 is now available

Posted: May 6th, 2016, 8:53 am
by David
Geez, python scripts don't work again.
Again, I'm using Windows 10 64bit,
My computer's processor is Intel Core i7, which is based on x64 architecture,
I'm CERTAINLY using Golly 2.7 64bit,
I've CERTAINLY installed Python 2.7.10 64bit,
and python27.dll is located at C:\Windows\System32.
Golly crashes instantly when I try to execute any python script.
What is the problem?

Re: Golly 2.7 is now available

Posted: May 6th, 2016, 9:14 am
by dvgrn
David wrote:Geez, python scripts don't work again.
Again, I'm using Windows 10 64bit,
My computer's processor is Intel Core i7, which is based on x64 architecture,
I'm CERTAINLY using Golly 2.7 64bit,
I've CERTAINLY installed Python 2.7.10 64bit,
and python27.dll is located at C:\Windows\System32.
Golly crashes instantly when I try to execute any python script.
What is the problem?
Hmm. The symptom is identical to what people saw with 32-bit Python 2.7.11 installs, due to an incorrect registry key put down by the Python installer.

But everyone reported that any Python up to 2.7.10 was fine -- and that was specific to 32-bit Python anyway. Or at least the problem was different for 64-bit, according to the second link above. If you're interested in more in-depth troubleshooting, have a look at your registry and post exactly what keys the Python installer added to your registry, at HKLM\Software\Python\PythonCore\2.7 (see the linked bug report for details).

I've had no reason to upgrade from Python 2.7.8, so that's what I'm running with Golly 2.7 on my two 64-bit laptops. As a first step, try uninstalling Python and backing off to 64-bit Python 2.7.8. It really shouldn't fix the problem, but it's worth checking.

When Golly 2.8 comes out, fairly soon now, it will support scripting in Lua instead of Perl (along with continued support for Python). The Lua libraries are small enough to be included in the Golly executable, so people will be able to run Lua scripts without mucking around with any separate installers at all. Am definitely looking forward to that...!

Re: Golly 2.7 is now available

Posted: May 7th, 2016, 4:34 am
by Andrew
David wrote:...
I'm CERTAINLY using Golly 2.7 64bit,
I've CERTAINLY installed Python 2.7.10 64bit,
and python27.dll is located at C:\Windows\System32.
Golly crashes instantly when I try to execute any python script.
What is the problem?
The only thing I can think of is that the python_lib path in your GollyPrefs file is wrong (perhaps pointing to a previously installed 32-bit dll). Quit Golly, locate GollyPrefs (if it's not in the same folder as Golly.exe then it's probably in C:\Users\username\AppData\Roaming\Golly\), open it in a text editor and check what the python_lib path is set to. Try changing it to C:\Windows\System32\python27.dll then save and close the file. Restart Golly and try running a .py script.

If that fails then double-check all your assumptions. Golly can definitely run Python scripts on Win7 if you have the right Python installed and python_lib points to the right path.

Re: Golly 2.7 is now available

Posted: May 7th, 2016, 7:02 pm
by David
Andrew wrote:perhaps pointing to a previously installed 32-bit dll).
I'm definitely sure that that is not the case, because I checked where the python27.dll is before and after installing Python 2.7.10 64bit.
Andrew wrote:Try changing it to C:\Windows\System32\python27.dll then save and close the file.
It was already that path.
Andrew wrote:Golly can definitely run Python scripts on Win7 if you have the right Python installed and python_lib points to the right path.
I'm using Windows 10 64bit, not Windows 7.

Re: Golly 2.7 is now available

Posted: May 7th, 2016, 7:21 pm
by Andrew
David wrote:I'm using Windows 10 64bit, not Windows 7.
Shouldn't matter, but maybe there is some incompatibility with Windows 10. Anybody else out there who is using 64-bit Golly on Windows 10 and can run Python scripts?

Maybe try this beta build of Golly 2.8:

golly-2.8b3-win-64bit.zip

If Python still doesn't work at least you'll be able to run Lua scripts (see Help > Lua Scripting for details).

Re: Golly 2.7 is now available

Posted: May 7th, 2016, 9:35 pm
by Scorbie
Andrew wrote:Shouldn't matter, but maybe there is some incompatibility with Windows 10. Anybody else out there who is using 64-bit Golly on Windows 10 and can run Python scripts?
I can with python 2.7.10.
It's possible to click just the newest release (which is golly 2.7, 32bit for windows) by mistake. I did that...

Edit: that 2.8b build doesn't have a scripts pane, so one would have to run them like File > Run Script .

Re: Golly 2.7 is now available

Posted: May 8th, 2016, 1:16 am
by Andrew
Scorbie wrote:It's possible to click just the newest release (which is golly 2.7, 32bit for windows) by mistake.
For the final 2.8 release I might try using more explicit names for the 2 versions:

golly-2.8-win-32bit.zip
golly-2.8-win-64bit.zip

Would that help? Sourceforge only allows me to specify one version as the default for Windows so I think that should still be the 32bit version.
that 2.8b build doesn't have a scripts pane, so one would have to run them like File > Run Script .
We're trying to encourage users to set up their Golly folder as described at the top of Help > Hints and Tips. That allows you to easily access all the supplied patterns/scripts/rules as well as your own patterns/scripts/rules.

Note that you can assign keyboard shortcuts to some trivial scripts that change the file pane to show whatever folders you prefer. For example, I use shortcuts to these two Lua scripts:

To show the Golly folder:

Code: Select all

local g = golly()
g.setdir("files", g.getdir("app"))
To show only the supplied Lua scripts:

Code: Select all

local g = golly()
g.setdir("files", g.getdir("app").."Scripts/Lua")

Re: Golly 2.7 is now available

Posted: February 28th, 2017, 9:41 am
by David
Typing "sudo apt-get install golly" in Linux Ubuntu Yakkety (16.10) installs Golly 2.7.

And when I go to "Control -> Set Rule...", I get a blank window and I can't close it.

Re: Golly 2.7 is now available

Posted: February 28th, 2017, 4:29 pm
by blah
I'm running Ubuntu, and I also get that problem where Set Rule spawns a blank window and the program becomes unresponsive.

Re: Golly 2.7 is now available

Posted: February 28th, 2017, 7:05 pm
by Andrew
Ouch. I see the same bug on my Ubuntu 12 system using the latest Golly build. Looks to be stuck in an infinite loop, so all you can do is kill golly. It seems to be specific to Ubuntu -- I can't reproduce the bug on my Mint 13 system.

I did notice that the bug only seems to occur if I select Set Rule from the Control menu. If I use a keyboard shortcut (I just hit R) then the bug never happens, so you might want to try that. Use File > Prefs > Keyboard to create your preferred shortcut.

I also noticed some other Ubuntu-specific bugs: the Set Rule dialog gets slightly bigger each time it's opened. Ditto for the main Golly window. Again, none of those problems happen on my Mint system. I'll try to fix these bugs for the next release but it could be tricky given that I'm using the exact same version of wxWidgets on both systems.

Re: Golly 2.7 is now available

Posted: February 28th, 2017, 7:28 pm
by blah
Thanks, that works. I can't reproduce that bug with the windows getting bigger, but maybe I'm just doing it wrong. I'm dissapointed, that bug sounds like fun.

Re: Golly 2.7 is now available

Posted: March 1st, 2017, 2:58 pm
by Andrew
Ok, I've done some more experimenting and *all* of the above Ubuntu bugs are caused by the global menu bar. After disabling that "feature" (which I never liked anyway) I haven't seen any frozen dialogs and the various windows don't get gradually bigger. To disable the global menu bar on my Ubuntu 12.04 system I used the following command (then rebooted):

Code: Select all

sudo apt-get remove appmenu-gtk appmenu-gtk3 appmenu-qt
You might need to use a different method on later Ubuntu versions. Details are here:
http://askubuntu.com/questions/10481/ho ... ation-menu