[Python-ideas] Making Python more enterprise technology

Jim Jewett jimjjewett at gmail.com
Mon May 10 16:04:22 CEST 2010


On Mon, May 10, 2010 at 9:44 AM, Bruce Frederiksen <dangyogi at gmail.com> wrote:
> On Sun, May 9, 2010 at 11:28 PM, Jim Jewett <jimjjewett at gmail.com> wrote:

>> [...]  In python, I can reset the values of sys.*, and it will
>> affect other programs running on the same virtual machine.

> I'm a bit confused by what you are trying to say.

> By "virtual machine", do you mean the python byte code interpretor?

Yes.

> But generally each instance of the python virtual machine only
> runs one program.

"Not done in practice" isn't a sufficiently strong argument to get a
new infrastructure technology past an architectural board.  (A single
product which happens to use or embed python, yes.  Approval of python
for developing new internal products, no.)

> ... what mechanism are you thinking is used to reset these values?
> Patching a file in the python library directory?

That would be a problem, but probably acceptable.

The real concern is that running code can, for example, change the
value of sys.stdout, and other programs will see that newly modified
value.

And, again, the fact that they wouldn't normally be running in the
same process anyhow doesn't seem to be sufficient answer.  In some
ways, this is just a FUD argument, but ... monkeypatching really *is*
a pain for various audits and separations of authority.  A variant to
the python module type that prevents monkeypatching (and using that
variant for the builtin libraries) might make some difference.

-jJ



More information about the Python-ideas mailing list