My Python Examples
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 522 commits behind geekcomputers:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

My Python Examples.

Here is some more detailed information about the scripts I have written. I do not consider myself a programmer, I create these little programs as experiments to have a play with the language, or to solve a problem for myself. I would gladly accept pointers from others to improve the code and make it more efficient, or simplify the code. If you would like to make any comments then please feel free to email me at

In the scripts the comments etc are lined up correctly when they are viewed in Notepad++. This is what I use to code Python scripts.

  • - This will batch rename a group of files in a given directory, once you pass the current and new extensions.

  • - Checks to see if a directory exists in the users home directory, if not then create it.

  • - Tests to see if the directory testdir exists, if not it will create the directory for you.

  • - This script will check to see if all of the environment variables I require are set.

  • - Show file information for a given file.

  • - This will scan the current directory and all subdirectories and display the size.

  • - This script will search for all *.log files in the given directory, zip them using the program you specify and then date stamp them.

  • - This will move all the files from the source directory that are over 240 days old to the destination directory.

  • - This very simple script opens the file server_list.txt and then does an nslookup for each one to check the DNS entry.

  • - Displays some information about the OS you are running this script on.

  • - This script will, depending on the arguments supplied, will ping the servers associated with that application group.

  • - After supplying the first 3 octets it will scan the final range for available addresses.

  • - This goes through the server list and pings the machine, if it's up it will load the putty session, if it's not it will notify you.

  • - This zips up all the logs in the given directory.

  • - This scans my scripts directory and gives a count of the different types of scripts.

  • - This will list all the files in the given directory, it will also go through all the subdirectories as well.

  • - This very simple script open a file and prints out 100 lines of whatever is set for the line variable.

  • contains a method called ListAvailablePorts which returns a list with the names of the serial ports that are in use in our computer, this method works only on Linux and Windows (can be extended for mac osx). If no port is found, an empty list is returned.

  • - This is very simple python script to get more views for your youtube videos.Some times I use for repeating my favorite songs by this scripts.

  • - This Script will,counting character script, count how much character present *any text based file.