Re: Proposed new syntax

2017-08-21 Thread Gregory Ewing
Steve D'Aprano wrote: from io import StringIO # simulate reading from a file myfile = StringIO('Is this the room for an argument?') values = [myfile.read(1) for i in range(33)] print(''.join(values)) Which is a very contrived and longwinded way to write print(myfile.read(33)) and would b

xlrd 1.1.0 and xlwt 1.3.0 released!

2017-08-21 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlrd 1.1.0 and xlwt 1.3.0. Please consult their change logs on readthedocs.org to see what's new. As before, I will be upfront and say you should no longer be using these unless libraries unless you have a particular need to work with .xls file

Re: Proposed new syntax

2017-08-21 Thread Paul Rubin
Rustom Mody writes: > Do you mean Frege or Cantor? Frege. Cantor was concerned with set theory, while Frege was concerned with logic in general. Frege's notation was different from what we use now but the issue was about the same: unrestricted comprehension led to contradiction. As you mention

Re: Proposed new syntax

2017-08-21 Thread Rustom Mody
On Sunday, August 20, 2017 at 11:00:22 AM UTC+5:30, Paul Rubin wrote: > Rustom Mody writes: > > Specifically the term 'comprehension' used today as a programming construct > > traces somewhat tenuously to an axiom that Zermelo/Fraenkel formulated > > in the 1920s > > I thought went back to Frege.

SCons 3.0.0.alpha.20170821 is available for your testing

2017-08-21 Thread Bill Deegan
All, You can install via: (PLEASE ONLY DO IN A VIRTUALENV AS THIS IS PRERELEASE) pip install --index-url https://test.pypi.org/simple/ scons==3.0.0.alpha.20170821 This version supports: Python 2.7.x, 3.5.x, 3.6.x NOTE: 1. You must rm your .sconsign file if you switch python versions between 2

Re: Dataframe iterating question : 3 ways of calling a row and column

2017-08-21 Thread Rick Johnson
On Monday, August 21, 2017 at 12:08:54 PM UTC-5, zach@orthofi.com wrote: > I wouldn't say I'm a Python noob, but I wouldn't say I'm a Python expert > either. I work in data science and use Pandas Dataframes a lot. My question > is regarding the difference in calling out a specific row, column

Re: python to call or start a fortran a.out

2017-08-21 Thread Peter Otten
Chet Buell wrote: > Need some help with updating python to call or start a fortran a.out > executable > > The problem I am having is I have an old Fortran based model that I need > to run, in the past the fortran was triggered through the following > python code: > > #run fortran > x = commands.

Dataframe iterating question : 3 ways of calling a row and column

2017-08-21 Thread zach . smith
I wouldn't say I'm a Python noob, but I wouldn't say I'm a Python expert either. I work in data science and use Pandas Dataframes a lot. My question is regarding the difference in calling out a specific row, column combination in a dataframe. I see 3 ways of doing this: (1) df.loc[row_ind, colu

Re: python to call or start a fortran a.out

2017-08-21 Thread Grant Edwards
On 2017-08-21, Chet Buell wrote: > Need some help with updating python to call or start a fortran a.out > executable > > The problem I am having is I have an old Fortran based model that I need > to run, in the past the fortran was triggered through the following > python code: > > #run fortran

python to call or start a fortran a.out

2017-08-21 Thread Chet Buell
Need some help with updating python to call or start a fortran a.out executable The problem I am having is I have an old Fortran based model that I need to run, in the past the fortran was triggered through the following python code: #run fortran x = commands.getoutput(path+'/a.out') Since

Re: Feature suggestion -- return if true

2017-08-21 Thread Ian Kelly
On Mon, Aug 21, 2017 at 8:39 AM, alister via Python-list wrote: > On Mon, 21 Aug 2017 05:44:53 -0700, jek wrote: >> This is a very old post, but since I just though I would like a >> conditional return like this, and checked for previous proposals, I >> thought I'd give my opinion. >> >> Unfortuna

Re: Feature suggestion -- return if true

2017-08-21 Thread alister via Python-list
On Mon, 21 Aug 2017 05:44:53 -0700, jek wrote: > This is a very old post, but since I just though I would like a > conditional return like this, and checked for previous proposals, I > thought I'd give my opinion. > > Unfortunately only about 8 of the 67 replies actually answer the > question, an

Express thanks

2017-08-21 Thread Hamish MacDonald
I wanted to give a shout out to the wonderfully passionate contributions to python I've witnessed following this and other mailing lists over the last little bit. The level of knowledge and willingness to help I've seen are truly inspiring. Super motivating. Probably the wrong forum for such a

Re: Feature suggestion -- return if true

2017-08-21 Thread jek
This is a very old post, but since I just though I would like a conditional return like this, and checked for previous proposals, I thought I'd give my opinion. Unfortunately only about 8 of the 67 replies actually answer the question, and there isn't any overwhelming consensus to if a conditio

Re: Proposed new syntax

2017-08-21 Thread Terry Reedy
On 8/20/2017 12:28 AM, Rustom Mody wrote: Lives today in python in the fact that the russel-set gives a straightforward syntax error and nothing more grandly profound R = {x if x not in x} R = {x for x not in x} Try the actual Python syntax set builder expression and you get executable co

Re: Ask for help about a tkinter problem

2017-08-21 Thread Terry Reedy
> On 2017-08-21 01:28, jf...@ms4.hinet.net wrote: >> Peter Otten at 2017/8/20 UTC+8 PM 5:52:24 wrote: > [snip] > >>> That is just a peculiarity of TCL; a "-" is added to the option by the >>> Python wrapper before passing it along >> >> This extra "-" confuses people when showing up in the Traceba

Re: how to create root with treelib?

2017-08-21 Thread Peter Otten
dieter wrote: > Ho Yeung Lee writes: > >> http://treelib.readthedocs.io/en/latest/examples.html >> >> tree = Tree() >> #create root >> tree.create_node((0,0), "root") >> result = [aa[0]] >> previousnode = (0,0) >> > #create root >> ... tree.create_node((0,0), "root") >> Traceback (most recen

Re: how to create root with treelib?

2017-08-21 Thread dieter
Ho Yeung Lee writes: > http://treelib.readthedocs.io/en/latest/examples.html > > tree = Tree() > #create root > tree.create_node((0,0), "root") > result = [aa[0]] > previousnode = (0,0) > #create root > ... tree.create_node((0,0), "root") > Traceback (most recent call last): > File "", lin