GithubHelp home page GithubHelp logo

Comments (8)

aacanakin avatar aacanakin commented on May 29, 2024

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.

aacanakin avatar aacanakin commented on May 29, 2024

Btw, did you run glim new on the same folder with virtualenv ?

from glim.

rubik avatar rubik commented on May 29, 2024

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.

aacanakin avatar aacanakin commented on May 29, 2024

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.

rubik avatar rubik commented on May 29, 2024

Yes, that way it works. But I don't understand why paths is imported instead of glim.paths.

from glim.

aacanakin avatar aacanakin commented on May 29, 2024

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.

aacanakin avatar aacanakin commented on May 29, 2024

So, if you're really not required to put app folder inside virtualenv, then I will close this.

from glim.

rubik avatar rubik commented on May 29, 2024

Ok, I understand, it makes sense.

from glim.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.