Launching a process with stdout in the terminal and captured

2016-06-18 Thread Olive
I am here on Linux. I want to launch a process just like os.system, (output to a terminal in an unbuffered way so as to support interaction) and at the same time capturing the output of the process (analogous to the Unix tee command). I have found some tricks on the web, but is it a standard way

Re: value of pi and 22/7

2016-06-18 Thread Christian Gollwitzer
Am 18.06.16 um 03:19 schrieb Steven D'Aprano: If I tell you that some physical phenomenon [let's call it the speed of light] is 299,999,999 m/s, how many significant digits would I be using? What if I tell you that it's 300,000,001 m/s? What if the figure to nine significant digits *actually is

Re: Launching a process with stdout in the terminal and captured

2016-06-18 Thread eryk sun
On Sat, Jun 18, 2016 at 7:09 AM, Olive wrote: > I am here on Linux. > ... > Note that if it is possible I would prefer that the launched command see its > standard > output connected to a terminal Try pexpect. https://pypi.python.org/pypi/pexpect -- https://mail.python.org/mailman/listinfo/pyt

Re: (repost) Advisory: HTTP Header Injection in Python urllib

2016-06-18 Thread Marko Rauhamaa
Steven D'Aprano : > "Even an unauthenticated service listening on localhost is risky these > days." > > but fall short of *explicitly* recommending that they should be > authenticated. Although they do *implicitly* do so, by saying that "it > wouldn't be hard" for such services to include a passwo

Re: best text editor for programming Python on a Mac

2016-06-18 Thread Terry Reedy
On 6/18/2016 3:04 AM, Michael Vilain via Python-list wrote: In article , supp...@ecourierz.com wrote: use notepad++ To me, for programming only in Python, IDLE beats Notepad++. Some features noted below. [pay no attention to the little windows troll behind the curtain] "best" is subjec

Re: best text editor for programming Python on a Mac

2016-06-18 Thread Marko Rauhamaa
Michael Vilain : > "best" is subjective. Anytime someone wants the "best", I ask "what > features are important to you that would make it the best" because I'm > pretty sure what I find important wouldn't be what they find > important. That's a bit like asking what gender, nationality and religio

Re: best text editor for programming Python on a Mac

2016-06-18 Thread Lawrence D’Oliveiro
On Saturday, June 18, 2016 at 9:40:23 PM UTC+12, Marko Rauhamaa wrote: > Michael Vilain: > >> - expansion of keywords, variables, subroutines Reminds me of a story by a local CompSci lecturer who originally learned Java through an IDE with autocomplete. Then one day he sat down to write some Ja

Re: Method Chaining

2016-06-18 Thread Pete Forman
Rustom Mody writes: > On Friday, June 17, 2016 at 2:58:19 PM UTC+5:30, Steven D'Aprano wrote: >> On Fri, 17 Jun 2016 06:13 pm, Ned Batchelder wrote: >> >> > To me, it's a toss-up. The chained version is nice in that it >> > removes the repetition of "g". But the unchained version is more >> > exp

Re: value of pi and 22/7

2016-06-18 Thread Pete Forman
Lawrence D’Oliveiro writes: > On Saturday, March 19, 2011 at 3:16:41 AM UTC+13, Grant Edwards wrote: >> >> On 2011-03-18, peter wrote: >> >>> The Old Testament (1 Kings 7,23) says ... "And he made a molten sea, >>> ten cubits from the one brim to the other: it was round all about, and >>> his hei

Re: best text editor for programming Python on a Mac

2016-06-18 Thread alister
On Sat, 18 Jun 2016 12:40:09 +0300, Marko Rauhamaa wrote: > >> - integrated documentation so you don't have to lookup the syntax and >> arguments of a function > > I have seen that in action with eclipse and Java. It could never match > having a web browser window next to the editor window: htt

Re: Method Chaining

2016-06-18 Thread Joonas Liik
On 18 June 2016 at 15:04, Pete Forman wrote: > Rustom Mody writes: > >> On Friday, June 17, 2016 at 2:58:19 PM UTC+5:30, Steven D'Aprano wrote: >>> On Fri, 17 Jun 2016 06:13 pm, Ned Batchelder wrote: >>> >>> > To me, it's a toss-up. The chained version is nice in that it >>> > removes the repetit

Re: value of pi and 22/7

2016-06-18 Thread boB Stepp
On Sat, Jun 18, 2016 at 12:47 AM, Tim Harig wrote: > > The main problem I have with significant figures is that measurement > accuracy is often not constrained to a decimal system. A scale that can > measure in 1/5 units is more accurate than a scale that can measure only > in whole units but it

Re: Method Chaining

2016-06-18 Thread Rustom Mody
On Saturday, June 18, 2016 at 5:34:30 PM UTC+5:30, Pete Forman wrote: > Rustom Mody writes: > > > On Friday, June 17, 2016 at 2:58:19 PM UTC+5:30, Steven D'Aprano wrote: > >> On Fri, 17 Jun 2016 06:13 pm, Ned Batchelder wrote: > >> > >> > To me, it's a toss-up. The chained version is nice in that

Re: Method Chaining

2016-06-18 Thread Pete Forman
Joonas Liik writes: > On 18 June 2016 at 15:04, Pete Forman wrote: >> Rustom Mody writes: >> >>> On Friday, June 17, 2016 at 2:58:19 PM UTC+5:30, Steven D'Aprano wrote: On Fri, 17 Jun 2016 06:13 pm, Ned Batchelder wrote: > To me, it's a toss-up. The chained version is nice in tha

best text editor for programming Python on a Mac

2016-06-18 Thread MrJean1
Try TextWrangler from BareBones . I've been using that for years on MacOS X. /Jean -- https://mail.python.org/mailman/listinfo/python-list

Re: best text editor for programming Python on a Mac

2016-06-18 Thread Rustom Mody
On Saturday, June 18, 2016 at 3:10:23 PM UTC+5:30, Marko Rauhamaa wrote: > Michael Vilain : > > > "best" is subjective. Anytime someone wants the "best", I ask "what > > features are important to you that would make it the best" because I'm > > pretty sure what I find important wouldn't be what th

Re: (repost) Advisory: HTTP Header Injection in Python urllib

2016-06-18 Thread Steven D'Aprano
On Sat, 18 Jun 2016 01:52 pm, Random832 wrote: > On Fri, Jun 17, 2016, at 21:00, Steven D'Aprano wrote: >> The author doesn't go into details of what sort of attacks against >> localhost they're talking about. An unauthenticated service running on >> localhost implies, to me, a single-user setup,

Re: value of pi and 22/7

2016-06-18 Thread Johannes Bauer
On 18.06.2016 01:12, Lawrence D’Oliveiro wrote: > I’m not sure how you can write “30” with one digit... 3e1 has one significant digit. Cheers, Johannes -- >> Wo hattest Du das Beben nochmal GENAU vorhergesagt? > Zumindest nicht öffentlich! Ah, der neueste und bis heute genialste Streich unsere

Re: (repost) Advisory: HTTP Header Injection in Python urllib

2016-06-18 Thread alister
On Sun, 19 Jun 2016 02:02:43 +1000, Steven D'Aprano wrote: > On Sat, 18 Jun 2016 01:52 pm, Random832 wrote: > >> On Fri, Jun 17, 2016, at 21:00, Steven D'Aprano wrote: >>> The author doesn't go into details of what sort of attacks against >>> localhost they're talking about. An unauthenticated se

Re: (repost) Advisory: HTTP Header Injection in Python urllib

2016-06-18 Thread Random832
On Sat, Jun 18, 2016, at 12:02, Steven D'Aprano wrote: > Er, you may have missed that I'm talking about a single user setup. > Are you suggesting that I can't trust myself not to forge a request > that goes to a hostile site? > > It's all well and good to say that the application is vulnerable to >

Re: (repost) Advisory: HTTP Header Injection in Python urllib

2016-06-18 Thread Paul Rubin
Steven D'Aprano writes: >> The issue ... is cross-site request forgery. > Er, you may have missed that I'm talking about a single user setup. Are you > suggesting that I can't trust myself not to forge a request that goes to a > hostile site? I think the idea is you visit some website with malici

Re: Method Chaining

2016-06-18 Thread Ethan Furman
On 06/18/2016 07:05 AM, Joonas Liik wrote: On 18 June 2016 at 15:04, Pete Forman wrote: with obj: .a = 1# equivalent to obj.a = 1 .total = .total + 1 # obj.total = obj.total + 1 the leading dot does not resolve the ambiguity that arises from: with ob_a: with

Re: PyCon Keynote

2016-06-18 Thread Chris Angelico
On Sun, Jun 19, 2016 at 7:14 AM, Quivis wrote: > On Thu, 09 Jun 2016 12:53:37 -0700, Ethan Furman wrote: > >>https://www.youtube.com/watch?v=bSfe5M_zG2s > > Good example of how not to do a presentation. Embarrassing. > I turned it off after one minute. Strange. Must be in the eye of the behol

Re: PyCon Keynote

2016-06-18 Thread alex wright
I enjoyed it. Skipped most of the intro video but I enjoyed the content of his talk. Shared with a co-worker as well. On Jun 18, 2016 5:23 PM, "Chris Angelico" wrote: > On Sun, Jun 19, 2016 at 7:14 AM, Quivis wrote: > > On Thu, 09 Jun 2016 12:53:37 -0700, Ethan Furman wrote: > > > >>https:

Re: PyCon Keynote

2016-06-18 Thread Michael Torrie
On 06/18/2016 03:20 PM, Chris Angelico wrote: > On Sun, Jun 19, 2016 at 7:14 AM, Quivis wrote: >> On Thu, 09 Jun 2016 12:53:37 -0700, Ethan Furman wrote: >> >>>https://www.youtube.com/watch?v=bSfe5M_zG2s >> >> Good example of how not to do a presentation. Embarrassing. >> I turned it off after

Re: PyCon Keynote

