Skip to content

Instantly share code, notes, and snippets.

@Ignas
Created February 13, 2015 01:10
Show Gist options
  • Save Ignas/9f71e2d368ea0732735a to your computer and use it in GitHub Desktop.
Save Ignas/9f71e2d368ea0732735a to your computer and use it in GitHub Desktop.
Python 2.7.8 (default, Aug 24 2014, 21:26:19)
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib2
>>> urllib2.urlparse.urlsplit("postgresql+psycopg2://usr@/db_name?host=/var/run/postgresql&port=5432")
SplitResult(scheme='postgresql+psycopg2', netloc='use@', path='/db_name', query='host=/var/run/postgresql&port=5432', fragment='')
Python 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib2
>>> urllib2.urlparse.urlsplit("postgresql+psycopg2://usr@/db_name?host=/var/run/postgresql&port=5432")
SplitResult(scheme='postgresql+psycopg2', netloc='usr@', path='/db_name?host=/var/run/postgresql&port=5432', query='', fragment='')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment