I just enrolled this ... still thinking to pay or not. But I guess it is good.
https://www.coursera.org/course/interactivepython
I am not associated with Rice or ... Python. :-)
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.
I just enrolled this ... still thinking to pay or not. But I guess it is good.
https://www.coursera.org/course/interactivepython
I am not associated with Rice or ... Python. :-)
I delete the whole project and re-install it again. It worked. At least for now, just remember NOT to "update to recommend setting"
Now I only have
(The new setting always have both armv7 and armv7s.)
I think it must the way pythonista setup in an older setting. Hope the next round it would be updated.
I run a sample xcode project to my iphone5 and ipad retina and it seems the following setting is fine:
Run in the iDevices ok-ish but not the pythonista one.
In fact, the error of the pythonista is now changed. I used the same setting above and now it said (not before just suddenly) it use ARCHS=i386 and VALID_ARCHS=X86_64 which I am sure I have NOT chosen OS X. Confused, where does that come from. Clean it does not help.
Just understand a bit about the python include statement and try to up the ante a bit to use xcode. I encounter the same issue and try the above, it still does not work.
May I ask what is the setting for Xcode 5.0?
I suspect it is related to choices here:
I tried various combination and it does not compile (running iphone simulator is ok). Is there any experience of which parameters to use.
BTW, I did try to delete any arm7s under the Valid Architectures, but the message is that the active architecture is arm7s.
Import ... and run! Ooh! Really need to learn python properly. Just found coursera has a course in Python (and even signature course as well).
https://www.coursera.org/course/interactivepython Post it as a seperate thread.
I tried to call programs I wrote so that I can have a higher level of python program running a main loop. Then depend upon user input, I would run one of these smaller programs and then return to the main loop for users to choose other programs to run.
For example, my program can call all the game programs in pythonista and let user choose which one to play.
In this regards, I saw sample for calling class module, e.g. there is a sample of dropboxlogin and you can use that kind in dropboxsync like this:
dropboxsync.py
...
import dropboxlogin
...
x = dropboxlogin.get_client()
...
state_download_all(x) # i.e. one can use dropboxlogin as class to produce objects and manipulate them
My question in this situation is how to use dropboxlogin as a program not as class and also how to structure dropboxlogin so that it can be called as a program.
To use Cards.py as an example instead of dropboxlogin (too risky to test), which I have tried a bit. The result is not as expected:
a) calling Cards.py itself
import Cards
Cards
result: the Cards program would run after I exit the program
b) calling Cards as a class
import Cards
x=Cards.Game()
result: same as above
c) call run(Cards.Game())
import Cards
run(Cards.Game())
result: the game run immediately but when I exit the Cards game, the main python crashed and pythonista point to the line "run(Cards.Game())" and said "NameError: name 'run' is not defined
My question is
a) Is there anyway to call Cards.
b) Some of the sample module use run(Cards.Game()), some used if name == 'main" and some have nothing. Can you tell what should I use for developing these independent program for calling by others. In other words, is the Cards program having run(Cards.Game()) is the problem
Another question unrelated to above is that one of the small program would like to play a MP3 (in the background) and display a few photos. Is there anyway to call and play MP3 (even if I download that into my directory, if calling itune is too hard)
Sorry for such newbie questions.
For all your assistance and kind advice.
Dennis
More to learn and more to test this weekend ... great!
Have to hand in my assignment deadline to coursera on Beethoven 32 sonata. Would struggle to fit these two things together but I would try.
Thanks very much. really thanks.
BTW, to be honest, (1) I still do not get the paradigm of run(classx(..)) . It is a paradigm I do not get. (2) Script paradigm use main (as in c). (3) Object-class pardigm use class definition (which import) or dynamic object (as in objective c; or mention lisp/scheme way) and then create object using this class factory. (3) Even the eval (in python or in lisp macro) paradigm, I can get it to share code using dynamic generation and execution.
But what is run(classx(..))
Is it just a python interpret special function, a macro expander, ... sorry week end problem.
Thanks. After that post, I kept on trying for the night and very happy indeed to see your post. It seems it would be another day to test and understand. May be this weekend.
Reading a bit the other links, the key I think is (a) one can do text based game, play some music etc. but not involve Scene and (b) if Scene is involved, one has to incorporate all these into the high level program I am doing (with may be a bit offload to other helper class module outside). That might the ultimate strategy I would opt for.
Thanks once again.
import platform
print "platform.system() is -"+platform.system()+""
print "platform.machine() is -"+platform.machine()+""