Bryan wrote: > That works, but I wish I could run use my development code in a plain > module, and more importantly, the interactive interpreter. I don't > see how I can however if relative imports are not possible outside of > packages,
I poked into using relative imports recently -- it seems like a great idea. However, I ran into what I think is the same issue -- I want to have test code that sits with the module I'm testing, but when I try to run it from there, the relative imports fail. Some googling indicated that that's just how it is, but I still have no idea why it couldn't be supported. So, I'm still not sure how to manage all this. I usually end up doing a: python setup.py develop then I can use absolute imports and get the development version. > and using an absolute import will fall back to using my > installed production code. Then you might want to put your production code in a virtualenv to keep it separate. You could also use setuptools methods for selecting a particular version -- though I don't actually know how to do that! -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
