this post was submitted on 25 Jun 2024
1 points (100.0% liked)
Aotearoa / New Zealand
1651 readers
2 users here now
Kia ora and welcome to !newzealand, a place to share and discuss anything about Aotearoa in general
- For politics , please use [email protected]
- Shitposts, circlejerks, memes, and non-NZ topics belong in [email protected]
- If you need help using Lemmy.nz, go to [email protected]
- NZ regional and special interest communities
Rules:
FAQ ~ NZ Community List ~ Join Matrix chatroom
Banner image by Bernard Spragg
Got an idea for next month's banner?
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Ooh thanks! I'll definitely have a play with this. What's the step before this? Is it as simple as installing python, putting the code in somefile.py, then running it?
Yep, if you are running any type of Linux python is already installed.
I always have a path in my python files to allow for direct running rather than calling python first. This only works on Linux.
If you put
#!/usr/bin/env python3
as the very first line, you can make the file executable and it will just run
otherwise you will have to call python first, e.g.
python yourFile.py