From Forum Nokia Wiki
Reviewer Approved 
Introduction
The Eric IDE can be used for PyS60 development along with its code completion feature.
Installation
For Windows OS
- Check if you have Python 2.4.0 or newer. Python 2.5.4 may be an interesting version since Python for S60 (1.9.0 onwards) is based on it and ensymble.py will require Python 2.5.4 to create sis packages.
- Eric IDE uses Qt, so you need to install PyQt (http://www.riverbankcomputing.co.uk/software/pyqt/download). Select Windows installer package based on your installed Python version or use your packing system in Linux/BSD/Unix/Mac to solve the Qt dependencies.
- Install the Eric IDE (http://sourceforge.net/projects/eric-ide/files/). Download and extract eric4-4.3.6.zip (Windows) or eric4-4.3.6.tar.gz (Linux/BSD/Unix/Mac), go to the extracted directory and run install.py (e.g.: c:\python25\python.exe install.py)
- Launch it by running eric4.py or eric4.bat (Windows only), inside Python installation directory.
- Download the Refactoring Rope plugin from Eric, Plugins->Plugin Repository.... After, press "Close & Install" for installing Refactoring Rope plugin.
- Install PyS60 (https://garage.maemo.org/frs/?group_id=854).
For Mac OS X (Leopard)
ftp http://www.riverbankcomputing.co.uk/static/Downloads/sip4/sip-4.8.1.tar.gz
tar -xvzpf sip-4.8.1.tar.gz
cd sip sip-4.8.1
python configure.py
make
sudo make install
cd ..
ftp http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-mac-gpl-4.5.2-snapshot-20090627.tar.gz
tar -xvzpf PyQt-mac-gpl-4.5.2-snapshot-20090627.tar.gz
cd PyQt-mac-gpl-4.5.2-snapshot-20090627
python configure.py
make
sudo make install
cd ..
ftp http://www.riverbankcomputing.co.uk/static/Downloads/QScintilla2/QScintilla-gpl-2.4.tar.gz
tar -xvzpf QScintilla2/QScintilla-gpl-2.4.tar.gz
cd QScintilla2/QScintilla-gpl-2.4
cd Qt4
qmake qmake qscintilla.pro -spec macx-g++
make
sudo make install
Now make the Qsci module:
cd ../python
python configure.py
make
sudo make install
- Now install the Eric-IDE. Install the Eric IDE (http://sourceforge.net/projects/eric-ide/files/). Download and extract eric4-4.4.tar.gz (Linux/BSD/Unix/Mac), go to the extracted directory using the terminal with cd’ to the regarding folder and type:
tar -xvzpf eric4-4.4.tar.gz
cd eric4-4.4/
sudo python install.py
- But where is it and how to start? Eric4 was installed into
/Library/Python/2.5/site-packages/eric4/
and you can start it in Terminal with
eric4
Configuring the Eric IDE for PyS60
Now PyS60 APIs need to be integrated with Eric.
- Run the Eric API creation tool to create the PyS60 API file. Ex:
python C:\Python25\Lib\site-packages\eric4\eric4-api.py -o C:\PyS60_api.api -R -p "C:\Program Files\PythonForS60\module-repo".
python /Library/Python/2.5/site-packages/eric4/eric4-api.py -o /PyS60_api.api -R -p "<path for your PyS60 extracted>/PythonForS60/module-repo"
Your path and command line command may very depending on Python version you are running, operating system and language.
- Go to Eric IDE, Settings->Preferences...->Editor->APIs and select "Python" from the "Language" list.
- Click the "..." button and point to C:\PyS60_api.api (/PyS60_api.api).
- Click "Add".
- You can repeat this step for other Python modules as well. Ex:
python C:\Python25\Lib\site-packages\eric4\eric4-api.py -o python_api.api -R -p C:\Python25 (for standard Python modules)
python C:\Python25\Lib\site-packages\eric4\eric4-api.py -o eric_pyqt.api -R -p C:\Python25\Lib\site-packages\PyQt4 (for PyQt)
python /Library/Python/2.5/site-packages/eric4/eric4-api.py -o python_api.api -R -p "<path for your Python 2.5>" (for standard Python modules)
python /Library/Python/2.5/site-packages/eric4/eric4-api.py -o /eric_pyqt.api -R -p "/Library/Python/2.5/site-packages/PyQt4/ (for Pyqt)
- Press "Compile APIs", press "Apply", press "OK".
- Eric, Settings->Preferences...->Rope, check enable autocompletion.
- Eric, Settings->Preferences...->Editor->Calltips, check "Calltips Enabled".
Screenshots
Auto-completion for PyS60 -1
|
Auto-completion for PyS60 -2
|
Preferences window showing PyS60 API set added
|