-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On Dec 13, 2011, at 11:27 PM, Kai Mast wrote:
>how do i know if a python-file is executed by Python2 not Python3? There >is a command "python3" but none called "python2" or am I missing something? /usr/bin/python (a.k.a. 'python' at your shell prompt) will always be Python 2. You need to say /usr/bin/python3 or 'python3' to invoke Python 3. This will never change for Ubuntu (or Debian for that matter), unless PEP 394 ends up recommending something different, which I don't expect: http://www.python.org/dev/peps/pep-0394/ You've noticed that there is no 'python2' command, which is expected. How many of y'all remember Python 1.x or even Python 0.x? :) It's possible that PEP 394 will recommend a 'python2' command, but I rather doubt it's worth it since Python 2.x is at the end of its development life (i.e. there will never be a Python 2.8, but Python 2.7 will be maintained for longer than the usual amount of time). One other thing to note. Although you should generally never need it or use it, if your code is tied to a very specific Python version, you always have 'python2.7' and 'python3.2' available. In most cases 'python' and 'python3' is all you need. Cheers, - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBCAAGBQJO59YcAAoJEBJutWOnSwa/AFQP/RmW6Nl4sioaxltNqEg8bO9i 09v7de7HKkYeHcmqLiEAbetJe4kW3LGbaAYZTlrWCdpDCoZ1UAZDI5CX/WSIIKvS W1LBmmnowOM0t6ifaMnkZCShuREuCDAsuhOIOxvFfq108oVMsoNgrZCgI0UYNfS6 xaCKJ671iDotQp+6XQZ5wgoYedjnvNU3NTUg46fW97E38/1b1Us3lvW1xkKYNjXo Dc1dEN8N4Mc0vRvhT7DYDJhSjWGi9KDZG9o8WSOWYiR66HjlSrvUJB3mEgUtox0X XlsFEEc1vhwsz0oa3F/vZIDrbj01YOkeV0FQg/OaVRmxWl7GF3GzeIsjWaa7HoX1 mBYuh6se7GKW8qZc23dLppNvtPt9AWhOVYDjpXnKDplju8CBza0iXatUVpSpkngG oifhNQvr6HD+HXa1wePYrGxnqRRiYq2V3OqfCu3OlJ6RkuMLOEo9Hz14g/asDKGg jT8O/ZmvDhpxUJlUJIe7zgOK8tGBImZE2hIbFyiHo2tKxEKlUaO/cUf/+FheSQrA NH5MA6YMmOcygm73u57xBfeKJud3FD5hyc6HWFc4vRDWWMARB2sV/KSo114K2P4v wDP3Kl4JuHU32RJWoXS2eBJGXwcgSflrnX0ASvq+VocoktwbyoHBwEOLPpaQFf0c MJQTLA0s7neZOg7EZ8kP =dS1S -----END PGP SIGNATURE----- -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss