maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   I just wrote my first Python program. How do i make it run on N900? (https://talk.maemo.org/showthread.php?t=58953)

white_ranger 2010-07-22 12:37

I just wrote my first Python program. How do i make it run on N900?
 
I just wrote my first Python program. How do i make it run on N900?

Rob1n 2010-07-22 12:46

Re: I just wrote my first Python program. How do i make it run on N900?
 
Copy it over & run it - either using "python script.py" or by making it executable ("chmod a+x script.py") and then running it directly ("./script.py"). You can't make it executable on a FAT32 filesystem though, so the script would have to be copied somewhere outside of MyDocs (and the SD card).

white_ranger 2010-07-22 12:52

Re: I just wrote my first Python program. How do i make it run on N900?
 
I'm sorry, but a total noob when it comes to this. i just started to learn to program. Actually, the program i wrote is that number guessing game :D . So i just wanted to know how can i make it run on n900. I appreciate your help, but i don't understand any of that.

Rob1n 2010-07-22 13:04

Re: I just wrote my first Python program. How do i make it run on N900?
 
Quote:

Originally Posted by white_ranger (Post 760732)
I'm sorry, but a total noob when it comes to this. i just started to learn to program. Actually, the program i wrote is that number guessing game :D . So i just wanted to know how can i make it run on n900. I appreciate your help, but i don't understand any of that.

That's no problem. I'll do step-by-step instructions:
  1. Copy the application over to the N900. If you're using PC Suite mode, copy it to the Data directory, and if you're using Mass Storage mode, copy it to the root of the drive.
  2. On the N900, launch X Terminal
  3. Type in "cd MyDocs" and press return. This changes directory to the MyDocs directory, which is where you've copied the file.
  4. Type in "python scriptname.py" and press return. This tells python to run the program script.

white_ranger 2010-07-22 13:11

Re: I just wrote my first Python program. How do i make it run on N900?
 
WOW I did it. Thank you so much!!!!


All times are GMT. The time now is 03:38.

vBulletin® Version 3.8.8