Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Python Spirographs anyone?
-
Is anyone willing to do a bit of Spirograph hacking? http://www.eddaardvark.co.uk/python_patterns/spirograph.html has some nice images that might be cool to get working in Pythonista. The code below copies the source files into Pythonista and then shows the webpage. Of course, the Spirograph code will need to be ported to run on Pythonista but it might be an interesting challenge...
# coding: utf-8 '''This script will copy 7 python files locally and then open a webpage...''' import console, requests, webbrowser file_names = 'Spirograph SpirographDriver WindowsBMP LineDrawer ColourMap CircleDrawer MakeFileList' url_root = 'http://www.eddaardvark.co.uk/python_patterns/code/' fmt = 'Creating local file {}: {}' for i, file_name in enumerate(''.split()): file_name += '.py' text = requests.get(url_root + file_name).text if text: console.hud_alert(fmt.format(i+1, file_name)) with open(file_name, 'w') as out_file: out_file.write(text) url_root = url_root.rsplit('/', 2)[0] webbrowser.open(url_root) #webbrowser.open(url_root + '/spirograph.html')
-
I wrote one in Python for TKinter last year, and started moving it to pythonista UI, but didn't get far, I had already written it and didn't want to take the trouble to move it to pythonista as I saw no real use. I tried implementing with more than two arms, but failed somewhere. That was a long quest on stackoverflow that got me nowhere.
Anyway,My TKinter code is here, you're welcome to use part of it if you want.
-
Actually, looking now, it appears that I did get as far as porting it to
canvas
, if not UI. My code is working, but probably messy, I left a bunch of unused code in it from my TKinter version. The script is here.
-
Cool. I left some comments on the gist.
Also found https://github.com/J-Gamer/Spirograph