"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 Comm

Re: Syntax error for simple script

2017-06-26 Thread Steve D'Aprano
On Tue, 27 Jun 2017 09:21 am, Stefan Ram wrote: > Erik writes:Using 'print' as a >>statement is obsolete syntax in Python 3. > > »print« never was a statement. Of course it could be a statement, just like "y = x + 1" is a statement. > »print« was a keyword (2.7.6 2.3.1). It can b

Re: Unable to apply stop words in Pandas dataframe

2017-06-26 Thread Miki Tebeka
Can you show us some of the code you tried? On Monday, June 26, 2017 at 10:19:46 AM UTC+3, Bhaskar Dhariyal wrote: > Hi everyone! > > I have a dataset which I want to make model trainable. I ahve been trying to > do some thing for past 2-3 days. > > Actually I wanted to clean 'desc' and 'keywo

Re: Syntax error for simple script

2017-06-26 Thread Rustom Mody
On Monday, June 26, 2017 at 10:11:46 PM UTC+5:30, rurpy wrote: > How about: «suggested error message» > Or better than changing the message, how about leaving it alone and > simply responding helpfully… Since everyone seems to only have read the first suggestion from rurpy, let me ask, paraphra

Re: Syntax error for simple script

2017-06-26 Thread Erik
On 27/06/17 00:21, Stefan Ram wrote: Erik writes:Using 'print' as a statement is obsolete syntax in Python 3. »print« never was a statement. »print« was a keyword (2.7.6 2.3.1). *sigh* Whatever. You have completely ignored my point (that perhaps the message could be a little

Re: Syntax error for simple script

2017-06-26 Thread Erik
On 26/06/17 18:30, Chris Angelico wrote: On Tue, Jun 27, 2017 at 2:41 AM, Rurpy via Python-list wrote: How about: In Python 2, 'print' was a statement and did not require parenthesis around its argument. In Python 3 'print' has been changed to a function and now, like all functions,

Re: Question about propagating universal_newlines through subprocess.Popen to io.TextIOWrapper

2017-06-26 Thread Bill Deegan
On Mon, Jun 26, 2017 at 2:22 PM, eryk sun wrote: > On Mon, Jun 26, 2017 at 8:59 PM, Bill Deegan > wrote: > > > > Ideally (for my use case) it would be something which propagated > > universal_newlines to io.TextIOWrapper().. rather than discards it. > > In my case I want the stdout to be encoded

Re: Question about propagating universal_newlines through subprocess.Popen to io.TextIOWrapper

2017-06-26 Thread eryk sun
On Mon, Jun 26, 2017 at 8:59 PM, Bill Deegan wrote: > > Ideally (for my use case) it would be something which propagated > universal_newlines to io.TextIOWrapper().. rather than discards it. > In my case I want the stdout to be encoded utf-8, but I do not want \r's > changed to \n's as my test sys

Re: Question about propagating universal_newlines through subprocess.Popen to io.TextIOWrapper

2017-06-26 Thread Bill Deegan
On Mon, Jun 26, 2017 at 12:44 PM, eryk sun wrote: > On Mon, Jun 26, 2017 at 5:23 PM, Bill Deegan > wrote: > > > > That universal_newlines value is discarded due to: > > > > text_mode = encoding or errors or universal_newlines > > > > ... > > > > if text_mode: > > self.stdout = io.TextIOWrapp

Deadline Extension - CfP: 14th International Conference on Managed Languages & Runtimes

2017-06-26 Thread phnetynka
CALL FOR PAPERS - ManLang '17 14th International Conference on Managed Languages & Runtimes (ManLang, formerly PPPJ) September 25-29, 2017, Prague, Czech Republic http://d3s.mff.cuni.cz/conferences/manlang17/ ** SUBMISS

Re: Question about propagating universal_newlines through subprocess.Popen to io.TextIOWrapper

2017-06-26 Thread eryk sun
On Mon, Jun 26, 2017 at 5:23 PM, Bill Deegan wrote: > > That universal_newlines value is discarded due to: > > text_mode = encoding or errors or universal_newlines > > ... > > if text_mode: > self.stdout = io.TextIOWrapper(self.stdout, > encoding=encoding, errors=errors) > > There

Re: GUI Designer[s]

2017-06-26 Thread Michael Torrie
On 06/26/2017 05:11 AM, Igor Korot wrote: > Take a look at OpenGL and its wx implementation. Or PyQt5 with its integrated OpenGL support. Alternatively, there's QtQuick and its own OpenGL scene management system. -- https://mail.python.org/mailman/listinfo/python-list

Re: Syntax error for simple script

2017-06-26 Thread Chris Angelico
On Tue, Jun 27, 2017 at 5:06 AM, Wildman via Python-list wrote: > Here it is... > > http://www.pythonforbeginners.com/code-snippets-source-code/date-and-time-script/ Since it's not world-editable, I've posted a comment. But nobody ever reads those :| I strongly recommend learning Python from a c

Re: Syntax error for simple script

2017-06-26 Thread Wildman via Python-list
On Tue, 27 Jun 2017 03:31:57 +1000, Chris Angelico wrote: > On Tue, Jun 27, 2017 at 1:16 AM, Ben S. via Python-list > wrote: >> 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-s

Re: comp.lang.python killfile rule

2017-06-26 Thread John Black
In article , miragewebstudi...@gmail.com says... > Just felt like posting, wouldn't it be pythonic if it was > if word in [list]: > ignore > > Save time and easily maintainable Yes for readers that can interpret Python. Mine doesn't. This is the rule per the syntax of my reader but as you

Re: Syntax error for simple script

2017-06-26 Thread Chris Angelico
On Tue, Jun 27, 2017 at 1:16 AM, Ben S. via Python-list wrote: > 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/: Can you provide the complete link please? Something seems

Re: Syntax error for simple script

2017-06-26 Thread Chris Angelico
On Tue, Jun 27, 2017 at 2:41 AM, Rurpy via Python-list wrote: > How about: > > In Python 2, 'print' was a statement and did not require > parenthesis around its argument. In Python 3 'print' has > been changed to a function and now, like all functions, > requires parenthesis around its ar

Question about propagating universal_newlines through subprocess.Popen to io.TextIOWrapper

2017-06-26 Thread Bill Deegan
Greetings, I was surprised to see that if I set encoding in my call to subprocess.Popen() as follows: p = Popen(cmd, stdin=stdin, stdout=subprocess.PIPE, stderr=stderr_value, env=os.environ, universal_newlines=False, #universal_newlines,

Re: Syntax error for simple script

2017-06-26 Thread Skip Montanaro
On Mon, Jun 26, 2017 at 11:41 AM, Rurpy via Python-list wrote: > In Python 2, 'print' was a statement and did not require > parenthesis around its argument. In Python 3 'print' has > been changed to a function I'm not sure that at this point Python 3's error messages should be polluted with

Re: Syntax error for simple script

2017-06-26 Thread mm0fmf
On 26/06/2017 17:41, ru...@yahoo.com wrote: On 06/26/2017 09:42 AM, Steve D'Aprano wrote: On Tue, 27 Jun 2017 01:16 am, Ben S. wrote: print mm + "/" + dd + "/" + + " " + hour + ":" + mi + ":" + ss ^ SyntaxError: Missing parentheses in call to 'print' Whats wrong? Did you read the error

Re: Syntax error for simple script

2017-06-26 Thread Rurpy via Python-list
On 06/26/2017 09:42 AM, Steve D'Aprano wrote: > On Tue, 27 Jun 2017 01:16 am, Ben S. wrote: > >> print mm + "/" + dd + "/" + + " " + hour + ":" + mi + ":" + ss >> ^ >> SyntaxError: Missing parentheses in call to 'print' >> >> Whats wrong? > > Did you read the error message? > > Missing

Re: Syntax error for simple script

2017-06-26 Thread Steve D'Aprano
On Tue, 27 Jun 2017 01:16 am, Ben S. wrote: > print mm + "/" + dd + "/" + + " " + hour + ":" + mi + ":" + ss > ^ > SyntaxError: Missing parentheses in call to 'print' > > Whats wrong? Did you read the error message? Missing parentheses in call to 'print' Is the message not clear enoug

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 = st

Release of Scalpl (v0.2.5) ✨🍰✨ - a lightweight wrapper for your nested dictionaries

2017-06-26 Thread guillaume . paulet
Hi everyone ! I released a new version (0.2.5) of **Scalpl** which is available on PyPI :) https://github.com/ducdetronquito/scalpl You can install it via pip: pip3 install scalpl Scalpl is a lightweight wrapper that helps you to operate on nested dictionaries through the built-in dict

Re: comp.lang.python killfile rule

2017-06-26 Thread Anssi Saari
John Black writes: > All, in case this is useful to anyone, this rule that tells my newsreader > which posts to kill really cleans up the group. I get by just with a very old rule that lowers the score of articles where the subject is in all caps. Those articles end up in the bottom of the arti

Re: comments and the continuation prompt

2017-06-26 Thread Chris Angelico
On Mon, Jun 26, 2017 at 10:53 PM, Steve D'Aprano wrote: > - Jython 2.5 doesn't do this: > # comment > > - Neither does bpython. > > - I no longer have IronPython installed on any of my systems, so I can't check > that, or PyPy. PyPy doesn't, fwiw. ChrisA -- https://mail.python.org/mai

Re: comments and the continuation prompt

2017-06-26 Thread Steve D'Aprano
On Mon, 26 Jun 2017 01:32 pm, Ben Finney wrote: > Steve D'Aprano writes: > >> On Mon, 26 Jun 2017 08:44 am, Stefan Ram wrote: >> >> > According to The Python Language Reference Release 3.6.0, 2.1.3 >> > Comments, »A comment signifies the end of the logical line unless >> > the implicit lin

Re: GUI Designer[s]

2017-06-26 Thread Igor Korot
Hi, On Mon, Jun 26, 2017 at 12:29 AM, Ben Finney wrote: > Edward Montague writes: > >> I'd like to eventually have 3D graphics within an application > > For that requirement, your application will need to make use of a > library for presenting and interacting with 3D objects. > > To my knowled

Unable to apply stop words in Pandas dataframe

2017-06-26 Thread Bhaskar Dhariyal
Hi everyone! I have a dataset which I want to make model trainable. I ahve been trying to do some thing for past 2-3 days. Actually I wanted to clean 'desc' and 'keywords' column from the dataset. I am using NLTK to vectorize, than remove stopwords & alpha numeric values and do stemming. More