Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > how to change a script while it is running

Thread Tools

how to change a script while it is running

Posts: n/a
Hi, I would like to know if it is possible to change code on the fly on a
python interpreter. I want to have a python script running a multithread
server and be able to connect to this python script and change the
interpreter environment. Is this possible?
Ideally i would like to call python, load the script inside the python
command line and while the script works still be able to type other python
commands(that might change the running script).


Reply With Quote
Do Re Mi chel La Si Do
Posts: n/a
Hi !

Try :

def ff(a):
print a*2


exec('''def ff(a):
print a*3



Michel Claveau

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Block execution of script while same script is already running Ruby 2 12-17-2008 06:03 PM
how to change contents of web.sitemap while web app is running? yohan ASP .Net 0 05-18-2007 07:01 AM
Change aspx at design time while page is running Erik Moore ASP .Net 0 02-24-2006 06:10 PM
modify a long-running python script while it is running? Benjamin Rutt Python 2 12-20-2005 01:42 PM