python - Scripting: updating scripts -


i new python , i'm trying out. confusing me hours until made little test.

i have 2 scripts, a.py , b.py

#a.py  num = 3   #b.py  import   print(a.num) 

when b.py ran, prints 3. if change value of num other number, output still 3.

how can resave / update script files?

python read module file on first time module imported. editing still old version of imported objects. if want reload module, can use imp.reload. more clarification, can read when edit imported module , reimport it, changes don’t show up. why happen?.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -