[Zope] Re: Tab completion in zopectl debug
Tres Seaver
tseaver at palladion.com
Wed Oct 18 15:44:18 EDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Maurits van Rees wrote:
> Hi,
>
> I have recently learned how to add tab completion to an interactive
> python session and to pdb, thanks to Tom Lazar and to Jacob at
> ParTecs. More info with links on my first blog entry in three months:
>
> http://maurits.vanrees.org/weblog/2006/10/tab-completion.html
>
> At the end of that entry I ask a question: Can we add tab completion
> to the zopectl debugger? Or actually more general: can we load the
> ~/.pythonrc.py file when the zopectl debugger is started? In that
> file, the user can arrange tab completion or anything else he wants to
> have available for interactive python sessions.
>
> It is very easy to do: just add 'import user;' to the command line in
> the do_debug function of $SOFTWARE_HOME/Zope2/Startup/zopectl.py. For
> details, see that blog entry.
>
> I don't think there are security risks (but don't take my word for
> it). If someone can put malicious python code in that rc file, than
> that someone could just as easily start a python session and enter the
> malicious code there.
>
>
> This would just be for convenience. Would this be enough of a
> convenience to put into the Zope source code?
+1. The original version of zopectl actually supported this, along with
persistent command-line history: the person who rewrote it didn't
actually use it, and so left a number of those features out ('test',
'run', and 'debug' have all been added back in).
Tres.
- --
===================================================================
Tres Seaver +1 202-558-7113 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFNoQS+gerLs4ltQ4RAsrFAJ0b8rJ/gNpEkobWkT99XZhErAUZmgCgzKq2
yLElkaygeEay8mf8NDi2Wxw=
=U2N1
-----END PGP SIGNATURE-----
More information about the Zope
mailing list