[PLUG] Rudimentary python help needed

Martin A. Brown martin at linux-ip.net
Wed Jan 22 20:23:44 UTC 2014


Hi and apologies,

 :  : I import my module (a file of a few lines of simple stuff), edit 
 :  : the file, then attempt to reload and get an error.  I have to 
 :  : quit python, restart python to get the revised file.  Can I get 
 :  : some clues here?
 : 
 : You are describing what the 'reload' function offers:
 : 
 :   http://docs.python.org/2/library/functions.html?highlight=reload#reload
 : 
 :  : parents at R2D4:~/Documents/Denis/Python$ python
 :  : Python 2.7.3 (default, Sep 26 2013, 20:03:06)
 :  : [GCC 4.6.3] on linux2
 :  : Type "help", "copyright", "credits" or "license" for more information.
 :  : >>> from pins_init import*
 :  : >>> cols  #test to illustrate that the code was read
 :  : 5
 :  : >>> reload(pins_init)

And, clearly, quite embarrassingly, I am incapable of reading.  
Apologies.  I'm glad that Paul Mullen gave you a useful answer.  
I'll also go subscribe to the Portland Python list.

-Martin

-- 
Martin A. Brown
http://linux-ip.net/



More information about the PLUG mailing list