Re: [Zope] Chrooted zope /dev requirements?

2006-05-19 Thread Tino Wildenhain
Michael Dexter wrote:
 
 Hello,
 
 Has anyone chrooted Zope/Python on OpenBSD or other and determined what
 minimum devices are required for correct functionality? Willing to
 share? :)

Well, all you need is python and the libs.
Otoh, what do you think you get from chrooting it? :-)

Zope should be compareable easy to chroot.

Regards
Tino
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] windows python differences

2006-05-19 Thread Tino Wildenhain
garry saddington wrote:
 This code on linux works without a problem
 
 ispell = os.popen(echo  + word +
 | /opt/scholarpack/ancillary/ispell/bin/ispell -a)
 ispell.readline
 sentence = ispell.readline()


What if the word is like `rm -rf /`  for example?
Doing something like that above is completely
creazy :( There are actually 3 different popen()
variants - 2 of them give you stdin too so you better
use this to write the word to ispells stdin.
Don't use echo or something like this!
...
 
 however on windows it throws a string index out of range at the
 sentence[0] constructs.
 
 the popen command on windows is:
 ispell=os.popen(echo +word+ \scholarpack\ancillary\ispell\bin\ispell
 -a)
 
 Anyone know what the difference is on the two platforms?

As Andreas already said (and you can easily see by
comparing the strings, can you? ;)
Python has os.path.join() to construct paths
for the actual platform.
(And since this is a 3rd party tool anyway, you
might want to make it configurable - of course not
via ZMI)

Regards
Tino
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] windows python differences

2006-05-19 Thread garry saddington
On Fri, 2006-05-19 at 06:06 +0200, Andreas Jung wrote:
 
 --On 18. Mai 2006 23:21:50 +0100 garry saddington 
 [EMAIL PROTECTED] wrote:
 hrows a string index out of range at the
  sentence[0] constructs.
 
  the popen command on windows is:
  ispell=os.popen(echo +word+ \scholarpack\ancillary\ispell\bin\ispell
  -a)
 
  Anyone know what the difference is on the two platforms?
 
 
 Is this a serious question? Window and Unix use completely different
 path names (\ vs /).
 
I know this as you can see. It is the returned value from readline that
seems to be different.
regards
Garry

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] windows python differences

2006-05-19 Thread garry saddington
On Fri, 2006-05-19 at 09:01 +0200, Tino Wildenhain wrote:
 garry saddington wrote:
  This code on linux works without a problem
  
  ispell = os.popen(echo  + word +
  | /opt/scholarpack/ancillary/ispell/bin/ispell -a)
  ispell.readline
  sentence = ispell.readline()
 
 
 What if the word is like `rm -rf /`
It is impossible for this to happen because of other controls in place.

   for example?
 Doing something like that above is completely
 creazy :( There are actually 3 different popen()
 variants - 2 of them give you stdin too so you better
 use this to write the word to ispells stdin.
 Don't use echo or something like this!
 ...
  
  however on windows it throws a string index out of range at the
  sentence[0] constructs.
  
  the popen command on windows is:
  ispell=os.popen(echo +word+ \scholarpack\ancillary\ispell\bin\ispell
  -a)
  
  Anyone know what the difference is on the two platforms?
 
 As Andreas already said (and you can easily see by
 comparing the strings, can you? ;)
 Python has os.path.join() to construct paths
 for the actual platform.
 (And since this is a 3rd party tool anyway, you
 might want to make it configurable - of course not
 via ZMI)
I am not bothered about the paths, that is not the question. Both
commands work in their respective environments. It is the sequence[0]
that throws the error so I am looking at differences in the way the
results are returned from ispell.readline()
regards
Garry

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] windows python differences

2006-05-19 Thread Gabriel Genellina

At Thursday 18/5/2006 19:21, garry saddington wrote:


This code on linux works without a problem

ispell = os.popen(echo  + word +
| /opt/scholarpack/ancillary/ispell/bin/ispell -a)
ispell.readline
sentence = ispell.readline()

if (sentence[0] == ''):


however on windows it throws a string index out of range at the
sentence[0] constructs.


Well, if 0 is out of range, the string is empty; readline() returns 
an empty string when it gets the EOF before any other thing. (You 
learn this by reading the Python documentation).

So, your popen() call gave you an empty file...


the popen command on windows is:
ispell=os.popen(echo +word+ \scholarpack\ancillary\ispell\bin\ispell
-a)


...which is not a surprise, given that command. You must duplicate 
back quotes inside a string, they are used as escape characters. 
Again, read the Python manuals...
Maybe you should investigate the several popen variants, using echo 
to construct the command is a bit crazy...



Anyone know what the difference is on the two platforms?


Surely! But this is not the problem here.



Gabriel Genellina
Softlab SRL 




__ 
Yahoo! Autos. Más de 3.000 vehículos vendidos por mes. 
¿Qué esperás para vender el tuyo? 
Hacelo ahora y ganate un premio de Yahoo! 
http://autos.yahoo.com.ar/vender/

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] windows python differences

2006-05-19 Thread Tino Wildenhain
garry saddington wrote:
 On Fri, 2006-05-19 at 09:01 +0200, Tino Wildenhain wrote:
 garry saddington wrote:
 This code on linux works without a problem

 ispell = os.popen(echo  + word +
 | /opt/scholarpack/ancillary/ispell/bin/ispell -a)
 ispell.readline
 sentence = ispell.readline()

 What if the word is like `rm -rf /`
 It is impossible for this to happen because of other controls in place.

Well Zope isnt PHP. You dont need to create potential security
problems if the fix is much more easier then your bunch of (untested)
code you believe prevents it from happen.

   for example?
 Doing something like that above is completely
 creazy :( There are actually 3 different popen()
 variants - 2 of them give you stdin too so you better
 use this to write the word to ispells stdin.
 Don't use echo or something like this!
 ...
 however on windows it throws a string index out of range at the
 sentence[0] constructs.
...

 I am not bothered about the paths, that is not the question. Both
 commands work in their respective environments. It is the sequence[0]
 that throws the error so I am looking at differences in the way the
 results are returned from ispell.readline()
 regards
 Garry


Well, what if you try it out in the interactive interpreter?
if sequence is an empty list, accessing [0] index will give
you that error you see. So your code above does not work
as expected. See also the comment regarding echo, Fred made.

Regards
Tino

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] windows python differences

2006-05-19 Thread Chris Withers

garry saddington wrote:


What if the word is like `rm -rf /`

It is impossible for this to happen because of other controls in place.


Gary,

Just to echo what others have said: this is all insane.

There are much better ways of communicating with other processes and 
spawning them off. In Zope 2.9, you have Python 2.4's subprocess module 
which will let you set up nice pipes to communicate without opening 
unnecessary gaping security holes.


Even so, there are other examples of using spell checkers which will 
help you a little in the don't-blow-my-foot-off department...


cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] what is the tag to get Zope 2.8.x per svn

2006-05-19 Thread robert rottermann

I would like to get  Zope 2.8.x per svn. (its head so to speak)
how can I do that
tahnks
robert
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] what is the tag to get Zope 2.8.x per svn

2006-05-19 Thread Andreas Jung



--On 19. Mai 2006 16:19:37 +0200 robert rottermann [EMAIL PROTECTED] wrote:


I would like to get  Zope 2.8.x per svn. (its head so to speak)
how can I do that
tahnks



http://www.zope.org/DevHome/Subversion/ZopeSVNFAQ

http://svn.zope.org/Zope/tags/Zope-2-8-6/

Cheers,
-aj


--
ZOPYX Ltd.  Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope  Plone development, Consulting


pgpf7FpcwFnZi.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: what is the tag to get Zope 2.8.x per svn

2006-05-19 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

robert rottermann wrote:
 I would like to get  Zope 2.8.x per svn. (its head so to speak)
 how can I do that

 $ svn ls svn+ssh://svn.zope.org/repos/main/Zope/branches | grep 8
 Zope-2_8-branch/
 tseaver-2.8-external_test/
 $ svn co \
   svn+ssh://svn.zope.org/repos/main/Zope/branches/Zope-2_8-branch


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEbevh+gerLs4ltQ4RAlHCAJ9ZwwBz1HX2LnaqqVsBX8wKaZMtTwCePNIR
uio9yyWIhC3QE+E7MQ5DkG8=
=t7GJ
-END PGP SIGNATURE-

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )