/srv/irclogs.ubuntu.com/2011/02/26/#ubuntu-au.txt

iktheya, say you are coding a program in python 3.1, in ubuntu if you do ./python3program.py it will automatically run as python2.7, is there anyway to change in the program itself to tell ubuntu to run as python 3.1?11:12
nisshhikt, on the command line, instead of ./application.py, use: python3.1 application.py11:18
nisshhthat will interpret the app using 3.111:18
iktyeah I don't want that11:18
iktfor example if I put it onto another computer11:18
iktand do ./11:18
iktI want it to come out as an error, python3 not installed, not get halfway through the app and then crash :S11:18
nisshhoh ok11:19
iktI can't find much on it :(11:19
nisshhwell unfortunately, what happens is that it will run the app and then exit with a crash when it hits a wall because it cant find 3.111:19
nisshhyou could include a check in your code to check for a specific version of python11:20
nisshhikt, ^^^11:20
nisshhi cant remember how to do it exactly, gimme a minute11:21
nisshhikt, ah, yes, i remember now, its very easy11:22
ikt^_^11:25
nisshhikt, gimme a sec11:27
nisshhikt, this will throw an error if called when the default version of python is < 3.1: http://paste.ubuntu.com/572588/11:34
nisshhit will work fine if called with 3.1 though11:35
iktah sweet cheers :D11:35
nisshhnp11:35
nisshhikt, next time come to: ##general-programming11:36
nisshhits a little more on topic :)11:36
iktoh yea11:36

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!