Automating with Python

python@millstreamsolutions.com

Save time by automating common computer tasks using Python programming scripts developed for your specific needs.

Recent Project

Google Earth - Excel Sync

Store your map coordinates and data in Excel for easy viewing and editing and allow Python to convert the coordinates and data to a KML file for Google Earth with the click of a button.

Client Need

Our client was looking for a quick and easy way to view oil & gas well details and notes in tabular format in an Excel spreadsheet as well as on a map in Google Earth without entering data twice and dealing with potential inconsistencies between the two data sets.

Millstream Solution

We wrote a Python script and used some VBA code to sync an Excel Spreadsheet with a Google Earth map. Now the user can enter data about a well in Excel and with the click of a button view the new data on the map too.

How?

Well name, description, coordinate locations, and other data stored in an Excel file are converted to CSV format using VBA, then it is pulled into Python and converted into a KML mapping file. This is initiated when the Excel file is saved by the user. Google Earth can either be set up to refresh automatically on a given time interval or manually refreshed by the user.

Recent Project

Copy from Remote Connection

Copy and paste from Remote Desktop Connection to local network drive automatically

Our client wished to automate the process of copy and pasting a daily SCADA dump from a remote server to the local network for use in Spotfire. We wrote a Python script using Python module, pyautogui, to automatically:

  • Initiate Remote Desktop Connection link
  • Enter password
  • Navigate to the desired file
  • Copy file
  • Open File Explorer on the local computer and navigate to the network drive
  • Paste file
  • Close Remote Desktop Connection
  • Pull new Excel file into Python
  • Find the new data from yesterday in the file
  • Append the new data to the existing data in an Excel file linked with Spotfire
The user can now, simply, refresh the data link in Spotfire each day and be viewing the most current data. This is a prime example of a repetitive task, that would have had to be done daily, now automated using Python.

Time Saved by Millstream Solution: 10 minutes/day
Key Words: SCADA, Spotfire, pyautogui, GUI Automation, Python, Oil & Gas