Python course for beginners fully free at your own command line.
Project description
lamr
lamr
is a content manager to organise and display markdown files and Python code snippets.
You can think of it as a terminal-based textbook with a code collection and exercises that assist you to learn both Python and command line.
Quickstart
pip install lamr
lamr --help
In current version (0.1.7) the following commands should work:
lamr learn variables
lamr code --list
lamr code cal.py --excercises
lamr run cal.py
lamr about
Motivation
On the web you have freecodecamp or another online course of your choice, but as a programmer you are likely to do a lot of work on command line.
What if you wanted an early start with command line and do a part of your studies there?
lamr
is a tool you can try for this.
[!TIP] If you are new to command line read into What is the Command Line in "Data Science at the Command Line" book and Basics section in "The Art of Command Line" guide.
Unlike many online courses lamr
is open-source software written in Python.
You can explore its own code and propose changes or enhancements
by writing an issue
and submitting a pull request.
This way you can practice how to work collaboratively on a Python project
and share something you know with others.
Installation
You should have a working installation of Python and a terminal, or console, open.
Install lamr
:
pip install lamr
Check it works:
lamr --help
Code examples
lamr
provides a collection of Python code examples stored as plain text files.
You can use lamr code
and lamr run
to see the code listing or run the files.
>>> lamr code --list
cal.py Print today's date and a calendar for current month.
x.py A Twitter clone (maybe).
>>> lamr run cal.py
Today is 2024-02-03
February 2024
Mo Tu We Th Fr Sa Su
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 29
Code listing
To get a code listing:
lamr code cal.py
"""Print today's date and a calendar for current month."""
from calendar import TextCalendar
from datetime import date
t = date.today()
print("Today is", t)
print() # prints empty line
TextCalendar().prmonth(t.year, t.month)
For a list of excercises run lamr code
with a flag:
lamr code cal.py --excercises
The manual
lamr learn
is a small Python textbook aimed at beginners.
It is organaized by topic such as string
or variables
.
>>> lamr learn --list
# prints available topics to study
>>> lamr learn variables
# prints beginner-friendly reader about variables
Development
Check out separate Development section:
>>> lamr about --dev
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.