Python IDE (Py2ME) is a complete Python development environment for Java ME (J2ME) MIDP 2.0 devices. It supports both Python 2 and Python 3 syntax, includes a built-in interpreter simulator, file management via JSR-75, and a full-screen code editor.
- Python 3 Mode (modern syntax with
print()parentheses) - Python 2 Mode (legacy syntax with
printstatements) - Switch between versions in Settings
- TextField editor with syntax helper (inline editing)
- Full Edit mode - full-screen TextBox for comfortable typing
- Live line counter - updates as you type
- Keyword/snippet insertion - 80+ Python keywords and snippets
- Support for 8000 characters per script
- Save scripts to device storage
- Open scripts from file browser
- Auto-detect
.pyfiles - Storage info display (available space, root directory)
- Persistent storage via RMS (RecordStore)
- Splash screen with animated dash (Dash Animation V2)
- Developer name personalization (first-run setup)
- Graphics demo - low-level Canvas API demonstration
- About screen - platform and environment details
- Settings screen - Python version selector + developer name editor
- MIDP 2.0 / CLDC 1.1 compatible device or emulator
- JSR-75 (FileConnection API) for file operations (optional but recommended)
- Java ME SDK or J2ME emulator for development
- Compile all
.javafiles:javac -bootclasspath <path-to-midp-cldc-jars> *.java
- Package into
.jar:jar cvfm PythonIDE.jar MANIFEST.MF *.class - Create
.jaddescriptor file - Deploy to device or run in emulator
PythonIDE.java # Main MIDlet, menu, settings, RMS storage
EditorScreen.java # Code editor with Full Edit mode
PythonInterpreter.java # Python script parser/executor
FileManager.java # JSR-75 file I/O operations
SplashScreen.java # Animated splash screen
GraphicsDemo.java # Low-level graphics demonstration
- Enter your developer name (personalizes the IDE title)
- Main menu appears with demo scripts
- Select a script from the main menu
- Edit code in the Code: field
- Press Insert to add Python keywords/snippets
- Press Full Edit for full-screen editing mode
- Press Run to execute
- Press Full Edit button in editor
- Enjoy full-screen TextBox for easier typing
- Press Done to save changes and return
- Line count auto-updates on return
- Save: Press Save โ enter filename โ confirm
- Open: Press Open from main menu โ select
.pyfile - Files saved to device's
file:///root1/or similar (JSR-75 dependent)
- Python Version: Switch between Python 2 and Python 3
- Developer Name: Change your personalization
- Storage Info: View available space and root directory
| Script | Description |
|---|---|
| Hello World | Basic print statement |
| Variables Demo | Variable assignment and types |
| Loop Demo | for and while loops |
| Function Demo | Function definition and calls |
| List Demo | List operations (append, len, iteration) |
| String Demo | String methods (upper, lower, replace) |
| Math Demo | Math module usage (sqrt, pi, abs) |
| File I/O Demo | JSR-75 file read/write operations |
| Graphics Demo | Animated bouncing ball |
- Simulated execution (not real Python runtime)
- Supports common keywords:
print,if,for,while,def,import - Built-in functions:
len(),range(),int(),str(),abs(),max(),min() - Variable storage and basic arithmetic
- File I/O bridge to JSR-75
file_write('name.py', content) # Write file
file_read('name.py') # Read file
file_list() # List all .py files
file_exists('name.py') # Check if file exists
file_delete('name.py') # Delete file
file_append('log.txt', line) # Append to file
storage_info() # Show storage details- RMS RecordStore for:
- Developer name (
PythonIDEPrefs) - Python version setting (
PythonIDESettings)
- Developer name (
- JSR-75 FileConnection for
.pyscript files
| Action | Command |
|---|---|
| Select script | OK / Select |
| Run code | Run |
| Insert keyword | Insert |
| Full-screen edit | Full Edit |
| Save script | Save |
| Open file | Open |
| Back to menu | Back |
| Exit app | Exit |
- Ensure you're using the latest
EditorScreen.javawith instance field commands - Verify
PythonIDE.getDisplay()method exists - Check device MIDP 2.0 compatibility
- Device may not support FileConnection API
- IDE will still work but file operations disabled
- Storage info will show "JSR-75 not detected"
- Interpreter is simulated - only supports basic Python syntax
- Complex libraries and advanced features not supported
- Check syntax matches selected Python version (2 vs 3)
- Use Full Edit button for full-screen editing
- TextBox supports same 8000 char limit with better UX
- โ Full Edit mode (full-screen TextBox)
- โ Python 2 + Python 3 syntax support
- โ JSR-75 file I/O integration
- โ Developer name personalization
- โ Settings screen with version selector
- โ Animated splash screen v2
- โ Graphics demo with Canvas API
- Initial release
- Basic script execution
- Basic editor with keyword insertion
- Python 3 only
- Simple file operations
Platform: J2ME MIDP 2.0 / CLDC 1.1
APIs Used:
javax.microedition.lcdui.*- UI componentsjavax.microedition.rms.*- RecordStore persistencejavax.microedition.io.file.*- JSR-75 FileConnection- Low-level Canvas API for graphics
Author: DASH ANIMATION V2
- Python Software Foundation - Python language
- Java ME platform - MIDP/CLDC runtime
Last updated: 2024