Active Topics

 


Reply
Thread Tools
Posts: 4 | Thanked: 1 time | Joined on Apr 2008
#1
Hey guys,
I'm new here and trying to learn a lot about the N810. I was able to install PyGTKEditor along with Python2.5-runtime using Red Pill mode. I made a simple "Hello World" app.
I have no linux experience, only Windows and Visual c++. I would like to learn to program using PyGTKEditor on my N810.
I know many people develop applications on the PC with scratchbox. Is it unheard of to program on the N810 instead of the PC? I know the development is slower, but I figured I'm learning and will naturally go slow. Anyone else doing this?

Here is what I'm currently reading:

http://docs.python.org/tut/
http://pymaemo.garage.maemo.org/docu...emo_howto.html

Any other recommendations?

I'm just learning a couple simple things in X Terminal, like "ls", "cd", "python Hello.py". Any recommended readings on this?
Also, how is the directory structure set up? I learned that in X Terminal the "~ $" starts at /home/user/MyDocs. In File Manager, my top level (which I named "Don") contains "Audio clips", "Documents", "Games", etc. and it also contains any files from /home/user/MyDocs. I'm confused on that one. Can someone explain that a little?

Thanks Guys !
Don
 
Posts: 422 | Thanked: 244 times | Joined on Feb 2008
#2
In linux/unix, any file that starts with a '.' doesn't show up in a normal ls. They can perhaps be considered "hidden files", but not as a security measure, purely as a convenience.

As all your own files, plus application generated configuration files are all stored in your home directory, it is a convention that the config files are prefixed with a '.' so they don't clutter up the folder view.

If you want to see them, use
Code:
ls -a
So if you do this in the MyDocs folder, you'll see .video and .games etc. The file manager knows to show these, and just seems to drop the '.' and uppercases the first letter.

The '~' represents the users home folder, and is where you end up when you type 'cd' on its own. Again, this is a convenience. Normally this matches what is defined in /etc/passed for the user, but the n810 must redefine it from /home/user to /home/user/MyDocs somewhere during the login.

These are defined by the shell the user is running - sh. The n810 shell is standard, so googling for linux shell commands will provide further information. Note that under linux there are several shells around, that have different commands and syntax. The n810 is running 'sh' (as opposed to bash, or ksh or ash or other shells).

I'll leave others to talk about gtk python dev on the n810, but I'd be interested to hear if there is a good syntax highlighting editor available
 

The Following 2 Users Say Thank You to paulkoan For This Useful Post:
Posts: 35 | Thanked: 5 times | Joined on Sep 2007
#3
I know many people develop applications on the PC with scratchbox. Is it unheard of to program on the N810 instead of the PC? I know the development is slower, but I figured I'm learning and will naturally go slow. Anyone else doing this?
No. That is exactly how I do it: on device. Albeit sometimes I know the code should work equally well on PC and IT so it can be developed on PC which can be somewhat faster. Sometimes I know the code does not work on PC, for example in case of the GPS receiver so it has to be tested on device.

SSH on the device and mount it as some directory then use your favorite editor for developing. I think many people do it that way.
 
Khertan's Avatar
Posts: 1,012 | Thanked: 817 times | Joined on Jul 2007 @ France
#4
Personnaly i dev mainly on my n810 using PyGTKEditor
 
Posts: 6 | Thanked: 4 times | Joined on Apr 2008 @ Vancouver, BC
#5
Hi Don,
I've only had my n800 for a couple of weeks, but as you have, I've found it's a compelling platform to develop for. Welcome to the wide world of OSS (Linux style at least)

I'd actually suggest trying the development VMWare image or installing a desktop Linux; not because you can't develop directly on the tablet, but because you'll get some extra tools that aren't available on the n810. The Maemo-based devices run a pretty full-featured setup, but where they can't compare with a desktop (or laptop) is in storage space, at least out of the box. This means that a lot of the documentation and developer tools aren't complete, or are very expensive to install in terms of the memory footprint. This also gives you a way to expose yourself to desktop Linux software... if you see something cool that you want to incorporate into a maemo application, you can get at the code and figure out how it's done. There's a lot more GTK based software out there for the desktop than there is for maemo.

Especially with the n810's keyboard, you can get some real work done, but without the background knowledge of what is available, you may find it frustrating.

For example, ipython is an amazing introspective frontend for python, but many of its features are disabled in the maemo port because of the lack of readline support (needed for command completion, etc.)

I'd consider combining the two; work on bits and pieces of code, tweak settings, etc. on the tablet, and use it as the test environment, but keep some windows open on your dev machine (with ipython, for example) for when you need to look things up or step through the execution. Also remember there are some good python tools available for Windows, so you can recycle a lot of what you do.

But that's just my $0.02 - go with what works for you, based on your background.
 
Posts: 155 | Thanked: 69 times | Joined on Apr 2008
#6
I agree with the others... in a pinch I could write some bits of code on my n810, and on a trip it would be fine. But if I'm sitting at home with my larger laptop screen and keyboard available, I'm going to use it as the editor and for looking up documentation and then scp my code over to the tablet for testing.
 
Posts: 4 | Thanked: 1 time | Joined on Apr 2008
#7
Thanks for all the help and advice guys! I have a lot of reading to do...

Regards,
Don
 
Posts: 19 | Thanked: 3 times | Joined on Apr 2007
#8
I found the tutorials on learningpython.com to be a good introduction to GUI programming using Python and GTK. Since I know Windows but Linux not so much I've been doing my development mostly on Windows using Idle and Glade. Then when I have something working I copy the files to the N810, and use PyGTKEditor to tweak it if I need to. Then Pypackager to install and create a deb to upload.
 
Reply


 
Forum Jump


All times are GMT. The time now is 01:15.