grantjenks / free-python-games

Free Python Games
http://www.grantjenks.com/docs/freegames/
Other
3.53k stars 1.38k forks source link

Support for pythonista on iOS? #15

Closed JaminShanti closed 6 years ago

JaminShanti commented 6 years ago

Getting this error: stash: <class 'TypeError'>: setup() takes from 1 to 3 positional arguments but 5 were given

When I type python3 -m freegames.snake

grantjenks commented 6 years ago

Works for me... The only setup() call is to turtle.setup. Try this:

$ python3
Python 3.6.5 (default, Mar 29 2018, 15:37:32) 
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from turtle import *
>>> setup(400, 400, 400, 400)

That should open a Turtle graphics window. Does it work?

JaminShanti commented 6 years ago

Thanks for the reply. Setting up my Son's iPhone with pythonista and though your repo would be a great start.

Getting this from the console:

help(turtle.setup()) Help on NoneType object:

class NoneType(object) Methods defined here:
hash(...)
x.hash() <==> hash(x)
repr(...)
x.repr() <==> repr(x)
grantjenks commented 6 years ago

Try help(turtle.setup) instead. What does that say?

JaminShanti commented 6 years ago

Pythonista doesn't support turtle. Sry and thank you for your time.

grantjenks commented 6 years ago

Bummer. Certainly would’ve been cool!