Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

Anchor
environment

...

environment

Working with virtual environment

A Python virtual environment, put simply, is an isolated working copy of Python which allows you to work on a specific project without worry of affecting other projects. You can have multiple virtual environments on your system, all having their own specific (versions of) packages available. The virtualenv package provides the basic needs, but virtualenvwrapper makes life a bit easier.

...

Code Block
languagebash
pip install virtualenvwrapper-win

...

Anchor
package

...

package

Create Python package

The python scaffold package (https://pypi.python.org/pypi/Scaffold/0.1.3) helps to create a proper directory structure for your package, following the structure as explained in http://www.scotttorborg.com/python-packaging/minimal.html

...

Code Block
languagebash
python setup.py develop

...

Anchor
adjustsetup
adjustsetup

Adjusting setup.py

The setup.py file is used for meta information of the package and for the requirements. The initial setup.py file, as created by scaffold, looks like this:

...