interactive python shell

ian reinhart geiser geiseri at yahoo.com
Wed Mar 27 15:43:57 EST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 27 March 2002 04:11 pm, you wrote:
> On Wed, 27 Mar 2002, ian reinhart geiser wrote:
> > Well I was hopeing to run this as a "widget" as take input from a line
> > edit and show the response on a listview widget.  from the above
> > directions this seems feasable, although I am not sure i want to be using
> > sockets for something like this.
>
> Ah... this is somewhat easier then. The solution I was describing was a
> console on a network server - you can basically telnet in and do remote
> debugging.
>
hehe, actually that would be really cool, but is overkill for now...

> > ah, this is a problem, because i want to be able to set the values of
> > current running variables.  i have a static data object from a cmodule i
> > am importing that contains  a fair amount of this information but i would
> > like to keep away from global variables.
>
> Well, the problem is deciding what exactly do you mean by "current running
> variables"? The issue is that your console will essentially be in a
> different thread and call stack than the variables you want to inspect
> (otherwise what you're looking for is simply a debugger), so you need some
> way to access them, whether it be a reference to some all-encompassing
> object or a global variable.

if i import this debugger and pass it my main object as an argument would that 
work?

that sounds about what you are saying i need.

>
> > I was looking at the interactive console class, but that seems not to
> > work well from the GUI, or am I missing something?
>
> You can still use it just fine - override the raw_input and write methods
> so that they get data from the widget and write it back out.
OKay so interactive console is the beast i am looking for?  Is there some 
sample code that shows off how it works?  I think I see in my mind how the 
PyQt and the module side of things will work, but I am unclear how to make 
the interactive console get access to my global object.

Thanks
	-ian reinhart geiser


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8oi8OPy62TRm8dvgRAq0+AKDq1oeNORv0KoswvtyY89TgKMVUKACg3AQ7
6oVU9JdluHPYMmnq1YmIyZE=
=eVlG
-----END PGP SIGNATURE-----


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





More information about the Python-list mailing list