这里有人尝试过使用iSeries Python端口吗?

时间:2022-09-25 23:22:17

I found http://www.iseriespython.com/, which is a version of Python for the iSeries apparently including some system specific data access classes. I am keen to try this out, but will have to get approval at work to do so. My questions are:

我找到了http://www.iseriespython.com/,它是iSeries的Python版本,显然包含了一些系统特定的数据访问类。我很想试一试,但必须在工作中获得批准才能这样做。我的问题是:

Does the port work well, or are there limits to what the interpreter can handle compared with standard Python implementations?

与标准的Python实现相比,该端口是否运行良好,或者解释器可以处理的内容是否有限制?

Does the iSeries database access layer work well, creating usable objects from table definitions?

iSeries数据库访问层工作得很好,从表定义创建可用对象吗?

5 个解决方案

#1


7  

From what I have seen so far, it works pretty well. Note that I'm using iSeries Python 2.3.3. The fact that strings are natively EBCDIC can be a problem; it's definitely one of the reasons many third-party packages won't work as-is, even if they are pure Python. (In some cases they can be tweaked and massaged into working with judicious use of encoding and decoding.) Supposedly 2.5 uses ASCII natively, which would in principle improve compatibility, but I have no way to test this because I'm on a too-old version of OS/400.

从我到目前为止看到的情况来看,它运行得很好。注意,我使用的是iSeries Python 2.3.3。字符串本身就是EBCDIC,这是个问题;这肯定是许多第三方包不能正常工作的原因之一,即使它们是纯Python。(在某些情况下,可以对它们进行微调和调整,使它们能够合理地使用编码和解码。)假定2.5使用的是ASCII本机,这在原则上可以提高兼容性,但我没有办法对其进行测试,因为我使用的是一个太老的OS/400版本。

Partly because of EBCDIC and partly because OS/400 and the QSYS file system are neither Unix-like nor Windows-like, there are some pieces of the standard library that are not implemented or are imperfectly implemented. How badly this would affect you depends on what you're trying to do.

部分原因是EBCDIC,部分原因是OS/400和QSYS文件系统既不是类unix,也不是类windows,有一些标准库没有实现或实现不完美。这对你的影响有多严重取决于你想做什么。

On the plus side, the iSeries-specific features work quite well. It's very easy to work with physical files as well as stream files. Calling CL or RPG programs from Python is fairly painless. On balance, I find iSeries Python to be highly usable and very worthwhile.

从好的方面来说,特定于isines的特性工作得很好。处理物理文件和流文件非常容易。从Python中调用CL或RPG程序相当容易。总的来说,我发现iSeries Python具有很高的可用性并且非常有价值。

Update: A lot of work has gone into iSeries Python since this question was asked. Version 2.7 is now available, meaning it's up-to-date as far as 2.x versions go. A few participants of the forum are reasonably active and provide amazing support. One of them has gotten Django working on the i. As expected, the move to native ASCII strings solves a lot of the EBCDIC problems and greatly increases compatibility with third-party packages. I enthusiastically recommend iSeries Python 2.7 for anyone on V5R3 or later. (I still strongly recommend iSeries Python 2.3.3 for those who are on earlier versions of the operating system.)

更新:自从提出这个问题以来,iSeries Python中已经做了很多工作。版本2.7现在已经可用,这意味着它是最新的版本2。x版本。论坛的一些参与者相当活跃,提供了令人惊叹的支持。其中之一已经让Django开发i。正如预期的那样,迁移到本地ASCII字符串解决了许多EBCDIC问题,并极大地提高了与第三方包的兼容性。我热情地向V5R3或更高版本的用户推荐iSeries Python 2.7。(我仍然强烈推荐iSeries Python 2.3.3对于那些在早期版本的操作系统上使用的人。)

#2


5  

It sounds like it is would work as expected. Support for other libraries might be pretty limited, though.

听起来像预期的那样。不过,对其他库的支持可能相当有限。

Timothy Prickett talks about some Python ports for the iSeries in this article:

Timothy Prickett讨论了iSeries的一些Python端口:

http://www.itjungle.com/tfh/tfh041706-story02.html

http://www.itjungle.com/tfh/tfh041706-story02.html

Also, some discussion popped up in the Python mailing archives:

此外,Python邮件归档文件中也出现了一些讨论:

http://mail.python.org/pipermail/python-list/2004-January/245276.html

http://mail.python.org/pipermail/python-list/2004-January/245276.html

#3


4  

iSeriesPython is working very well. We are usning it since 2005 (or earlier) in our Development and Production Environments as an utility language, for generating of COBOL source code, generating of PCML interfaces, sending SMS, validating/correcting some data ... etc. With iSeriesPython you can access the iSeries database at 2 ways: using File400 and/or db2 module. You can execute OS/400 commands and you can work with both QSYS.LIB members and IFS stream files. IMHO, iSeries Python is very powerful tool, more better than REXX included with iSeries. Try it!

iSeriesPython运行得非常好。我们从2005年(或更早的时候)开始在开发和生产环境中使用它作为一种实用语言,用于生成COBOL源代码、生成PCML接口、发送SMS、验证/纠正某些数据……在iSeriesPython中,您可以以两种方式访问iSeries数据库:使用File400和/或db2模块。您可以执行OS/400命令,并且可以使用这两个QSYS。LIB成员和IFS流文件。IMHO, iSeries Python是一个非常强大的工具,比包含在iSeries中的REXX要好得多。试一试!

#4


3  

I got permission to install iSeries Python on a box about 3 years ago. I found that it worked pretty much as advertised. I contacted the developer and he was very good about answering questions. However, before I could think about using it in production, I had to approach the developer regarding a support contract. That really isn't his gig, so he said no and we scrapped the idea. The main limitation I found is that it is several releases behind Python on other platforms.

大约三年前,我获得了在盒子上安装iSeries Python的许可。我发现它的效果和宣传的差不多。我联系了开发商,他非常善于回答问题。然而,在我考虑在生产中使用它之前,我必须与开发人员协商一个支持合同。那真的不是他的工作,所以他说不,我们放弃了这个想法。我发现的主要限制是它是在其他平台上的Python后面的几个版本。

I have also had very good experience with Jython on the iSeries. Java is completely supported on the iSeries. Theoretically, everything you can do in RPG on the iSeries, you can do in Java, which means you can do it in Jython. I was sending email from an AS/400 (old name for iSeries) via JPython (old name for Jython) and smtplib.py in 1999 or 2000.

我对iSeries上的Jython也有很好的经验。iSeries完全支持Java。理论上,在iSeries上的RPG中可以做的所有事情,都可以在Java中做,这意味着可以在Jython中做。我通过JPython (Jython的旧名)和smtplib从AS/400 (iSeries的旧名)发送电子邮件。在1999年或2000年。

#5


0  

Another place to look is on the mailing list MIDRANGE-L or search the archives for the list at midrange.com. I know they have talked about this a while back.

另一个可以查看的地方是邮件列表MIDRANGE-L或在midrange.com上搜索该列表的存档。我知道他们之前已经讨论过这个问题了。

#1


7  

From what I have seen so far, it works pretty well. Note that I'm using iSeries Python 2.3.3. The fact that strings are natively EBCDIC can be a problem; it's definitely one of the reasons many third-party packages won't work as-is, even if they are pure Python. (In some cases they can be tweaked and massaged into working with judicious use of encoding and decoding.) Supposedly 2.5 uses ASCII natively, which would in principle improve compatibility, but I have no way to test this because I'm on a too-old version of OS/400.

从我到目前为止看到的情况来看,它运行得很好。注意,我使用的是iSeries Python 2.3.3。字符串本身就是EBCDIC,这是个问题;这肯定是许多第三方包不能正常工作的原因之一,即使它们是纯Python。(在某些情况下,可以对它们进行微调和调整,使它们能够合理地使用编码和解码。)假定2.5使用的是ASCII本机,这在原则上可以提高兼容性,但我没有办法对其进行测试,因为我使用的是一个太老的OS/400版本。

Partly because of EBCDIC and partly because OS/400 and the QSYS file system are neither Unix-like nor Windows-like, there are some pieces of the standard library that are not implemented or are imperfectly implemented. How badly this would affect you depends on what you're trying to do.

部分原因是EBCDIC,部分原因是OS/400和QSYS文件系统既不是类unix,也不是类windows,有一些标准库没有实现或实现不完美。这对你的影响有多严重取决于你想做什么。

On the plus side, the iSeries-specific features work quite well. It's very easy to work with physical files as well as stream files. Calling CL or RPG programs from Python is fairly painless. On balance, I find iSeries Python to be highly usable and very worthwhile.

从好的方面来说,特定于isines的特性工作得很好。处理物理文件和流文件非常容易。从Python中调用CL或RPG程序相当容易。总的来说,我发现iSeries Python具有很高的可用性并且非常有价值。

Update: A lot of work has gone into iSeries Python since this question was asked. Version 2.7 is now available, meaning it's up-to-date as far as 2.x versions go. A few participants of the forum are reasonably active and provide amazing support. One of them has gotten Django working on the i. As expected, the move to native ASCII strings solves a lot of the EBCDIC problems and greatly increases compatibility with third-party packages. I enthusiastically recommend iSeries Python 2.7 for anyone on V5R3 or later. (I still strongly recommend iSeries Python 2.3.3 for those who are on earlier versions of the operating system.)

更新:自从提出这个问题以来,iSeries Python中已经做了很多工作。版本2.7现在已经可用,这意味着它是最新的版本2。x版本。论坛的一些参与者相当活跃,提供了令人惊叹的支持。其中之一已经让Django开发i。正如预期的那样,迁移到本地ASCII字符串解决了许多EBCDIC问题,并极大地提高了与第三方包的兼容性。我热情地向V5R3或更高版本的用户推荐iSeries Python 2.7。(我仍然强烈推荐iSeries Python 2.3.3对于那些在早期版本的操作系统上使用的人。)

#2


5  

It sounds like it is would work as expected. Support for other libraries might be pretty limited, though.

听起来像预期的那样。不过,对其他库的支持可能相当有限。

Timothy Prickett talks about some Python ports for the iSeries in this article:

Timothy Prickett讨论了iSeries的一些Python端口:

http://www.itjungle.com/tfh/tfh041706-story02.html

http://www.itjungle.com/tfh/tfh041706-story02.html

Also, some discussion popped up in the Python mailing archives:

此外,Python邮件归档文件中也出现了一些讨论:

http://mail.python.org/pipermail/python-list/2004-January/245276.html

http://mail.python.org/pipermail/python-list/2004-January/245276.html

#3


4  

iSeriesPython is working very well. We are usning it since 2005 (or earlier) in our Development and Production Environments as an utility language, for generating of COBOL source code, generating of PCML interfaces, sending SMS, validating/correcting some data ... etc. With iSeriesPython you can access the iSeries database at 2 ways: using File400 and/or db2 module. You can execute OS/400 commands and you can work with both QSYS.LIB members and IFS stream files. IMHO, iSeries Python is very powerful tool, more better than REXX included with iSeries. Try it!

iSeriesPython运行得非常好。我们从2005年(或更早的时候)开始在开发和生产环境中使用它作为一种实用语言,用于生成COBOL源代码、生成PCML接口、发送SMS、验证/纠正某些数据……在iSeriesPython中,您可以以两种方式访问iSeries数据库:使用File400和/或db2模块。您可以执行OS/400命令,并且可以使用这两个QSYS。LIB成员和IFS流文件。IMHO, iSeries Python是一个非常强大的工具,比包含在iSeries中的REXX要好得多。试一试!

#4


3  

I got permission to install iSeries Python on a box about 3 years ago. I found that it worked pretty much as advertised. I contacted the developer and he was very good about answering questions. However, before I could think about using it in production, I had to approach the developer regarding a support contract. That really isn't his gig, so he said no and we scrapped the idea. The main limitation I found is that it is several releases behind Python on other platforms.

大约三年前,我获得了在盒子上安装iSeries Python的许可。我发现它的效果和宣传的差不多。我联系了开发商,他非常善于回答问题。然而,在我考虑在生产中使用它之前,我必须与开发人员协商一个支持合同。那真的不是他的工作,所以他说不,我们放弃了这个想法。我发现的主要限制是它是在其他平台上的Python后面的几个版本。

I have also had very good experience with Jython on the iSeries. Java is completely supported on the iSeries. Theoretically, everything you can do in RPG on the iSeries, you can do in Java, which means you can do it in Jython. I was sending email from an AS/400 (old name for iSeries) via JPython (old name for Jython) and smtplib.py in 1999 or 2000.

我对iSeries上的Jython也有很好的经验。iSeries完全支持Java。理论上,在iSeries上的RPG中可以做的所有事情,都可以在Java中做,这意味着可以在Jython中做。我通过JPython (Jython的旧名)和smtplib从AS/400 (iSeries的旧名)发送电子邮件。在1999年或2000年。

#5


0  

Another place to look is on the mailing list MIDRANGE-L or search the archives for the list at midrange.com. I know they have talked about this a while back.

另一个可以查看的地方是邮件列表MIDRANGE-L或在midrange.com上搜索该列表的存档。我知道他们之前已经讨论过这个问题了。