2016-06-18 Thread Michael Torrie
On 06/18/2016 04:33 PM, Michael Torrie wrote: > On 06/18/2016 03:20 PM, Chris Angelico wrote: >> On Sun, Jun 19, 2016 at 7:14 AM, Quivis wrote: >>> On Thu, 09 Jun 2016 12:53:37 -0700, Ethan Furman wrote: >>> https://www.youtube.com/watch?v=bSfe5M_zG2s >>> >>> Good example of how not to do

Re: best text editor for programming Python on a Mac

2016-06-18 Thread Michael Torrie
On 06/17/2016 05:52 PM, Chris via Python-list wrote: > Any suggestions for a good open source text editor for the Mac out > there? For now, I am going to stick with vim. Good choice. -- https://mail.python.org/mailman/listinfo/python-list

Re: best text editor for programming Python on a Mac

2016-06-18 Thread Lawrence D’Oliveiro
On Sunday, June 19, 2016 at 11:07:23 AM UTC+12, Michael Torrie wrote: > > On 06/17/2016 05:52 PM, Chris via Python-list wrote: >> >> Any suggestions for a good open source text editor for the Mac out >> there? For now, I am going to stick with vim. > > Good choice. The trouble with vim/vi/whatev

Re: best text editor for programming Python on a Mac

2016-06-18 Thread Joel Goldstick
On Sat, Jun 18, 2016 at 8:12 PM, Lawrence D’Oliveiro wrote: > On Sunday, June 19, 2016 at 11:07:23 AM UTC+12, Michael Torrie wrote: >> >> On 06/17/2016 05:52 PM, Chris via Python-list wrote: >>> >>> Any suggestions for a good open source text editor for the Mac out >>> there? For now, I am going

Re: best text editor for programming Python on a Mac

2016-06-18 Thread Michael Torrie
On 06/18/2016 06:12 PM, Lawrence D’Oliveiro wrote: > On Sunday, June 19, 2016 at 11:07:23 AM UTC+12, Michael Torrie > wrote: >> >> On 06/17/2016 05:52 PM, Chris via Python-list wrote: >>> >>> Any suggestions for a good open source text editor for the Mac >>> out there? For now, I am going to sti

Re: best text editor for programming Python on a Mac

2016-06-18 Thread Michael Torrie
On 06/18/2016 06:50 PM, Michael Torrie wrote: > On 06/18/2016 06:12 PM, Lawrence D’Oliveiro wrote: >> But not vi/vim. It only lets you place your cursor *on* a character, >> not *in-between* characters. That’s why you need two separate >> insertion commands, insert-before and insert-after. And one

Re: best text editor for programming Python on a Mac

2016-06-18 Thread Michael Torrie
On 06/18/2016 06:12 PM, Lawrence D’Oliveiro wrote: > Pull up any old GUI-based editor you like, for example Windows > (shudder) Notepad. If there are N characters in your file, then the > insertion point can be placed at N + 1 positions: in-between two > adjacent characters, or before the first cha

best text editor for programming Python on a Mac

2016-06-18 Thread drednot57
My go to python editor is Dr. Python. Coded in Python with the wxPython GUI library, but I use Linux. -- https://mail.python.org/mailman/listinfo/python-list

Re: best text editor for programming Python on a Mac

2016-06-18 Thread Lawrence D’Oliveiro
On Sunday, June 19, 2016 at 2:09:31 PM UTC+12, Michael Torrie wrote: > It was later on that they figured out the N+1 thing you mentioned by > ignoring the character cells: > > 0 1 2 3 4 5 6 7 8 9 10 > H E L L O W O R L D > > That works well for interactive editing, but it doesn't lend itself as

Re: best text editor for programming Python on a Mac

2016-06-18 Thread Michael Torrie
On 06/18/2016 08:51 PM, Lawrence D’Oliveiro wrote: > On Sunday, June 19, 2016 at 2:09:31 PM UTC+12, Michael Torrie wrote: >> It was later on that they figured out the N+1 thing you mentioned by >> ignoring the character cells: >> >> 0 1 2 3 4 5 6 7 8 9 10 >> H E L L O W O R L D >> >> That works we

Re: best text editor for programming Python on a Mac

2016-06-18 Thread Michael Torrie
On 06/18/2016 08:51 PM, Lawrence D’Oliveiro wrote: > On Sunday, June 19, 2016 at 2:09:31 PM UTC+12, Michael Torrie wrote: >> It was later on that they figured out the N+1 thing you mentioned >> by ignoring the character cells: >> >> 0 1 2 3 4 5 6 7 8 9 10 H E L L O W O R L D >> >> That works well

Re: best text editor for programming Python on a Mac

2016-06-18 Thread Lawrence D’Oliveiro
On Sunday, June 19, 2016 at 4:54:36 PM UTC+12, Michael Torrie wrote: > Two different ways of doing things. Let's not make the mistake of thinking one > way is necessarily better. When one leads to more complications, the answer is pretty clear... -- https://mail.python.org/mailman/listinfo/pytho