Where to put python modules?

For scripts to aid with computation or simulation in cellular automata.
Post Reply
User avatar
Saka
Posts: 3626
Joined: June 19th, 2015, 8:50 pm
Location: Indonesia
Contact:

Where to put python modules?

Post by Saka »

I'm creating a module called "LifePlus" but I'm not sure where to put it. Do I put it in the scripts folder?
jarring cyan
User avatar
Andrew
Moderator
Posts: 1061
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia
Contact:

Re: Where to put python modules?

Post by Andrew »

Saka wrote:I'm creating a module called "LifePlus" but I'm not sure where to put it. Do I put it in the scripts folder?
No -- you definitely should NOT store any of your own scripts/patterns/rules/whatever in the folders supplied with Golly. If you follow the folder structure recommended in Help > Hints and Tips then all your scripts should be in a separate folder called My-scripts (or any other name you prefer). If you put your LifePlus module in that folder then all your Python scripts can use it by doing "import LifePlus".
Use Glu or Glui to explore CA rules on non-periodic tilings: DominoLife and HatLife and SpectreLife
User avatar
Saka
Posts: 3626
Joined: June 19th, 2015, 8:50 pm
Location: Indonesia
Contact:

Re: Where to put python modules?

Post by Saka »

So basically I should put it together with all my other scripts? (In the same folder?)
jarring cyan
User avatar
Andrew
Moderator
Posts: 1061
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia
Contact:

Re: Where to put python modules?

Post by Andrew »

Saka wrote:So basically I should put it together with all my other scripts? (In the same folder?)
Yes.
Use Glu or Glui to explore CA rules on non-periodic tilings: DominoLife and HatLife and SpectreLife
Post Reply