Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nice.

I see from the source that you're using wxwidgets so it should be easy to port it to OS X and linux as well.



That's right, it's all Python and wxPython so porting it should be trivial. A Mac version will come, I hope that someone more Mac-savvy than myself will help me with making it.


It works as is on Ubuntu.

PythonTurtle screenshot with a dragon curve http://img35.imageshack.us/i/screenshotpythonturtled.png/

    >>> def dragon(level=4, size=200, direction=45):
    ...     """From http://rosettacode.org/wiki/Dragon_curve
    ...     """
    ... 	if level == 0:
    ... 		go(size)
    ... 		return
    ... 	turn(direction)
    ... 	dragon(level-1, size/1.41421356237, 45)
    ... 	turn(-direction*2)
    ... 	dragon(level-1, size/1.41421356237, -45)
    ... 	turn(direction)
    ... 
    >>> dragon(10)


I'll look at it today and see if I can get it up on the Mac




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: