I'm moving a bunch of scripts that do the import Zope, app=Zope.app() dance to 2.7. I added the configure call and things were find until I ran a script that had positional arguments. This gave me a "ERROR: positional arguments are not supported". This comes from zdoptions.py:226. Basically zdoptions.py is parsing sys.argv. I don't think it needs to do this from the Zope.configure call since it is getting the config from zope.conf. We could prevent the sys.argv parse by passing changing lib/python/Zope/Startup/run.py:39 to:

opts.realize(args=[], doc="Sorry, no option docs yet.", raise_getopt_errs=0)

It looks like all that zdoptions.py is looking for in sys.argv is its configfile. Since we passed this in to Zope.configure it doesn't seem nessesary. Would this mess other stuff up? I don't want zope parsing my script options!

-EAD


_______________________________________________
Zope-Dev maillist - [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to