Comments (8)
Hi,
The code automatically detects if the project is running from pypi or not. glim/cli.py
module can pop and insert a new sys path to the python environment. However, I couldn't be able to reproduce this error. Could it be because of you're using python 3 ?
A PEP8 python 3 compatible pull request would be awesome for me.
from glim.
Btw, did you run glim new
on the same folder with virtualenv ?
from glim.
Nope, these are the steps I followed:
$ virtualenv exp
$ cd exp
$ source bin/activate
$ pip install glim
$ mkdir app
$ cd app
$ glim new
from glim.
The real difference here from documentation is that you want to create inside virtualenv folder. When you do that, the sys path is getting messed up. Try the following:
$ virtualenv exp
$ . exp/bin/activate
$ glim new # it already creates app folder.
$ cp app/config/default.py app/config/development.py
$ glim start
from glim.
Yes, that way it works. But I don't understand why paths
is imported instead of glim.paths
.
from glim.
The main reason why import paths
works is because when you type glim
from command line, it runs glim/cli.py
and in that module, there exists paths
module. However, after paths.configure()
function is called the sys path becomes the root path of project folder. When the sys path becomes project root, import glim.paths
is available.
from glim.
So, if you're really not required to put app folder inside virtualenv, then I will close this.
from glim.
Ok, I understand, it makes sense.
from glim.
Related Issues (17)
- Example Usage HOT 2
- put a development.py for easier installing
- prototype app models & services results in ImportError
- add feature for services to register during runtime
- add validation engine HOT 1
- improve dependency injection kit
- add feature for reusable route filters HOT 1
- add feature for reusable command line utils
- jinja2 data sharing among templates HOT 1
- restful function mapping is crashing
- add heroku integration with gunicorn support HOT 1
- glim --help doesn't work when app is not created
- Comparison Matrix for Documentation Part HOT 2
- pip install glim (mysql_config not found) HOT 3
- app/static, app/views, ext folders not created when glim new is called
- app/ext folder is not created when glim new is called HOT 1
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 glim.