Skip to content

Instantly share code, notes, and snippets.

@shabda
Created February 21, 2013 05:12
Show Gist options
  • Save shabda/5002286 to your computer and use it in GitHub Desktop.
Save shabda/5002286 to your computer and use it in GitHub Desktop.
{
"metadata": {
"name": "Versioning"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": "from pkg_resources import parse_version as V\n",
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 1
},
{
"cell_type": "code",
"collapsed": false,
"input": "V(\"0.5\")>V(\"0.5a",
"language": "python",
"metadata": {},
"outputs": [
{
"ename": "SyntaxError",
"evalue": "EOL while scanning string literal (<ipython-input-2-15831d3fabcf>, line 1)",
"output_type": "pyerr",
"traceback": [
"\u001b[1;36m File \u001b[1;32m\"<ipython-input-2-15831d3fabcf>\"\u001b[1;36m, line \u001b[1;32m1\u001b[0m\n\u001b[1;33m V(\"0.5\")>V(\"0.5a\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m EOL while scanning string literal\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "code",
"collapsed": false,
"input": "V(\"0.5\")>V(\"0.5a\")\n",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "pyout",
"prompt_number": 3,
"text": "True"
}
],
"prompt_number": 3
},
{
"cell_type": "code",
"collapsed": false,
"input": "V(\"0.5b\")>V(\"0.5a\")\n",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "pyout",
"prompt_number": 4,
"text": "True"
}
],
"prompt_number": 4
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment