[Zope] Re: Backporting for PHParser to Zope-2.3.3

Maik Jablonski maik.jablonski@uni-bielefeld.de
Thu, 25 Apr 2002 14:48:35 +0200


hi dirk,

if I remember right, popen2 was not a method of 'os' in 1.5.2...

so:
- look for something equivalent to popen2 in 1.5.2...:-)
or
- backport popen2 to 1.5.2...:-(
or
- upgrade to Zope-2.5x ... (it's really nice) ;-)

greetings, maik.

Dirk Datzert wrote:
> Hi Maik,
> hi all,
> 
> I want to backport PHParser to Zope-2.3.3 with Python 1.5.2.
> 
> I currently have the problem that the following code:
> 
>        (stin,stout)=popen2(PHPath)
>          from zLOG import LOG, INFO
>          LOG("PHPParser", INFO, "stin %s" %stin)
>          LOG("PHPParser", INFO, "stout %s" %stout)
>          stin.write('<?php $PHP_SELF="%s"; ?>' % (self.absolute_url()))
> 
> will give error:
> 
> An error was encountered while publishing this resource. 
> 
> Error Type: IOError
> Error Value: [Errno 9] Bad file descriptor
> 
> 
> From the log:
> 
> 2002-04-25T11:10:04 INFO(0) PHPParser stin <open file '(fdopen)', mode 'r' at 8bff
> e90>
> ------
> 2002-04-25T11:10:04 INFO(0) PHPParser stout <open file '(fdopen)', mode 'w' at 8bf
> dd20>
> 
> I would say that everything is OK in the code, but Zope/Python has an other opinion.
> 
> Has anybody a guess for me ?
> 
> Thanks,
> Dirk



-- 
maik jablonski                    http://www.sachunterricht-online.de
  universitaet bielefeld          http://www.zfl.uni-bielefeld.de
   zentrum fuer lehrerbildung    tlph://+49.(0).521.106.4234