
iSeriesPython currently works on OS400 releases Version 5 Release 3 and later.
Download python25.zip
and lib25.zip to your PC and do the following:
| 1. Extract the python25 and lib25 files from the downloaded zip files and store them on your PC | |
| 2. Create a library called python25 on the AS/400 | |
| CRTLIB PYTHON25 | |
| 3. Create three save files in that library | |
| CRTSAVF PYTHON25/PYTHON25 | |
| CRTSAVF PYTHON25/LIB | |
| CRTSAVF PYTHON25/PYTHON | |
| 5. If the FTP service is not running on your AS/400, start it. | |
| STRTCPSVR *FTP | |
| 6. On the PC, start a command prompt and change to the folder where the
extracted python25 file is stored. On Windows NT/2000/XP, the command prompt is started by running "cmd" from the Start menu. On Windows 9X, run "command" instead) |
|
| 7. Start the Windows FTP client, then connect to and log into your AS/400 | |
| FTP AS/400 name or IP address | |
| 8. Change to the PYTHON25 library and change to binary mode | |
| cd python25 binary |
|
| 9. Put the extracted python25 and lib files to the AS/400 | |
| put python25 put lib |
|
| 10. On the AS/400, create the directories /usr/python2.5 and /usr/python2.5/lib | |
| MKDIR '/usr/python2.5' MKDIR '/usr/python2.5/lib' |
|
| 11. Restore all of the objects from the PYTHON25 save file | |
| RSTOBJ OBJ(*ALL) SAVLIB(PYTHON25)
DEV(*SAVF) SAVF(PYTHON25/PYTHON25) |
|
| 12. Restore all of the objects from the LIB save file | |
| RST 'QSYS.LIB/PYTHON25.LIB/LIB.FILE' OBJ(('/usr/python2.5' '*INCLUDE' '/usr/python2.5')) |
|
| 13. Add the entry PYTHONHOME to the system environment variables (Skip this step with release 2.3.3 or later! It's now superceded.) |
|
| ADDENVVAR ENVVAR(PYTHONHOME)
VALUE('/usr/python2.5') LEVEL(*SYS) |
|
| 14. Change Your System "Locale" Information: | |
| Change the system default: | |
| CHGSYSVAL QLOCALE '/QSYS.LIB/NO_NO.LOCALE' | |
| Change one user: | |
| CHGUSRPRF username
LOCALE('/QSYS.LIB/NO_NO.LOCALE') |
|
| Change the current job: | |
| ADDENVVAR ENVVAR(LANG)
VALUE('/QSYS.LIB/NO_NO.LOCALE') |
|
| Type WRKOBJ QSYS/*ALL *LOCALE to find valid locales listed on your AS/400. | |
| That's it! Call PYTHON25/PYTHON and the interpreter should start. To call applications, type PYTHON25/PYTHON '/path-to-script.py' To create a batch job, type SBMJOB and enter the same information as above. |
|