Useful Python 2.7 script snippets

Python curl command script: (install pip tutorial and requests tutorial)

import requestsdef sendRequest():
url = 'yourEndPoint'
payload = {"action": "update",
"category": "Android"}
headers = {'Content-type': 'application/json'}
r =, json=payload, headers=headers)
print r

Python open browser:

import webbrowserdef open_Google_Play_Console():'')

Python open file location:

import os
import sys
def open_BuildServerApps():
bashCommand = 'open /fileLocation/builds/android'
p= os.popen(bashCommand)

software engineer, read, swim, travel. apps:

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store