Thread
:
PyQt framework now on Diablo
View Single Post
Nyrath
2008-10-02 , 03:36
Posts: 92 | Thanked: 50 times | Joined on Jan 2006 @ the praeternatural tower
#
9
Yes. That's
exactly
what I'm saying.
I developed my app on Windows, using Python with PyQt. I used EasyEclipse for Python to write and test it, but I could have just as easily used Notepad and the Windows Command Prompt. My app included various image in PNG format. It ran wonderfully on Windows.
On my Nokia 810 with Diablo (you must have Diablo, PyQt for Maemo won't work on anything earlier), I installed Python for Maemo, Qt for Maemo, and the three PyQt modules I used in my app (QtCore, QtGui, and QtXml).
I used a Windows utility called CRLF.exe to convert all the *.py files so they had LF at the line ends, instead of CR/LF. Other than this, I did not change any of the *.py files one bit.
Then I copied over all my *.py files and image files, maintaining the folder structure. I didn't know the standard Linux conventions, so I put them all in a new folder in /home/user/. I copied them by connecting my Nokia 810 to my Windows machine using a USB cable, copying to the external memory card. I then used emelFM2 on the Nokia to copy the files from the external memory card to /home/user/.
I then ran XTerm. I used the
cd
command to enter the folder with my *.py files. I then used the command
chmod +x *.py
to set the execution permission on all the python files.
Finally, in XTerm, I entered the command
python MyMain.py
where MyMain.py is the python file with your "main()" function. If I had been smart enough to put a "she-bang" line at the start of the file, I could have run it with
./MyMain.py
After about 20 seconds, my app started up. Just like magic. All without requiring the Scratchbox.
Last edited by Nyrath; 2008-10-02 at
11:08
.
Quote & Reply
|
The Following 4 Users Say Thank You to Nyrath For This Useful Post:
BoxOfSnoo
,
cheve
,
dont
,
fatdat888
Nyrath
View Public Profile
Send a private message to Nyrath
Visit Nyrath's homepage!
Find all posts by Nyrath