Check Python version from inside script? Run Pythons script in v2 compatibility mode?

2017-07-07 Thread Ben S. via Python-list
Can I somehow check from inside a Python script if the executing Python engine is major version v2 or v3? I am thinking about a code similar to if (os.python-majorversion<3) print hello else print (hello) Additional question: Is there a way to execute a python script with v3 python engine

"Python launcher" required to run *.py scripts on Windows?

2017-06-26 Thread Ben S. via Python-list
As I observed v3.6.1 installs (on Windows 7) in addition to the core python engine a second program "Python Launcher". As far as I read this component seems to be not necessary since it only aims to facilitate the handling with *.py scripts on Windows. When I always call Python script from

Syntax error for simple script

2017-06-26 Thread Ben S. via Python-list
Sorry for this newbie question: I installed Python v3.6.1 on win 7. Afterwards I tried to execute the following simple python script from webpage http://www.pythonforbeginners.com/code-s...me-script/: Python Code: from datetime import datetime now = datetime.now() mm = str(now.month) dd =

Problem encountered using v3.5

2015-10-11 Thread Ben S
Working on a Windows 7 64 bit machine, I installed 64 bit python v3.5. Was able to pip install a number of basic packages like numpy, pyamml, and nltk (off the Christoph Gohlke page). Did not test numpy or the other packages too much, but did explore nltk and encountered major flaw: Much of the