Golly 4.0
Golly 4.0
https://sourceforge.net/projects/golly/ ... golly-4.0/
See Help > Changes for what's new. Note in particular that Golly now requires Python 3.3 or later to run .py scripts, so all users (including Mac users) will need to download an appropriate 64-bit installer for their platform from https://www.python.org/downloads/. Python 3.9 was recently released and seems to work fine with Golly.
-
- Posts: 2200
- Joined: August 5th, 2016, 10:27 am
- Location: 拆哪!I repeat, CHINA! (a.k.a. 种花家)
- Contact:
Re: Golly 4.0
---
However, I've got an error when using the repeat.py, saying that
Harvest Moon
2-engine p45 gliderless HWSS gun
Small p2070 glider gun
Forgive me if I withhold my enthusiasm.
- LaundryPizza03
- Posts: 2326
- Joined: December 15th, 2017, 12:05 am
- Location: Unidentified location "https://en.wikipedia.org/wiki/Texas"
Re: Golly 4.0
Code: Select all
x = 4, y = 3, rule = B3-q4z5y/S234k5j
2b2o$b2o$2o!
Re: Golly 4.0
Looks like nobody has updated repeat.py to work with Python 3.x yet. "xrange" is a Python 2.x keyword; in Python 3.x it's just plain "range".
Please post in this new script request thread where you got your copy of repeat.py from. I know it's posted on the forums somewhere, but "repeat" isn't the best name to search for with the forums' lovely search functionality.
Re: Golly 4.0
I'll need more info. How exactly did you install Python 3.8? Did you download the installer from www.python.org?LaundryPizza03 wrote: ↑October 31st, 2020, 7:44 amI can't seem to use Python anymore. Changing to the version I'm using (3. did not help. The directory should be /Library/Frameworks/Python.framework/Versions/3.8/Python, but that doesn't work. I am using macOS.
Open your GollyPrefs file in a text editor and tell me what the "python3_lib=..." line says. I use Python 3.9 so mine says:
Code: Select all
python3_lib=/Library/Frameworks/Python.framework/Versions/3.9/Python
Run Terminal.app and tell me the results of running these commands:
Code: Select all
which python3
python3 --version
file /Library/Frameworks/Python.framework/Versions/3.8/Python
- gameoflifemaniac
- Posts: 1242
- Joined: January 22nd, 2017, 11:17 am
- Location: There too
Re: Golly 4.0
Code: Select all
b4o25bo$o29bo$b3o3b3o2bob2o2bob2o2bo3bobo$4bobo3bob2o2bob2o2bobo3bobo$
4bobo3bobo5bo5bo3bobo$o3bobo3bobo5bo6b4o$b3o3b3o2bo5bo9bobo$24b4o!
Re: Golly 4.0
Does it work once you give it the path to your python39.dll?gameoflifemaniac wrote: ↑November 1st, 2020, 3:48 amI installed Python 3.9 64-bit and Golly still couldn't find the library. The exact same situation as 2 years ago. Can someone help me?
If you haven't done that:
1. Open up your python shell from somewhere (make sure you open the right version if you have multiple versions installed)
2. Type in:
Code: Select all
import os
os.path
For me, the location given was
Code: Select all
C:\\Users\\USER\\AppData\\Local\\Programs\\Python\\Python39\\lib\\ntpath.py
Code: Select all
C:\\Users\\USER\\AppData\\Local\\Programs\\Python\\Python39
- gameoflifemaniac
- Posts: 1242
- Joined: January 22nd, 2017, 11:17 am
- Location: There too
Re: Golly 4.0
It kinda found it. I directed it to python3.dll instead of python39.dll because that's what Golly told me to do and only that worked. But now I get the error:Saka wrote: ↑November 1st, 2020, 6:33 amDoes it work once you give it the path to your python39.dll?gameoflifemaniac wrote: ↑November 1st, 2020, 3:48 amI installed Python 3.9 64-bit and Golly still couldn't find the library. The exact same situation as 2 years ago. Can someone help me?
If you haven't done that:
1. Open up your python shell from somewhere (make sure you open the right version if you have multiple versions installed)
2. Type in:3. Check around the location it output.Code: Select all
import os os.path
For me, the location given wasAnd python39.dll was in the folderCode: Select all
C:\\Users\\USER\\AppData\\Local\\Programs\\Python\\Python39\\lib\\ntpath.py
Code: Select all
C:\\Users\\USER\\AppData\\Local\\Programs\\Python\\Python39
Golly warning:
The Python library does not have this symbol: Py_Initialize
EDIT: Will someone help me
Code: Select all
b4o25bo$o29bo$b3o3b3o2bob2o2bob2o2bo3bobo$4bobo3bob2o2bob2o2bobo3bobo$
4bobo3bobo5bo5bo3bobo$o3bobo3bobo5bo6b4o$b3o3b3o2bo5bo9bobo$24b4o!
Re: Golly 4.0
anythingsonata wrote:July 2nd, 2020, 8:33 pmconwaylife signatures are amazing[citation needed]
Re: Golly 4.0
Windows 10. On reflection it looks pretty much exactly the same but that almost makes it worse. Plus I have no idea what font is actually being used and etc etc etc.
anythingsonata wrote:July 2nd, 2020, 8:33 pmconwaylife signatures are amazing[citation needed]
-
- Posts: 1175
- Joined: June 14th, 2014, 5:03 pm
- Contact:
Re: Golly 4.0
- Attachments
-
- Screen Shot 2020-11-01 at 1.48.04 PM.png (90.84 KiB) Viewed 8231 times
Re: Golly 4.0
Thanks for the screenshot (bubblegum, take note!). Golly doesn't know about Apple's new Dark mode, so you have 2 options:fluffykitty wrote: ↑November 1st, 2020, 5:54 pmOn macOS 10.14.5, the file area's font is white, rendering the names of non-selected items unreadable, ...
1. Disable Dark mode for ALL apps by opening System Preferences > General and clicking the Light appearance.
2. If you only want to prevent Dark mode for Golly, then quit Golly if it's running, open Terminal.app and enter this command:
Code: Select all
defaults write net.sourceforge.golly NSRequiresAquaSystemAppearance -bool yes
- LaundryPizza03
- Posts: 2326
- Joined: December 15th, 2017, 12:05 am
- Location: Unidentified location "https://en.wikipedia.org/wiki/Texas"
Re: Golly 4.0
I'm using 3.9 now, so it's changed.Andrew wrote: ↑October 31st, 2020, 8:01 pmI'll need more info. How exactly did you install Python 3.8? Did you download the installer from www.python.org?LaundryPizza03 wrote: ↑October 31st, 2020, 7:44 amI can't seem to use Python anymore. Changing to the version I'm using (3. did not help. The directory should be /Library/Frameworks/Python.framework/Versions/3.8/Python, but that doesn't work. I am using macOS.
Open your GollyPrefs file in a text editor and tell me what the "python3_lib=..." line says. I use Python 3.9 so mine says:You might just need to change the version number to 3.8 (but quit Golly.app first!).Code: Select all
python3_lib=/Library/Frameworks/Python.framework/Versions/3.9/Python
Run Terminal.app and tell me the results of running these commands:Golly 4.0 for Mac was built using the Python 3.9 header files, so it could be that the stable ABI changes don't work as advertised and you'll have to download and install Python 3.9.Code: Select all
which python3 python3 --version file /Library/Frameworks/Python.framework/Versions/3.8/Python
- which python3: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3
- python3 --version: Python 3.9.0
- file /Library/Frameworks/Python.framework/Versions/3.9/Python: /Library/Frameworks/Python.framework/Versions/3.9/Python: Mach-O 64-bit dynamically linked shared library x86_64
Code: Select all
x = 4, y = 3, rule = B3-q4z5y/S234k5j
2b2o$b2o$2o!
Re: Golly 4.0
Unfortunately, it seems that you really do need to give the path to the fully versioned dll, not the one named python3.dll. I tested this with Python 3.9 installed from python.org and also got the "The Python library does not have this symbol: Py_Initialize" warning. When I changed it to python39.dll Golly can successfully run Python scripts again.gameoflifemaniac wrote: ↑November 1st, 2020, 1:41 pmIt kinda found it. I directed it to python3.dll instead of python39.dll because that's what Golly told me to do and only that worked. But now I get the error:Saka wrote: ↑November 1st, 2020, 6:33 amDoes it work once you give it the path to your python39.dll?gameoflifemaniac wrote: ↑November 1st, 2020, 3:48 amI installed Python 3.9 64-bit and Golly still couldn't find the library. The exact same situation as 2 years ago. Can someone help me?
If you haven't done that:
1. Open up your python shell from somewhere (make sure you open the right version if you have multiple versions installed)
2. Type in:3. Check around the location it output.Code: Select all
import os os.path
For me, the location given wasAnd python39.dll was in the folderCode: Select all
C:\\Users\\USER\\AppData\\Local\\Programs\\Python\\Python39\\lib\\ntpath.py
Code: Select all
C:\\Users\\USER\\AppData\\Local\\Programs\\Python\\Python39
Golly warning:
The Python library does not have this symbol: Py_Initialize
To make this change you will need to edit your GollyPrefs file. Make sure Golly is closed and then open GollyPrefs in a text editor (you can find it by going to
Code: Select all
%APPDATA%\Golly\
Hopefully that gets you going.
Semi-active here - recovering from a severe case of LWTDS.
- gameoflifemaniac
- Posts: 1242
- Joined: January 22nd, 2017, 11:17 am
- Location: There too
Re: Golly 4.0
Thanks so much, it works now!wildmyron wrote: ↑November 2nd, 2020, 12:13 pmUnfortunately, it seems that you really do need to give the path to the fully versioned dll, not the one named python3.dll. I tested this with Python 3.9 installed from python.org and also got the "The Python library does not have this symbol: Py_Initialize" warning. When I changed it to python39.dll Golly can successfully run Python scripts again.gameoflifemaniac wrote: ↑November 1st, 2020, 1:41 pmIt kinda found it. I directed it to python3.dll instead of python39.dll because that's what Golly told me to do and only that worked. But now I get the error:Saka wrote: ↑November 1st, 2020, 6:33 am
Does it work once you give it the path to your python39.dll?
If you haven't done that:
1. Open up your python shell from somewhere (make sure you open the right version if you have multiple versions installed)
2. Type in:3. Check around the location it output.Code: Select all
import os os.path
For me, the location given wasAnd python39.dll was in the folderCode: Select all
C:\\Users\\USER\\AppData\\Local\\Programs\\Python\\Python39\\lib\\ntpath.py
Code: Select all
C:\\Users\\USER\\AppData\\Local\\Programs\\Python\\Python39
Golly warning:
The Python library does not have this symbol: Py_Initialize
To make this change you will need to edit your GollyPrefs file. Make sure Golly is closed and then open GollyPrefs in a text editor (you can find it by going toin File Explorer). Find the line starting with "python3_lib=" and change the "python3.dll" to "python39.dll". Alternatively, delete the line, run Golly v4.0 again, run a Python script and then enter the full path to the python39.dll file.Code: Select all
%APPDATA%\Golly\
Hopefully that gets you going.
Code: Select all
b4o25bo$o29bo$b3o3b3o2bob2o2bob2o2bo3bobo$4bobo3bob2o2bob2o2bobo3bobo$
4bobo3bobo5bo5bo3bobo$o3bobo3bobo5bo6b4o$b3o3b3o2bo5bo9bobo$24b4o!
Re: Golly 4.0
Where did Golly tell you to use python3.dll?gameoflifemaniac wrote: ↑November 1st, 2020, 1:41 pmI directed it to python3.dll instead of python39.dll because that's what Golly told me to do ...
The notes in Help > Python Scripting clearly state that Golly looks for python39.dll on Windows.
Anyway, glad you managed to get it working.
Re: Golly 4.0
It's in the "Could not load the Python3 library" dialog: It does seem rather confusing.Andrew wrote: ↑November 2nd, 2020, 4:09 pmWhere did Golly tell you to use python3.dll?gameoflifemaniac wrote: ↑November 1st, 2020, 1:41 pmI directed it to python3.dll instead of python39.dll because that's what Golly told me to do ...
The notes in Help > Python Scripting clearly state that Golly looks for python39.dll on Windows.
====
I'm having the same issue as LaundryPizza03 on my MacBook. (Following on from the failed attempt to try to get it to work with HomeBrew's Python3.8.)
Answers to the questions you asked:
Golly 4.0 downloaded from Sourceforge.
Python 3.9 installed using the installer downloaded from www.python.org. All options left as default.Andrew wrote:How exactly did you install Python 3.8?
Andrew wrote:Open your GollyPrefs file in a text editor and tell me what the "python3_lib=..." line says.
Code: Select all
python3_lib=/Library/Frameworks/Python.framework/Versions/3.9/Python
Andrew wrote:Run Terminal.app and tell me the results of running these commands:
Code: Select all
$ which python3
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3
$ python3 --version
Python 3.9.0
$ file /Library/Frameworks/Python.framework/Versions/3.9/Python
/Library/Frameworks/Python.framework/Versions/3.9/Python: Mach-O 64-bit dynamically linked shared library x86_64
# More version information
$ python3
Python 3.9.0 (v3.9.0:9cf6752276, Oct 5 2020, 11:29:23)
[Clang 6.0 (clang-600.0.57)] on darwin
Semi-active here - recovering from a severe case of LWTDS.
Re: Golly 4.0
Ouch -- that's annoying. It's a pity nobody noticed this while testing the 4.0 beta versions. Hopefully that's because only a tiny minority of Windows users end up having to replace python39.dll with the full path to that file (I still have no idea why that's occasionally necessary -- I've never had to do that on any of my Windows systems).
Hmm, this is very puzzling. Your python3_lib setting is exactly the same as mine and the Terminal output is exactly the same. Just to be 100% clear, are you saying that when you try to run any .py script you get Golly's dialog saying it couldn't load the Python library? Is the path shown in that dialog *exactly* the same as the python3_lib path?I'm having the same issue as LaundryPizza03 on my MacBook.
A few other questions:
Which version of macOS are you using? (I'm on 10.15.6.)
Are you logged in as an admin user? (Shouldn't matter if not. In fact I just tested logging into a non-admin account, downloaded Golly 4.0 from sf and had no problems running bricklayer.py.)
Where is your GollyPrefs file? If it's in the standard ~/Library/Application Support/Golly/ location, try moving it into the same folder as Golly.app and see if that makes any difference.
What is the output from running this command in Terminal:
Code: Select all
ls -al /Library/Frameworks/Python.framework/Versions/3.9/Python
Code: Select all
-rwxrwxr-x 1 root admin 3705920 6 Oct 02:36 /Library/Frameworks/Python.framework/Versions/3.9/Python
Re: Golly 4.0
Code: Select all
echo $DYLD_LIBRARY_PATH
echo $DYLD_FALLBACK_LIBRARY_PATH
Code: Select all
// to build: gcc -mmacosx-version-min=10.10 -o dltest dltest.c
#include <stdio.h>
#include <dlfcn.h>
int main(int argc, char *argv[])
{
if (dlopen("/Library/Frameworks/Python.framework/Versions/3.9/Python", RTLD_NOW | RTLD_GLOBAL)) {
printf("success\n");
} else {
printf("error: %s\n", dlerror());
}
}
- LaundryPizza03
- Posts: 2326
- Joined: December 15th, 2017, 12:05 am
- Location: Unidentified location "https://en.wikipedia.org/wiki/Texas"
Re: Golly 4.0
It happens when I attempt to run any Python script. The path in Golly-prefs is exactly the same as the python3_lib path.Andrew wrote: ↑November 3rd, 2020, 6:22 amOuch -- that's annoying. It's a pity nobody noticed this while testing the 4.0 beta versions. Hopefully that's because only a tiny minority of Windows users end up having to replace python39.dll with the full path to that file (I still have no idea why that's occasionally necessary -- I've never had to do that on any of my Windows systems).
Hmm, this is very puzzling. Your python3_lib setting is exactly the same as mine and the Terminal output is exactly the same. Just to be 100% clear, are you saying that when you try to run any .py script you get Golly's dialog saying it couldn't load the Python library? Is the path shown in that dialog *exactly* the same as the python3_lib path?I'm having the same issue as LaundryPizza03 on my MacBook.
A few other questions:
Which version of macOS are you using? (I'm on 10.15.6.)
Are you logged in as an admin user? (Shouldn't matter if not. In fact I just tested logging into a non-admin account, downloaded Golly 4.0 from sf and had no problems running bricklayer.py.)
Where is your GollyPrefs file? If it's in the standard ~/Library/Application Support/Golly/ location, try moving it into the same folder as Golly.app and see if that makes any difference.
What is the output from running this command in Terminal:On my Mac I get:Code: Select all
ls -al /Library/Frameworks/Python.framework/Versions/3.9/Python
I'm really struggling to think of any other difference that might explain why you're having this problem.Code: Select all
-rwxrwxr-x 1 root admin 3705920 6 Oct 02:36 /Library/Frameworks/Python.framework/Versions/3.9/Python
I'm using 10.15.5. Your command gives
Code: Select all
-rwxrwxr-x 1 root admin 3705920 Oct 5 10:36 /Library/Frameworks/Python.framework/Versions/3.9/Python
Code: Select all
x = 4, y = 3, rule = B3-q4z5y/S234k5j
2b2o$b2o$2o!
Re: Golly 4.0
Re: Golly 4.0
Indeed. Unfortunately I'd seen the separate parts of this issue but didn't put the pieces together because I haven't had much time for testing (just enough to get it to work on Windows).Andrew wrote: ↑November 3rd, 2020, 6:22 amOuch -- that's annoying. It's a pity nobody noticed this while testing the 4.0 beta versions. Hopefully that's because only a tiny minority of Windows users end up having to replace python39.dll with the full path to that file (I still have no idea why that's occasionally necessary -- I've never had to do that on any of my Windows systems).
I believe the difference in behaviour requiring (or not) the full path to python39.dll comes from options selected during installation of Python. I suspect that if "Add Python 3.X to PATH" is selected during installation then it won't be necessary to give the full path to the dll file, but I haven't had a chance to test this on my Windows box.
My answers are pretty much the same as LaundryPizza03's, but given here for completeness.Andrew wrote: ↑November 3rd, 2020, 6:22 amHmm, this is very puzzling. Your python3_lib setting is exactly the same as mine and the Terminal output is exactly the same. Just to be 100% clear, are you saying that when you try to run any .py script you get Golly's dialog saying it couldn't load the Python library? Is the path shown in that dialog *exactly* the same as the python3_lib path?I'm having the same issue as LaundryPizza03 on my MacBook.
Yes, the Python library dialog pops up when I try to run any Python script. I've copy+pasted both paths you mentioned and made sure that they match.
I'm using 10.15.6A few other questions:
Which version of macOS are you using? (I'm on 10.15.6.)
I am logged in as an admin user. Just to be sure, I logged in as a non-admin user, downloaded Golly from SF again, extracted and ran Golly, and tried to run a Python script. It failed in the same way.Are you logged in as an admin user? (Shouldn't matter if not. In fact I just tested logging into a non-admin account, downloaded Golly 4.0 from sf and had no problems running bricklayer.py.)
GollyPrefs was in the standard location. I tried with a fresh GollyPrefs in the golly-4.0-mac folder but there was no difference in behaviour.Where is your GollyPrefs file? If it's in the standard ~/Library/Application Support/Golly/ location, try moving it into the same folder as Golly.app and see if that makes any difference.
It's the same apart from modification time:What is the output from running this command in Terminal:On my Mac I get:Code: Select all
ls -al /Library/Frameworks/Python.framework/Versions/3.9/Python
Code: Select all
-rwxrwxr-x 1 root admin 3705920 6 Oct 02:36 /Library/Frameworks/Python.framework/Versions/3.9/Python
Code: Select all
-rwxrwxr-x 1 root admin 3705920 5 Oct 23:36 /Library/Frameworks/Python.framework/Versions/3.9/Python
Both those vars are emptyAndrew wrote: ↑November 3rd, 2020, 6:26 pm@wildmyron: A few more thoughts. Run these commands in Terminal (on my Mac the results are empty):Code: Select all
echo $DYLD_LIBRARY_PATH echo $DYLD_FALLBACK_LIBRARY_PATH
Code: Select all
$ echo $DYLD_LIBRARY_PATH
$ echo $DYLD_FALLBACK_LIBRARY_PATH
$
It works without error:Save the following code as dltest.c, build and run dltest and see if you get an error message:Code: Select all
// to build: gcc -mmacosx-version-min=10.10 -o dltest dltest.c #include <stdio.h> #include <dlfcn.h> int main(int argc, char *argv[]) { if (dlopen("/Library/Frameworks/Python.framework/Versions/3.9/Python", RTLD_NOW | RTLD_GLOBAL)) { printf("success\n"); } else { printf("error: %s\n", dlerror()); } }
Code: Select all
$ gcc -mmacosx-version-min=10.10 -o dltest dltest.c
$ ./dltest
success
$
Also, would it be helpful for me to do a debug build of Golly from src on my Mac and try to get more info that way? If so, is Command Line Tools sufficient, or do I need XCode installed? It would probably take quite a while to do a build on this old MacBook, but it should be able to do the job.
Semi-active here - recovering from a severe case of LWTDS.
Re: Golly 4.0
Sorry, I don't know of any other apps like that.
Leave that as a last resort. Let me dig into the wxMac code that calls dlopen. I'll try to do a build of Golly that exposes the dlerror string so you can hopefully see exactly why the dlopen call is failing on your system.Also, would it be helpful for me to do a debug build of Golly from src on my Mac and try to get more info that way? ...
Re: Golly 4.0
http://www.trevorrow.com/golly/Golly-4.0.1-Mac.dmg
Along with the usual "Could not load the Python library" dialog, you should get an extra "Golly Error" dialog box.
Please tell me the *exact* error message in that box. (Note that you can click and drag to copy the text,
then ctrl-click in it to get a pop-up menu with a Copy item that will copy the text to the clipboard.)