Python interpreter error: unsupported operand type(s) for |:

2005-08-11 Thread yaffa
hey folks i get this error: Python interpreter error: unsupported operand type(s) for |: when i run this line of code: for incident in bs('tr', {'bgcolor' : '#ee'} | {'bgcolor' : 'white'} ): any idea what i'm doing wrong here? tha

Tiny Python interpreter

2005-08-10 Thread Lucas Correia Villa Real
Hello, I'm working with an ARM cpu which has only 64MB of flash memory available for storing applications. This system is running with an X server, some office applications and now I need to have a small Python interpreter, too (Python 2.2 is fine). I've googled a bit for the subjec

Re: Running Python interpreter in Emacs

2005-07-02 Thread Rex Eastbourne
Yes, I knew that copying it to my root was a kludge. But between that and not having it work, I chose the former. (As you might be able to tell from my posts, I tried multiple things and was frustrated.) I tried putting quotes around "c:\program files\python24". It still didn't work. I chose to in

Re: Running Python interpreter in Emacs

2005-07-01 Thread John Machin
Rex Eastbourne wrote: > Yes! Thank you so much! (For some reason, by the way, I had to copy > python.exe to my c:/ directory, No, you did _not_ need to copy it there. You did _not_ need to copy it anywhere. Didn't copying an executable to your root directory [on any operating system] strike you

Re: Running Python interpreter in Emacs

2005-07-01 Thread Rex Eastbourne
Yes! Thank you so much! (For some reason, by the way, I had to copy python.exe to my c:/ directory, since the computer could never find the path in program files/python24. But when I did that, and used setq-py-python-command, it worked. I now have python.exe in two locations.) -- http://mail.pyth

Re: Running Python interpreter in Emacs

2005-07-01 Thread Piet van Oostrum
> "Rex Eastbourne" <[EMAIL PROTECTED]> (RE) wrote: >RE> I went to My Computer | Properties | Advanced | Environment Variables >RE> and added c:\program files\python24 to both the PYTHONPATH and Path >RE> variables. Still no luck. I don't know whether the path I'm talking >RE> about is the same

RE: Running Python interpreter in Emacs

2005-06-27 Thread Sells, Fred
binding nil) ;; ;; (require 'hilit19) ;; )) ;; ;; Hilit stuff ;; ;;(cond (window-system ;; (setq hilit-mode-enable-list '(not text-mode) ;; hilit-background-mode 'light ;; hilit-inhibit-hooks nil ;; hilit-inhibit-rebinding ni

Re: Running Python interpreter in Emacs

2005-06-26 Thread Philippe C. Martin
Hi, I was refering to the Windows $PATH which you can modify in the same dialog. To make sure it's done properly, open a console (cmd.exe) and type python Regards, Philippe Rex Eastbourne wrote: > I went to My Computer | Properties | Advanced | Environment Variables > and added c:\program fil

Re: Running Python interpreter in Emacs

2005-06-26 Thread Rex Eastbourne
I went to My Computer | Properties | Advanced | Environment Variables and added c:\program files\python24 to both the PYTHONPATH and Path variables. Still no luck. I don't know whether the path I'm talking about is the same as the $PATH you referred to, or whether I'm supposed to put python.exe exp

Re: Running Python interpreter in Emacs

2005-06-24 Thread Philippe C. Martin
I do not think there is any need to tell emacs where Python is; besides having python.exe in your Windows $PATH. Regards, Philippe Rex Eastbourne wrote: > I have the following in my .emacs: > > (add-to-list 'load-path "C:\Program Files\Python24") > > Is that enough? I didn't see anything s

Re: Running Python interpreter in Emacs

2005-06-24 Thread Rex Eastbourne
I have the following in my .emacs: (add-to-list 'load-path "C:\Program Files\Python24") Is that enough? I didn't see anything similar to that in your .emacs file, so I'm wondering if I'm supposed to add the path to my PATH elsewhere. Thanks, Rex -- http://mail.python.org/mailman/listinfo/pyth

Re: Running Python interpreter in Emacs

2005-06-24 Thread Philippe C. Martin
Hi, Since I'm a Linux user, I went through the following procedure: I installed emacs 20.7.1 and Python 2.4 I installed python-mode 1.0A into site-lisp I added c:\python24 to my path I put this .emacs on c:\ (see further down - I'm sure you don't need half of it) And everyhing is working fine:

Re: Running Python interpreter in Emacs

2005-06-23 Thread Rex Eastbourne
Hi Skip and Philippe. I added the path for Python to PATH, but I still get the same message (when I try executing the current buffer, I get the message: "The system cannot find the path specified." Philippe, I have the above lines of code in my .emacs file. As for my environment, I'm running Emac

Re: Running Python interpreter in Emacs

2005-06-23 Thread Philippe C. Martin
t (if the point is to have access to the output). Regards, Philippe Rex Eastbourne wrote: > Hi, > > I'm interested in running a Python interpreter in Emacs. I have Python > extensions for Emacs, and my python menu lists "C-c !" as the command > to run the inte

Re: Running Python interpreter in Emacs

2005-06-23 Thread Skip Montanaro
Rex> I'm interested in running a Python interpreter in Emacs. I have Rex> Python extensions for Emacs, and my python menu lists "C-c !" as Rex> the command to run the interpreter. Yet when I run it I get the Rex> message "Spawning Child Process: i

Running Python interpreter in Emacs

2005-06-23 Thread Rex Eastbourne
Hi, I'm interested in running a Python interpreter in Emacs. I have Python extensions for Emacs, and my python menu lists "C-c !" as the command to run the interpreter. Yet when I run it I get the message "Spawning Child Process: invalid argument." What do I need to do

Re: Running in Release or Debug version of the python interpreter?

2005-05-25 Thread Raphael Zulliger
here no debug/release version issues like on windows? doesn't import the python2.4-dbg (debian) binary different modules than python2.4? Raphael Zulliger Thomas Heller wrote: > Raphael Zulliger schrieb: > >> Hi >> >> I have to check wheter a .py script is run within

Re: Running in Release or Debug version of the python interpreter?

2005-05-24 Thread Thomas Heller
Raphael Zulliger schrieb: > Hi > > I have to check wheter a .py script is run within the debug or the > release version of an embedded python interpreter (in short, wheter > python24_d.dll or python24.dll is in use). > > long version: I'm using ctypes to load

Re: Running in Release or Debug version of the python interpreter?

2005-05-24 Thread Fredrik Lundh
Raphael Zulliger wrote: long version: I'm using ctypes to load my own dll. There exists 2 > version of this dll - a debug and a release version (where one is linked > against debug C runtime dll and the other to release C runtime dll). Now > I have to change the name of the dll I want to be loaded

Running in Release or Debug version of the python interpreter?

2005-05-24 Thread Raphael Zulliger
Hi I have to check wheter a .py script is run within the debug or the release version of an embedded python interpreter (in short, wheter python24_d.dll or python24.dll is in use). long version: I'm using ctypes to load my own dll. There exists 2 version of this dll - a debug and a re

Re: Python interpreter in Basic or a Python-2-Basic translator.

2005-05-02 Thread rrr
On 1 May 2005 at 6:18, Engineer wrote: > The security 'droids have decided that since the MS Office Suite is a > "standard" application then software written in MS Office VBA must be > "safe." Any other development environments (such as Java, Perl, > Cygwin) are "unsafe" and can't be installed.

Re: My personal candidate for QOTW (was: Python interpreter in Basic or a Python-2-Basic translator.)

2005-05-01 Thread Lee Cullens
From: Leif Biberg Kristensen <[EMAIL PROTECTED]> Date: May 1, 2005 2:13:43 PM EDT To: python-list@python.org Subject: Re: My personal candidate for QOTW (was: Python interpreter in Basic or a Python-2-Basic translator.) Cameron Laird skrev: In article <[EMAIL PROTECTED]>, Engi

Re: Python interpreter in Basic or a Python-2-Basic translator.

2005-05-01 Thread Jeremy Bowers
On Sun, 01 May 2005 06:18:27 -0700, Engineer wrote: > The security 'droids have decided that since the MS Office Suite is a > "standard" application then software written in MS Office VBA must be > "safe." "Melissa". (Google hint: "Virus".) Given the brazen stupidity demonstrated by these decisio

Re: Python interpreter in Basic or a Python-2-Basic translator.

2005-05-01 Thread Do Re Mi chel La Si Do
Hi ! VBA is at the end of his lifetime. The next MS-Office will not have VBA (because dotNet). You should really adopt Python. @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: My personal candidate for QOTW (was: Python interpreter in Basic or a Python-2-Basic translator.)

2005-05-01 Thread Leif Biberg Kristensen
Cameron Laird skrev: > In article <[EMAIL PROTECTED]>, > Engineer <[EMAIL PROTECTED]> wrote: > . > . > . >>The security 'droids have decided that since the MS Office Suite is a >>"standard" application then software written in MS Office VBA must be >>"safe." Any other development environments (su

Re: My personal candidate for QOTW (was: Python interpreter in Basic or a Python-2-Basic translator.)

2005-05-01 Thread [EMAIL PROTECTED]
Cameron Laird wrote: > In article <[EMAIL PROTECTED]>, > Engineer <[EMAIL PROTECTED]> wrote: > . > . > . > >The security 'droids have decided that since the MS Office Suite is a > >"standard" application then software written in MS

My personal candidate for QOTW (was: Python interpreter in Basic or a Python-2-Basic translator.)

2005-05-01 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Engineer <[EMAIL PROTECTED]> wrote: . . . >The security 'droids have decided that since the MS Office Suite is a >"standard" application then software written in MS Office VBA must be >"safe." A

Re: Python interpreter in Basic or a Python-2-Basic translator.

2005-05-01 Thread Larry Bates
installation" of the Python interpreter, use py2exe to convert your app to an .EXE file with some supporting .DLL files and use Inno Installer to turn it all into a single setup.exe file that can be distributed. Then you can install on machines without doing Python installation. Otherwise, bite

Python interpreter in Basic or a Python-2-Basic translator.

2005-05-01 Thread Engineer
I'm looking for a Python interpreter written in BASIC, preferably Visual Basic, and one written in VBA would be best of all. An alternative would be a Python-2-Basic compiler. Unfortunately I have to develop some special purpose code in an organization where my only development environme

Re: How to reload local namespace definitions in the python interpreter?

2005-04-04 Thread Steve Holden
Bill Mill wrote: On Apr 4, 2005 11:10 AM, Steve Holden <[EMAIL PROTECTED]> wrote: Tim Jarman wrote: [EMAIL PROTECTED] wrote: Hi, I am a beginner using the python interpreter. To reduce typing effort, I created a module called "aliases.py" containing some aliases for objects I c

Re: How to reload local namespace definitions in the python interpreter?

2005-04-04 Thread Bill Mill
On Apr 4, 2005 11:10 AM, Steve Holden <[EMAIL PROTECTED]> wrote: > Tim Jarman wrote: > > [EMAIL PROTECTED] wrote: > > > > > >>Hi, > >> > >>I am a beginner using the python interpreter. To reduce typing effort, > >>I created a modul

Re: How to reload local namespace definitions in the python interpreter?

2005-04-04 Thread Steve Holden
Tim Jarman wrote: [EMAIL PROTECTED] wrote: Hi, I am a beginner using the python interpreter. To reduce typing effort, I created a module called "aliases.py" containing some aliases for objects I commonly use like - aliases.py : import filecmp, os, commands op = os.path go = commands.ge

Re: How to reload local namespace definitions in the python interpreter?

2005-04-02 Thread Tim Jarman
[EMAIL PROTECTED] wrote: > Hi, > > I am a beginner using the python interpreter. To reduce typing effort, > I created a module called "aliases.py" containing some aliases for > objects I commonly use like - > > aliases.py : > > > import file

How to reload local namespace definitions in the python interpreter?

2005-04-02 Thread test1dellboy3
Hi, I am a beginner using the python interpreter. To reduce typing effort, I created a module called "aliases.py" containing some aliases for objects I commonly use like - aliases.py : import filecmp, os, commands op = os.path go = commands.getoutput dc = filecmp.dircmp p1 = &#

Re: Python interpreter error: unsupported operand type(s) for -: 'tuple' and 'int'

2005-03-30 Thread Rakesh
George Yoshida wrote: > Rakesh wrote: > > > To quote a much smaller trimmed-down example, here is how it looks > > like: > > ## --- > > # Entry Point to the whole program > > ## --- > > def main(): > >

Re: Python interpreter error: unsupported operand type(s) for -: 'tuple' and 'int'

2005-03-29 Thread George Yoshida
Rakesh wrote: > To quote a much smaller trimmed-down example, here is how it looks > like: > ## --- > # Entry Point to the whole program > ## --- > def main(): > mylist = GenerateList() > minnumber = min

Re: Python interpreter error: unsupported operand type(s) for -: 'tuple' and 'int'

2005-03-29 Thread Rakesh
To quote a much smaller trimmed-down example, here is how it looks like: <--> import sys ## ## def GenerateList(): array = ' ' for i in xrange(10): array = (array, i) return array ## --

Python interpreter error: unsupported operand type(s) for -: 'tuple' and 'int'

2005-03-29 Thread Rakesh
In my Python code fragment, I want to write a code fragment such that the minimum element of a tuple is subtracted from all the elements of a given tuple. When I execute the following python script I get the following interpreter error. C:\>python test.py 200 ddf DNEWS Version 5.7b1,, S0, posti

Modifying the Python interpreter to create a custom secure version

2005-03-05 Thread Gouda Man
Hey everyone, I'm embedding the Python interpreter within my program to use as a scripting language. However, one of the unique features of our program is the ability of the internal language to possess per-object security permissions and restricted execution. Therefore, we need to add

Re: Attaching to a Python Interpreter a la Tcl

2005-02-24 Thread Jeff Epler
Cameron Laird mentioned Tk's send working with Python; if you are writing your app with Tkinter, here is some code to let you use tcl commands like send python for remote control. You could build a more sophisticated front-end for this, and you'll probably also want to add stuff like sending

Re: Attaching to a Python Interpreter a la Tcl

2005-02-23 Thread Stephen Thorne
On 23 Feb 2005 02:37:48 -0800, DE <[EMAIL PROTECTED]> wrote: > Hello, > > Some long time ago, I used to use Tcl/Tk. I had an tcl embedded into my > app. > > The coolest thing was however, I was able to attach to the interpreter > (built in to my app) via a tcl shell in which I could type in regul

Re: Attaching to a Python Interpreter a la Tcl

2005-02-23 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Robin Becker <[EMAIL PROTECTED]> wrote: >DE wrote: >> Hello, >> >> Some long time ago, I used to use Tcl/Tk. I had an tcl embedded into my >> app. >> >> The coolest thing was however, I was able to attach to the interpreter >> (built in to my app) via a tcl shell

Re: Attaching to a Python Interpreter a la Tcl

2005-02-23 Thread Ville Vainio
> "fuzzyman" == Fuzzyman <[EMAIL PROTECTED]> writes: fuzzyman> Do you mean making the interpreter available from within fuzzyman> a Python app ? There are various ways of doing that - fuzzyman> you can see the SPE editor which uses pycrust as one fuzzyman> example. http://spe

Re: Attaching to a Python Interpreter a la Tcl

2005-02-23 Thread Fuzzyman
Do you mean making the interpreter available from within a Python app ? There are various ways of doing that - you can see the SPE editor which uses pycrust as one example. http://spe.pycs.net You could also embed IPython for a good interface to the interpreter. http://ipython.scipy.net Regards,

Re: Attaching to a Python Interpreter a la Tcl

2005-02-23 Thread Robin Becker
DE wrote: Hello, Some long time ago, I used to use Tcl/Tk. I had an tcl embedded into my app. The coolest thing was however, I was able to attach to the interpreter (built in to my app) via a tcl shell in which I could type in regular tcl code which would be interpreted by the interpreter of my app

Attaching to a Python Interpreter a la Tcl

2005-02-23 Thread DE
Hello, Some long time ago, I used to use Tcl/Tk. I had an tcl embedded into my app. The coolest thing was however, I was able to attach to the interpreter (built in to my app) via a tcl shell in which I could type in regular tcl code which would be interpreted by the interpreter of my application

Re: Crashing Python interpreter! (windows XP, python2.3.4, 2.3.5rc1, 2.4.0)

2005-02-04 Thread Nick Coghlan
Christos TZOTZIOY Georgiou wrote: 5. XP really knows better than you and by default does not search in system folders. I killed that oh-so-friendly search dog on day 2 of acquainting myself with Windows XP last September, so I can't readily say where is the setting if your dog is enabled, but if y

Re: Crashing Python interpreter! (windows XP, python2.3.4, 2.3.5rc1, 2.4.0)

2005-02-04 Thread TZOTZIOY
On 3 Feb 2005 15:58:01 -0800, rumours say that "John Machin" <[EMAIL PROTECTED]> might have written: >> I don't know why searching all drives using windows 'search' did not >find the file! > >Possibilities: >1. You have a virus that renames the drwtsn32.log file for the duration >of a search. >2.

Re: Crashing Python interpreter! (windows XP, python2.3.4, 2.3.5rc1, 2.4.0)

2005-02-03 Thread John Machin
Leeuw van der, Tim wrote: > > > > > > -Original Message- > > From: [EMAIL PROTECTED] on behalf of John Machin > > Sent: Thu 2/3/2005 12:00 PM > > To: python-list@python.org > > Subject: Re: Crashing Python interpreter! (windows XP, python2.3.4,

Re: Crashing Python interpreter! (windows XP, python2.3.4, 2.3.5rc1, 2.4.0)

2005-02-03 Thread John Machin
Leeuw van der, Tim wrote: > > > > > > -Original Message- > > From: [EMAIL PROTECTED] on behalf of John Machin > > Sent: Thu 2/3/2005 12:00 PM > > To: python-list@python.org > > Subject: Re: Crashing Python interpreter! (windows XP, python2.3.4,

RE: Crashing Python interpreter! (windows XP, python2.3.4, 2.3.5rc1, 2.4.0)

2005-02-03 Thread Leeuw van der, Tim
> > > -Original Message- > From: [EMAIL PROTECTED] on behalf of John Machin > Sent: Thu 2/3/2005 12:00 PM > To: python-list@python.org > Subject: Re: Crashing Python interpreter! (windows XP, python2.3.4, > 2.3.5rc1,2.4.0) > > > Leeuw van der, Ti

Re: Crashing Python interpreter! (windows XP, python2.3.4, 2.3.5rc1, 2.4.0)

2005-02-03 Thread John Machin
Leeuw van der, Tim wrote: > >> > Do you have a file called drwtsn32.log anywhere on your computer? > > No, unfortunately I cannot find such file anywhere on my computer > > What do I do to get such file? Or anything equally useful? > On my Windows 2000 box, just crash something :-) Perhaps t

RE: Crashing Python interpreter! (windows XP, python2.3.4, 2.3.5rc1, 2.4.0)

2005-02-02 Thread Leeuw van der, Tim
-Original Message- From: [EMAIL PROTECTED] on behalf of John Machin Sent: Thu 2/3/2005 12:03 AM To: python-list@python.org Subject: Re: Crashing Python interpreter! (windows XP, python2.3.4, 2.3.5rc1,2.4.0) > Leeuw van der, Tim TOP-POSTED: > > Hi all, > > [...] > &

Re: Crashing Python interpreter! (windows XP, python2.3.4, 2.3.5rc1, 2.4.0)

2005-02-02 Thread John Machin
Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Stefan Behnel > Sent: Wednesday, February 02, 2005 3:59 PM > To: python-list@python.org > Subject: Re: Crashing Python interpreter! (windows XP, python2.3.4, 2.3.5rc1, 2.4.0) > > Leeuw van der, Tim

RE: Crashing Python interpreter! (windows XP, python2.3.4, 2.3.5rc1, 2.4.0)

2005-02-02 Thread Leeuw van der, Tim
dnesday, February 02, 2005 3:59 PM To: python-list@python.org Subject: Re: Crashing Python interpreter! (windows XP, python2.3.4, 2.3.5rc1, 2.4.0) Leeuw van der, Tim schrieb: > I'm using the following combination of software: > - Pydev Eclipse plugin (pydev 0.8.5) > - eclipse 3.0.1

Re: Crashing Python interpreter! (windows XP, python2.3.4, 2.3.5rc1, 2.4.0)

2005-02-02 Thread Stefan Behnel
? Try to start the interpreter in a command line window and see if it happens there, too. That eliminates Eclipse. When trying to get a list of possible completions for the 'gtk' import object, the python interpreter crashes. Happens with all versions listed in the subject: python

Crashing Python interpreter! (windows XP, python2.3.4, 2.3.5rc1, 2.4.0)

2005-02-02 Thread Leeuw van der, Tim
Hi, I'm using the following combination of software: - Pydev Eclipse plugin (pydev 0.8.5) - eclipse 3.0.1 - windows XP SP1 - pygtk 2.4.1 - GTK 2.6.1 (for windows32 native) When trying to get a list of possible completions for the 'gtk' import object, the python interpreter c

Re: Embedding a restricted python interpreter

2005-01-17 Thread Dieter Maurer
Paul Rubin writes on 08 Jan 2005 14:56:43 -0800: > Dieter Maurer <[EMAIL PROTECTED]> writes: > > It uses a specialized compiler that prevents dangerous bytecode operations > > to be generated and enforces a restricted builtin environment. > > Does it stop the user fr

Re: [Fwd: Re: Embedding Multiplr Python interpreter in C++]

2005-01-15 Thread Craig Ringer
On Fri, 2005-01-14 at 22:42, Steve Holden wrote: > Take a look at mod_python's code: that allows several independent > interpreters in the same Apache process using Py_NewInterpreter() I've never been entirely clear on whether mod_python does its magic by relying on having one thread per sub-int

[Fwd: Re: Embedding Multiplr Python interpreter in C++]

2005-01-14 Thread Steve Holden
Yogesh Sharma <[EMAIL PROTECTED]> wrote: > one more question to add: > Is there a way to have 2 local copies of python interpreter ? > > Yogesh Sharma wrote: >> Hi, >> >> I have following setup: >> OS Linux Fedora Core 3 >> Python 2.3.4 >&g

Re: Embedding Multiplr Python interpreter in C++

2005-01-13 Thread Yogesh Sharma
one more question to add: Is there a way to have 2 local copies of python interpreter ? Yogesh Sharma wrote: Hi, I have following setup: OS Linux Fedora Core 3 Python 2.3.4 How can I embed two python interpreters in one C++ program ? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Embedding Multiplr Python interpreter in C++

2005-01-13 Thread Yogesh Sharma
Hi, I have following setup: OS Linux Fedora Core 3 Python 2.3.4 How can I embed two python interpreters in one C++ program ? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Embedding a restricted python interpreter

2005-01-08 Thread Paul Rubin
Dieter Maurer <[EMAIL PROTECTED]> writes: > It uses a specialized compiler that prevents dangerous bytecode operations > to be generated and enforces a restricted builtin environment. Does it stop the user from generating his own bytecode strings and demarshalling them? -- http://mail.python.

Re: Embedding a restricted python interpreter

2005-01-08 Thread Dieter Maurer
Doug Holton <[EMAIL PROTECTED]> writes on Thu, 06 Jan 2005 20:34:31 -0600: > ... > Hi, there is a page on this topic here: > http://www.python.org/moin/SandboxedPython > > The short answer is that it is not possible to do this with the > CPython, but you can run sandboxed code on other virtual mac

Re: Embedding a restricted python interpreter

2005-01-07 Thread Peter Maas
Paul Rubin schrieb: Best solution would probably be to create a thread for each request that can operate only with the id of an authenticated user. But this seems to be a problem with Apache or with Linux? Threads wouldn't do it--you'd need separate processes. For example, multiple threads in the

Re: Embedding a restricted python interpreter

2005-01-06 Thread Craig Ringer
On Thu, 2005-01-06 at 23:40, Steve Holden wrote: > Jp Calderone wrote: > > [...] > > > > > > A Python sandbox would be useful, but the hosting provider's excuse > > for not allowing you to use mod_python is completely bogus. All the > > necessary security tools for that situation are provide

Re: Embedding a restricted python interpreter

2005-01-06 Thread Craig Ringer
On Thu, 2005-01-06 at 23:05, Peter Maas wrote: > Craig Ringer schrieb: > It would certainly be difficult to track all harmful code constructs. > But AFAIK the idea of a sandbox is not to look at the offending code > but to protect the offended objects: files, databases, URLs, sockets > etc. and to

Re: Embedding a restricted python interpreter

2005-01-06 Thread Doug Holton
Rolf Magnus wrote: Hi, I would like to embed a python interpreter within a program, but since that program would be able to automatically download scripts from the internet, I'd like to run those in a restricted environment, which basically means that I want to allow only a specific set of mo

Re: Embedding a restricted python interpreter

2005-01-06 Thread Michael Sparks
Rolf Magnus wrote: > I would like to embed a python interpreter within a program, but since > that program would be able to automatically download scripts from the > internet, I'd like to run those in a restricted environment, which > basically means that I want to allow only

Re: Embedding a restricted python interpreter

2005-01-06 Thread Paul Rubin
Gerhard Haering <[EMAIL PROTECTED]> writes: > > But mod_python is an apache module and runs in the same apache process > > with other users' scripts. > > Which is why it's a good idea for each customer to have it's own > system user and their virtual hosts running under this uid. Which > was the i

Re: Embedding a restricted python interpreter

2005-01-06 Thread Paul Rubin
Peter Maas <[EMAIL PROTECTED]> writes: > I think PHP has a safe mode which solves the probem of isolating > scripts of different users on application level. This is not optimal > but better than nothing. Best solution would probably be to create > a thread for each request that can operate only wit

Re: Embedding a restricted python interpreter

2005-01-06 Thread Peter Maas
Jp Calderone schrieb: But mod_python is an apache module and runs in the same apache process with other users' scripts. I am uncertain as to how this differs from mod_php (the alternative discussed in the OP's story). I've been away from PHP for a while, so perhaps mod_php has gained some fea

Re: Embedding a restricted python interpreter

2005-01-06 Thread Bengt Richter
On Thu, 6 Jan 2005 16:53:23 +0100, Gerhard Haering <[EMAIL PROTECTED]> wrote: > >--rwEMma7ioTxnRzrJ >Content-Type: text/plain; charset=us-ascii >Content-Disposition: inline >Content-Transfer-Encoding: quoted-printable > >On Thu, Jan 06, 2005 at 07:32:25AM -0800, Paul Rubin wrote: >> Jp Calderone <

Re: Embedding a restricted python interpreter

2005-01-06 Thread Gerhard Haering
On Thu, Jan 06, 2005 at 07:32:25AM -0800, Paul Rubin wrote: > Jp Calderone <[EMAIL PROTECTED]> writes: > > A Python sandbox would be useful, but the hosting provider's excuse > > for not allowing you to use mod_python is completely bogus. All the > > necessary security tools for that situation

Re: Embedding a restricted python interpreter

2005-01-06 Thread Jp Calderone
On 06 Jan 2005 07:32:25 -0800, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote: >Jp Calderone <[EMAIL PROTECTED]> writes: > > A Python sandbox would be useful, but the hosting provider's excuse > > for not allowing you to use mod_python is completely bogus. All the > > necessary security too

Re: Embedding a restricted python interpreter

2005-01-06 Thread Steve Holden
Jp Calderone wrote: [...] A Python sandbox would be useful, but the hosting provider's excuse for not allowing you to use mod_python is completely bogus. All the necessary security tools for that situation are provided by the platform in the form of process and user separation. Not sure this

Re: Embedding a restricted python interpreter

2005-01-06 Thread Paul Rubin
Jp Calderone <[EMAIL PROTECTED]> writes: > A Python sandbox would be useful, but the hosting provider's excuse > for not allowing you to use mod_python is completely bogus. All the > necessary security tools for that situation are provided by the > platform in the form of process and user sepa

Re: Embedding a restricted python interpreter

2005-01-06 Thread Jp Calderone
On Thu, 06 Jan 2005 16:05:50 +0100, Peter Maas <[EMAIL PROTECTED]> wrote: >Craig Ringer schrieb: > > That is my understanding. In fact, I'd say with Python it's nearly > > impossible given how dynamic everything is and the number of tricks that > > can be used to obfuscate what you're doing. Think

Re: Embedding a restricted python interpreter

2005-01-06 Thread Peter Maas
Craig Ringer schrieb: That is my understanding. In fact, I'd say with Python it's nearly impossible given how dynamic everything is and the number of tricks that can be used to obfuscate what you're doing. Think of the fun that can be had with str.encode / str.decode and getattr/hasattr . It would

Re: Embedding a restricted python interpreter

2005-01-05 Thread Andy Gross
need sandboxing, your probably out of luck. Setting up a usermode linux instance or chrooted jail is probably the best bet today. /arg On Jan 4, 2005, at 6:38 PM, Rolf Magnus wrote: Hi, I would like to embed a python interpreter within a program, but since that program would be able to automat

Re: Embedding a restricted python interpreter

2005-01-05 Thread Fuzzyman
Fredrick Lundh (at www.effbot.org ) was working on a 'cut down python' that only implements the bits of python he likes !! It would be great if the core of that interpreter could be used as a 'restricted interpreter'. If you could externally disable os, sys, os.path modules etc and limit the set

Re: Embedding a restricted python interpreter

2005-01-04 Thread Paul Rubin
Maurice LING <[EMAIL PROTECTED]> writes: > I won't really count on that. In my opinions, which may be wrong, > Python is not constructed to work in a sandbox like Java. Java does it > by subjecting all classes that it loads through a security > manager. What you seems to want is a Python to have Ja

Re: Embedding a restricted python interpreter

2005-01-04 Thread Craig Ringer
On Wed, 2005-01-05 at 13:43, Maurice LING wrote: > Rolf Magnus wrote: > > Hi, > > > > I would like to embed a python interpreter within a program, but since that > > program would be able to automatically download scripts from the internet, > > I'd like to

Re: Embedding a restricted python interpreter

2005-01-04 Thread Maurice LING
Rolf Magnus wrote: Hi, I would like to embed a python interpreter within a program, but since that program would be able to automatically download scripts from the internet, I'd like to run those in a restricted environment, which basically means that I want to allow only a specific set of mo

Re: Embedding a restricted python interpreter

2005-01-04 Thread Paul Rubin
Rolf Magnus <[EMAIL PROTECTED]> writes: > I would like to embed a python interpreter within a program, but since that > program would be able to automatically download scripts from the internet, > I'd like to run those in a restricted environment, which basically means > th

Embedding a restricted python interpreter

2005-01-04 Thread Rolf Magnus
Hi, I would like to embed a python interpreter within a program, but since that program would be able to automatically download scripts from the internet, I'd like to run those in a restricted environment, which basically means that I want to allow only a specific set of modules to be used b

<    1   2   3   4   5