SU stdlibs for Python 3
su-stdlibs-python is an adapted version of the Python programs provided with the textbook Introduction to Programming in Python by Sedgewick, Wayne, and Dondero.
Target audience
su-stdlibs-python is intended for instructors and students who wish to follow the textbook Introduction to Programming in Python, 1st Edition by Sedgewick, Wayne, and Dondero.
It was first created in 2023 by teaching assistants and instructors at Stellenbosch University.
Installation
This library requires a functioning Python 3 environment.
Some optional visual and auditory features depend on the numpy and pygame packages.
With pip
For Python versions 3.8 - 3.10, due to compatability infeasibilities, the current safest option is to install most requirements manually before installing this package.
python3 -m pip --upgrade pip
python3 -m pip --upgrade wheel
python3 -m pip --upgrade setuptools
python3 -m pip --upgrade numpy
python3 -m pip --upgrade pygame
python3 -m pip --upgrade mypy
After the above commands execute sucessfully, install su-stdlibs-python simply with
python3 -m pip install --upgrade su-stdlibs-python
To test that you have installed the library correctly, run this command:
python3 -c 'import stdio; stdio.write("Hello World!\n")'
It should greet you. If an error message appears instead, the library is not installed correctly.
Hello World
A simple program, stored as a file hello_world.py, looks like this:
import stdio
stdio.write("Hello World!\n")
It can be run with the command python3 hello_world.py.
How to suppress pygame import message
Windows
In the command line enter the following and hit enter:
set PYGAME_HIDE_SUPPORT_PROMPT="1"
Linux
In the terminal enter the following and hit enter:
export PYGAME_HIDE_SUPPORT_PROMPT=1
In-code
In your code add the following to the beginning of your code.
import os
os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = '1'
import pygame # it is important to import pygame directly after
Contributors
- Marcel Dunaiski
License
This project is licensed. See the LICENSE file for details.
Release files for su-stdlibs-python 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| su_stdlibs_python-0.0.3.tar.gz | 24.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| su_stdlibs_python-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.1 kB
Release files / su_stdlibs_python-0.0.3.tar.gz
| Download URL | su_stdlibs_python-0.0.3.tar.gz |
|---|---|
| Size | 24.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb9a39dab413cda24135d6e62319b9765c3752307238498ee99ed8adb1eb0e25
|
|
BLAKE2b-256 checksum How to use checksums |
36cd8dcd3edfe863ac1c1ad1e89198fae14d66c325bd8d8ec868030bedf20e54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.10
|
Release files / su_stdlibs_python-0.0.3-py3-none-any.whl
| Download URL | su_stdlibs_python-0.0.3-py3-none-any.whl |
|---|---|
| Size | 23.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
005ca4e9604524b3417fed5302e7a15d8d137a9f2379eb9b7975ef0aa1b10b0f
|
|
BLAKE2b-256 checksum How to use checksums |
7b6107219d6a93b07cfe21db76f5ddd161df9bcaf9d329efeab99a0260288d0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.10
|