I’m trying to build a web application using httpd, python and a binary (written in C) application all running on a ME9210 Linux 4 Mb flash/8 Mb RAM. The http server accepts AJAX requests and hands them over to a python script which parses the requests, calls the binary app to satisfy them and then returns the collected results back to the http client (javascript).
An initial implementation of this system worked OK, if slowly, with the httpd and python running on a Linux desktop (with the python script calling the digi-resident binary app with ssh calls).
Python doesn’t work well directly on the 4Mb flash/8Mb RAM ME 9210, though. For example:
/root # time python -c "print(\"hello\")"
Could not find platform independent libraries
Consider setting $PYTHONHOME to [:]
'import site' failed; use -v for traceback
warning: Not importing directory '/usr/lib/python2.5/encodings': missing __init__.py
hello
real 35m 22.72s
user 0m 0.33s
sys 9m 3.13s
/root #
(That was without any of the .pyc Python libraries, which have trouble fitting in the file system.)
Has anyone gotten Python to work with acceptable performance on the larger, 8Mb flash/16Mb RAM model of the ME 9210?