Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I've created a custom widget in wxPython which though not yet perfect, is good enough to add to one of my projects (call this widget v1.). I want to keep working on/experimenting with the widget, but I'd also like my project to only access v1, at least until my experiemntal strain (v2) is complete. The obvious way to do this is to keep two separate files, one for v1 and one for v2, and have my project import v1. The downside to this approach is that if I make small changes to v2 that I would like to apply to v1 I have to copy and paste across. I was thinking that an ideal solution would be to somehow point my python project to a specific branch of the git directory and have it import from there, equivalent to from git directory import MyWidget from branch ProductionVersion'. GitPython appears to give access to the whole of my repository, so I was wondering (i) if this is possible and (ii) if it is a sensible way to proceed.

share|improve this question
 
I think you would have to check out the repo and then update your sys.path to include the folder you checked it out to –  Joran Beasley Oct 18 at 16:01

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.