Skip to content

Instantly share code, notes, and snippets.

@eaydin
Created February 15, 2012 13:57
Show Gist options
  • Select an option

  • Save eaydin/1835875 to your computer and use it in GitHub Desktop.

Select an option

Save eaydin/1835875 to your computer and use it in GitHub Desktop.
SED Pattern to switch Python print statements to functions for 2->3
sed 's/print \"\(.*\)\"/print\(\"\1\"\)/' filename.py
@mrquincle
Copy link

Does not work for

print "Links saved to: {}".format(file_name) 

Becomes

print("Links saved to: {}").format(file_name)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment