52
What was the smallest python hobby project you worked on?
(sh.itjust.works)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
Just a thought, install ipython. Then start exploring modules. ipython is very helpful with this.
Here is a small example. After ipython is installed in a terminal start ipython shell by typing
ipython. In my example we will usepsutil.import psutil as psYou can access different methods in that module with a dot and you can see all available methods by hitting tab after the dot.
ps.<tab>, then you can use the arrow keys to select different methods that interest you.Here i will use process_iter to get programs that are running. I'll use firefox as an example.
You can start to figure out how to access properties. Some properties are methods and require the () and others are attributes and dont.
This can be fun. It can help you explore and familiarize yourself with different modules as you read their documentation.
You could teach yoursel list comprehension.
This gives you a list of processes with 'fire' in the name. A powerful way to sift generators, lists and the like becomes available.
psutil is fun but you dont have to start there. The
osmodule is very handy.Maybe try https://en.wikipedia.org/wiki/Fizz_buzz for fun.