damonwang / xraylarch

X-ray Analysis Applications with Larch and Python
http://cars.uchicago.edu/ifeffit/Larch
1 stars 0 forks source link

larch/modules/random.lar makes a name clash with python's random module #19

Open damonwang opened 14 years ago

damonwang commented 14 years ago

is there really a sensible way to solve this? I think we should just declare that larch modules cannot reuse python module names. This doesn't seem like a burdensome handicap.

damonwang commented 14 years ago

by the way, the reason I got to this was, larch import tests started failing after I wrote test_eval_file, which calls mkstemp to write a temporary larch source file. Apparently tempfile brings in python's random. Then 'random' in sys.modules was True, so calling import random in the larch interpreter didn't do anything new.

Short story is, I'll be using manual filenames from now on.