Python 'turtlex' package
Python convenience functions to control turtle window appearance and behaviour.
Installation
Install the package using PIP with:
$ pip install turtlex
Usage
Let's just jump straight in to a turtle program using the turtlex front() function.
import turtle # we'll need the turtle package
import turtlex # utils for window appearance and behaviour
screen = turtle.Screen() # 'screen' is our window
screen.title("Just wanted to say..")
screen.setup(500, 400) # set the window size in pixels
screen.bgcolor("lightgreen") # set the window background color
# Say hello!
turtle.write("Hello world!", font=("Courier", 30, "italic"), align="center")
turtle.hideturtle()
turtlex.front(screen, True) # keep on top of existing windows
screen.mainloop() # process window events
Easy! Here's the full list of functions.
Functions in the turtlex package
front(screen, alwaysAtFront=False)
Send the window to the top of the window stack. If 'alwaysAtFront' is true then keep the window at the front.
fullscreen(screen, full=True)
Setting 'full' to true will make the window fullscreen.
opacity(screen, alpha=0.5)
Set the opacity of the window by setting the alpha value (0 - 1).
disabled(screen, disabled=True)
Set 'disabled' to true to disable window management functions including maximise, minimise, move & close.
toolwindow(screen, tool=True)
Setting 'tool' to true changes the title bar decoration to a toolbar.
noresize(screen, x=False, y=False)
Setting 'x' and 'y' to true prevents window resizing in the horizontal and vertical direction respectively.
nodecorate(screen, nodecorate=True)
Setting 'nodecorate' to true removes the windows decoration including title bar.
minsize(screen, width=None, height=None)
Set the minimum size of the window in pixels.
maxsize(screen, width=None, height=None)
Set the maximum size of the window in pixels.
minimise(screen)
minimize(screen)
Minimise the window.
restore(screen)
Restore the window.
Roadmap
See the open issues for a list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Go to https://github.com/edbotstudio/turtlex.
- Fork the project.
- Create your feature branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a pull request.
Licence
Distributed under the MIT Licence. See the LICENCE for more information.
Metadata
Release files for turtlex 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| turtlex-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for turtlex-1.0.4-py3-none-any.whl |
Release files / turtlex-1.0.4-py3-none-any.whl
| Download URL | turtlex-1.0.4-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dfd5ef06e9f6fc8109b380b81a7aaf156166b13a3595373184949d535833f493
|
|
BLAKE2b-256 checksum How to use checksums |
7b7e3b1afbf5cace9e5701e42f497053e3cf72c74ed6770b913477011835da17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
|
Security for turtlex 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.