# Next steps for editable / develop proof of concept

**URL:** <https://discuss.python.org/t/next-steps-for-editable-develop-proof-of-concept/4118>\
**Category:** Packaging\
**Created:** [May 6, 2020, 9:38pm UTC](https://discuss.python.org/t/next-steps-for-editable-develop-proof-of-concept/4118 "2020-05-06T21:38:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pf\_moore](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/pf_moore/32/35_2.png) [@pf\_moore](https://discuss.python.org/u/pf_moore)\
**Post date:** [May 7, 2020, 7:28am UTC](https://discuss.python.org/t/next-steps-for-editable-develop-proof-of-concept/4118/2 "2020-05-07T07:28:03Z")

</div>

This isn’t polished or anything (it’s from my work in progress experiments), but it works:

```python
import os
import sys
import importlib.util

name = __name__
location_of_replacement = r"E:\Work\Projects\editable_poc\data"
target = os.path.join(location_of_replacement, name)
init = os.path.join(target, " __init__.py")
spec = importlib.util.spec_from_file_location(name, init)
module = importlib.util.module_from_spec(spec)
sys.modules[name] = module
spec.loader.exec_module(module)

```

You’d need to add @bernatgabor’s code for excluding submodules. Also, people should be aware that this _doesn’t_ help with the case where someone omits a critical file from `package_data` - in that case, an editable install and a proper install will still behave differently. I haven’t been able to think of any way to avoid this other than some form of link farm.

---

_[View the full topic](https://discuss.python.org/t/next-steps-for-editable-develop-proof-of-concept/4118)._
