For a sekrit mobile :-) project I am doing with Jen, looking for open source python code that uses NewMediaObject on XML-RPC or the equivalent in the Atom Publishing Protocol to post photos and videos. Jen has looked and only found code to do text blog posts. Lazyweb?
via ssh, I use terminal.app to the ip address of the N900 (which I can see at all times with the personal IP address widget) and test stuff out interactively using python's command line interpreter, aka the python REPL
when i am happy with the code that I have tested the REPL, I add it to the file on the N900 which I edit on emacs running on my mac using ange-ftp
test the code out on the n900 from terminal.app, 90% of the time it just works since I tested it in the REPL unlike my C/C++ days when something you never thought of always required you to re-compile
Easy, peasy. No need to learn silly :-) Java or C+ or wait for compilation and access to the full power of your Mac for google searches plus you can execute on the N900 directly. No need for silly :-) emulators which in my experience aren't very useful.
python 2.5.4 uses the Numeric floating package (bug 1038, although I think installing NumPy manually instead of waiting for python 2.6 from PyMaemo is the road to yak-shaving madness :-) ! )instead of python 2.6's NumPy
Numeric and NumPy are mostly compatible; there are very subtle differences which are easy to fix; so easy to fix that even I who know almost nothing about Python was able to fix it!
most of them were with the N95 (7643) and N82 (20, 554 as of this writing)
Combine the 35000 public plus over 10000 on my private kid flickr account plus the ones that I didn't download and I have over 50000
Needless to say I love my N82 :-) and its "triumph of the lofi" sensor
I also love the non blurriness of my digital SLR and Lightroom but hate the fact that WiFi and GPS are not built into DSLRs (they both should be! All cameras including cameraphones and SLRs and point and shoots will be social cameras in 10 years or less!!!!)
And like Jen I have tried the N8 under NDA and it's fantastic
Therefore even though (like Jen), Symbian is not my fav operating system anymore:
N8 + ShoZu + gravity = a winner so I am getting one (and an iPhone 4 as previously blogged; it would be silly for me not to use the awesome cameraphone power of the iPhone 4)
And Jen, I assume when you write:
" I will be purchasing a Nokia N8 and then tracking down a QT developer to help me flesh out the code of my mobile app idea. Here's to 2,045 more days of camera phone photography. ;o)"
that python is ok? Right Jen :-) ? If so I'll help you write a prototype. I don't do C++ :-)
Continuing to have a great time with Python on the N900. I'll have to post later about how awesome it is to run N900 Python aka PyMaemo scripts from a Terminal.app window on my Mac edited in Aquamacs using ange-ftp (or whatever it's called in the 21st century).
Anyhow came up with gpsgamelan.py which is a modification of the script from latlongsound.py to play gamelan (indonesian scale) music (using the code from PyGSoundTestTest_3.py from Matthew Brown, thanks!) based on the jitter from GPS Lat/Long (10 different sounds based on latitude and another 10 different gamelan sounds based on longitude)
Here's what it sounds like (short video from flickr):
Not so great sound. My next idea is to play more pleasing music
e.g. for each neighbourhood, pick a major key (there are twelve possible major keys in Western music AFAIK)
based on the latitude, play a major chord (one of 10 possible)
based on the longitude, play a minor chord (one of 10 possible)
My guess is this will produce more melodic and pleasing sound
Check out latlongsound.py, my N900 hack to produce random sounds from GPS coordinates (it's basically an unholy :-) combination of keyboard5.py from MIT and the PyMaemo Location API sample sound code using PyGame, thanks to the MIT and Maemo folks for sharing!). What should I do with this next? I have lots of ideas, love to hear what would be cool from others!
Just for fun, I am writing a little PyMaemo python script (sorry but I don't do C++ anymore so that's out :-) !) to compute and then play sounds based on my GPS coordinates (using the N900 Python Location API).
The easiest way to synthesize (rather than just play sounds) seems to be to use the PyGame sound synth (e.g. keyboard5.py from MIT computes some nice sounds) but I don't know how to make it work with the PyMaeMo GPS loop.
LazyWeb, anybody have some sample Python code :-) ? I of course will do my homework and post on the official very hard to follow forum (should I ask in talk.maemo.org OR the pymaemo list?) , but any help would be much appreciated.
What I am looking for in my ongoing mobile art experiments is REAL!
Read the sensors (GPS, accelerometer, compass, etc)
Evaluate the data from the sensors
Art - Make some art (sound, graphic, image, etc) and display and store it on the mobile
Loop - Back to step 1
And I want to do it in a dynamic environment that doesn't force me to do yak shaving like spawning separate threads for each of the sensors or other such needless complexity that's not needed by my artistic algorithms. Nor the slings and arrows of outrageous certificates or certifications or developer programs or DRM malarkey :-) !
After reading the N900 technical reviews from the Maemo summit, it appears that the unlocked version of the N900 is the closest current device that could do this:
It's Linux so assuming the sensor APIs are available from a standard Linux C (i.e. not using some non standard craziness like Carbide C++ for Symbian) library, Python, Ruby, name your favourite dynamic language here, etc (C++ and Java are just not malleable and easily hackable enough, sorry!) bindings could be (and probably are or are in the process of being) built to those C libraries
No need for developer fees or ridiculous certificates
It has all the sensors I want for my current experiments
It's NOT mass market, but it's mass market enough for hackers (unlike Bug Labs Bug which I love but already probably has less than 1/10 the amount of developers working on it as the N900).
Am I right? Time for me to watch the blogs for signs of the N900 and Maemo 5 and 6 making dynamic languages first class citizens unlike on Symbian where S60 Python was far too many steps behind Carbide C++ (and time for to save up for the N910 since the N900 will probably be crippled in some significant way as all 1st gen Nokia devices are e.g. N95-1 not having enough memory)
Aaargh, it turnes out (thanks to Forum Nokia people for responding to my query!) that I can't record video from S60 Python on an N93 (see my earlier S60 video python post) without installing a MultimediaDD certificate which for some reason (bug?) is not present on an N93. Please Nokia update the N93 firmware to include he Multimedia DD certificate !
How do I get camera.start_record() to record 640x480 video on an N95? Is there some size parameter I need to specify in order to record at 640x480 resolution? There is nothing in the docs about a parameter that specifies the video resolution
I tried to record a video using the new video APIs in S60 Python 1.4.1 but I can't get it to work. My code (inspired by instaflickr code from the S60 Python Book Sample code) runs but the red light doesn't come on on my N93 and nothing is recorded. I am guessing (Forum Nokia post, SourceForge Bug Report) I have an error in camera.start_record() in the following code (which is also attached):
Invoking the Bluetooth console from the python app on the Nokia N93 worked but then after typing "screen /dev/tty.BT_CONSOLE", I get the following error messages: "Cannot open line '/dev/tty.BT_CONSOLE' for R/W: Resource busy " followed by "Sorry, could not find a PTY. ".
What am I doing wrong? I know I had this working with my Mac and Series 60 Python on the N70 back in the day so it's a bit frustrating!
The following Apache modules have been built in: mod_alias, mod_auth, mod_autoindex, mod_dav, mod_dav_fs, mod_dir, mod_log_config, mod_mime, mod_rewrite, mod_setenvif and last, but definitely not least, mod_python.
Mod_python integrates Python for S60 with Apache and thus you can create content using Python scripting and also Python Server Pages. As it is possible to write your own Python extension modules, the entire S60 API is in principle available, even though the source for the Symbian port of Apache httpd is not yet provided.
The port of Apache httpd is based on version 2.0.52 and the port of mod_python on version 3.1.3.
...
In order to be able to browse to your mobile website you need to have an account on our gateway. Simply send a mail with the subject Raccoon Account and we will create one for you. If your name and preferred email-address are not evident from the mail headers, then specify them explicitly in the email body.