this post was submitted on 25 Jun 2024
9 points (100.0% liked)

Aotearoa / New Zealand

1642 readers
31 users here now

Kia ora and welcome to !newzealand, a place to share and discuss anything about Aotearoa in general

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
 

Last weeks thread here

Welcome to this week’s casual kōrero thread!

This post will be pinned in this community so you can always find it, and will stay for about a week until replaced by the next one.

It’s for talking about anything that might not justify a full post. For example:

  • Something interesting that happened to you
  • Something humourous that happened to you
  • Something frustrating that happened to you
  • A quick question
  • A request for recommendations
  • Pictures of your pet
  • A picture of a cloud that kind of looks like an elephant
  • Anything else, there are no rules (except the rule)

So how’s it going?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 4 months ago (1 children)

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?

[–] [email protected] 3 points 4 months ago* (last edited 4 months ago) (1 children)

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

[–] [email protected] 1 points 4 months ago

Awesome, thanks! I'll have a play with this over the weekend.