Comments (4)
I don't think this works as an ordinary Python script:
$ python src/server.py
Traceback (most recent call last):
File "src/server.py", line 1, in <module>
from .foo import getab
ImportError: attempted relative import with no known parent package
from stickytape.
Ah I see, if I just add an ordinary executable script that imports src.server
, it'd work. However, is it not possible to make my example work?
from stickytape.
As in make stickytape make the example work, even though the example doesn't work when running it as an ordinary Python script? It might be possible, but I think that stickytape should stick to normal Python behaviour where possible.
from stickytape.
Sorry, I mean make stickytape combine scripts that can be imported instead of being executed, but I guess that's beyond the scope of this tool. Thanks
from stickytape.
Related Issues (20)
- Library to script conversion possible? HOT 4
- Dynamic imports don't work if the python path is a level up from their location HOT 2
- PermissionError: [WinError 5] Access is denied Error in Windows environment HOT 3
- How to "make" HOT 2
- Holding of the __init__.py during 'make_package' cause failure on exit (Windows + IronPython)
- Using sticky tape to pass code to external engine HOT 1
- Output file still want to import files HOT 20
- from __future__ import unicode_literals HOT 12
- Relative imports matching stdlib modules are incorrectly ignored HOT 1
- Improve list of stdlib modules
- Handle relative imports from parent packages HOT 1
- UnicodeEncodeError: 'charmap' codec can't encode characters in position 83853-83854 HOT 13
- SyntaxError: Non-UTF-8 code starting with '\xff' HOT 1
- How to include Python standard library HOT 1
- Renaming of modules HOT 4
- Explicitly add modules inline HOT 1
- Move future statements at the top HOT 2
- how to convert many py files to a py file without make tempfile HOT 1
- when i exec a cmpiled file in a cmpiled file ,raise NameError: global name '__stickytape_working_dir' is not defined HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stickytape.