Welcome to GSW7.net. This blog is a resource of tools, tutorials, tips and tricks on how to write Python scripts. I write posts for beginners, intermediate, and advanced Python users. And I give examples that you can cut\past into your own projects. I have no update schedule; sometimes doing multiple posts, and sometimes going a few months in-between posts. So be sure to bookmark this page, and check every few weeks to see what's new.
Consider the title image for this article. It’s a picture of a bike trail in the forest. But when was a taken, where, and with which camera? In this article, I will be using Python to read the Meta data from this file, find these answers.
By following a few simple guidelines, you can make sure that your Python script will run on any Operating System; Linux, Windows, Mac/OS, Android, Raspberry Pi, and many others.
Would you like to add a street map to your python project? Maybe showing the location of a coffee shop, or the location where a photo was taken? Today, I am using OpenStreetMap.org and Tkinter to add maps to Python.
Modules ( some times called libraries ) are packages of program code that expand the capabilities of what can be done in Python. Some allow us to send emails, draw on the screen, work with databases, do complex math, and many other things. Many come prepackaged with Python, and many more can be downloaded and installed from the web. But how difficult is to to create one of your own?
Are you in need of an easy way to encrypt passwords, sensitive corporate emails, private diary, bank account info, or other stuff? Today, I will be showing 4 different methods to encrypt your data, in Python.
Today, I will be showing python code for a Network Scanner, that will find the IP address of the printer(s) on the local network. I could uses the exact same code to find the IP address of my Raspberry Pi, File Server, a custom Python server, or anything else.
It’s an old trick, but few people today know about this. There are certain codes that you can uses inside the print() function to change the color of the text being written to the screen.
Today, I am showing a very basic Event Monitoring script using Python. It will send a text message to my cell-phone when the office’s production printer goes off-line ( runs out of paper ), comes back on-line, and an hourly reminder when it’s off-line. The script can be expanded to monitor other events as well.
This time, I'm showing sample python code for working with RSS feeds, and what kind of information can be obtained by using them.
Does your project need a way for programs to share data, or pass messages between each other? Maybe you need a light-weight database server that can be accessed by a simple ESP32 device? Or maybe you need to do complex trig calculations on an Arduino? Sounds like you may want to build a server.
This time, I'm showing a collection of very useful functions, that work with GPS data and postal addresses. Please feel free to cut/past these into your own projects if you wish.
So, you are working on a project that needs to send a text message to one or more smart phones. Maybe your working on something that will send out a message if an important printer runs out of paper, or the companies file server runs out of free space, or someone leaves the back door of the warehouse open again. OK, so how does one send a text message using python?
My objectives of this blog post are (1) to serve as an introduction to ray tracing with python, and (2) show how to use python, combined with the abilities of a totally different application, to create results that far exceed what either can do alone.
In addition to the Standard Modules that come included with Python, there are many other modules that can be installed from the Internet. This is done using the python package manager, called 'PIP'. This blog post explains what 'PIP' is, and how to uses it.
Do you know someone who enters the same text over and over again? Maybe a medical tech who types the same medication name 50 times a day? Or someone who enters the same shipping address 30 times a week? A legal assistant who works long into the night typing the same verbiage in contract after contract? Or maybe it's YOU who finds yourself entering the same code over and over again?
From the classics like Pack-Man, Mario Brothers, and DungeonQuest, to more recent big-title packages, the maze is a staple building block of many video games. Being able to truly understanding how to generate a maze can serve any developer well. But, there are at least 6 completely different ways (algorithms) that can be used. Many of these are overly complicated, and require many pages of code to implement. Isn't there an easy way to wrap one's head around generating a maze? Will, let me introduce you to a guy I call 'The Ghost of Mad Man Max'.
Someone recently asked me what is 'Camel Case', and what is 'Snake Case'? Which one is correct, and why? Why are some people so passionate about this subject? Is it really just a question of style?