Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion django_installation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ where `C:\Python34\python` is folder in which you previously installed Python an

Creating `virtualenv` in both Linux and OS X is as simple as typing in console (remember, that we expect that you have python 3.4 installed):

~$ python -m venv blog
~$ python3 -m venv blog

### Working with virtualenv

Expand All @@ -46,6 +46,8 @@ or:

so the prefix `(blog)` appears!

When working within a virtual environment, `python` will automatically refer to the correct version so you can use `python` instead of `python3`.

Ok, we have all important things in place. We can finally install Django!

## Installing Django
Expand Down
2 changes: 1 addition & 1 deletion python_installation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ You can download Python for Windows from the website https://www.python.org/down

It is very likely that you already have Python installed out of the box. To check if you have it installed (and which version it is), you type in a console:

$ python --version
$ python3 --version
Python 3.4.1

If you don't have Python installed or you want a different version, you can install it as follows.
Expand Down
23 changes: 19 additions & 4 deletions python_introduction/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,34 @@ Let's write some code!

## Python prompt

To start tinkering with Python, we need to open up a *prompt* on your computer. On Mac OS X you can do this by launching the `Terminal` application (it's in Applications → Utilities). On Windows you need to go to Start menu → All Programs → Accessories → Command Prompt. On Linux, it's probably under Applications → Accessories → Terminal.
To start tinkering with Python, we need to open up a *prompt* on your computer. How you get there depends on the operating system but once it's open, everything is equal.

A window should pop up on your screen. This window is a prompt, waiting for commands from you. We want to open up a Python console, so type in `python` and hit Enter.
### Windows

(workshops) ~$ python
On Windows you need to go to Start menu → All Programs → Accessories → Command Prompt.

A window should pop up on your screen. This window is a prompt, waiting for commands from you. We want to open up a Python console, so type in `python3` and hit Enter.

C:\Users\Name> C:\Python34\python
Python 3.4.1 (...)
Type "copyright", "credits" or "license" for more information.
>>>

After running the python command, the prompt changed to `>>>`. For us it means that for now we may only use commands in the Python language. You don't have to type in `>>>` - Python will do that for you.
### Linux and OX X

On Mac OS X you can do this by launching the `Terminal` application (it's in Applications → Utilities). On Linux, it's probably under Applications → Accessories → Terminal.

A window should pop up on your screen. This window is a prompt, waiting for commands from you. We want to open up a Python console, so type in `python3` and hit Enter.

$ python3
Python 3.4.1 (...)
Type "copyright", "credits" or "license" for more information.
>>>

## Your first Python command!

After running the Python command, the prompt changed to `>>>`. For us it means that for now we may only use commands in the Python language. You don't have to type in `>>>` - Python will do that for you.

Let's start with something really simple. For example, try typing some math, like `2 + 3` and hit Enter.

>>> 2 + 3
Expand Down