stripping (from item in list)

2014-07-20 Thread Martin S
While preparing to my gui to the app I made I thought it would be nice to be able to parse a text file with results using the same tool. So: I read a result file to a list, and every record gets appended with "\n" ... OK, so I look up how to remove it. And this doesn't work while c >=0: x

Re: stripping (from item in list)

2014-07-20 Thread Chris Angelico
On Sun, Jul 20, 2014 at 7:40 PM, Martin S wrote: > games[c].rstrip('\n') #This does nothing, expected to remove \n > > While all records in the remaining list now are valid, all also still > have "\n" at the end. What did I miss here? Strings don't change. When you call rstrip(), it r

Re: stripping (from item in list)

2014-07-20 Thread Martin S
Craps should have guessed that was the problem. Must have misunderstood the examples. But thanks =) And yes, definately should be able to build a better parser ... I want it to work first. /Martin S 2014-07-20 11:57 GMT+02:00 Chris Angelico : > On Sun, Jul 20, 2014 at 7:40 PM, Martin S wrote:

Re: stripping (from item in list)

2014-07-20 Thread Chris Angelico
On Sun, Jul 20, 2014 at 8:06 PM, Martin S wrote: > And yes, definately should be able to build a better parser ... I want > it to work first. Fair enough. That's why I answered your actual question before mentioning that as a tacked-on almost postscript. :) ChrisA -- https://mail.python.org/mai

Re: Writing Python File at Specific Interval

2014-07-20 Thread subhabangalore
On Thursday, July 10, 2014 5:21:01 AM UTC+5:30, Denis McMahon wrote: > On Wed, 09 Jul 2014 07:36:49 -0700, subhabangalore wrote: > > > > > The code (a basic crawler) would run every morning or evening, on a > > > predefined time. [This part is fine]. > > > > > > In the next part, I am trying

Re: Improving Idle (was Re: Python 3 ...)

2014-07-20 Thread Mark Lawrence
On 20/07/2014 02:42, Chris Angelico wrote: On Sun, Jul 20, 2014 at 11:31 AM, Rick Johnson wrote: Does the IDLE bug-tracker exist to *SOLVE* problems or to *PERPETUATE* them? Definitely the latter. If it weren't for that tracker, bugs would just quietly die on their own. The PSU has a roster f

Re: Writing Python File at Specific Interval

2014-07-20 Thread Mark Lawrence
On 20/07/2014 12:15, subhabangal...@gmail.com wrote: Dear Group, Thank you for your kind suggestion. It worked. Regards, Subhabrata Banerjee. I'm pleased to see that you have a solution. In return would you please use the mailing list https://mail.python.org/mailman/listinfo/python-list or

Re: Anything better than asyncio.as_completed() and asyncio.wait() to manage execution of large amount of tasks?

2014-07-20 Thread Valery Khamenya
Hi Maxime, many thanks for your great solution. It would be so great to have it in stock asyncio and use it out-of-the-box... I've made 4 fixes to it that are rather of "cosmetic" nature. Here is the final version: import asyncio from concurrent import futures def as_completed_with_max_workers(

Re: stripping (from item in list)

2014-07-20 Thread Terry Reedy
On 7/20/2014 5:40 AM, Martin S wrote: while c >=0: x=games[c][0] if x=="#": del games[c] #This removes the comments from the file parsed else: games[c].rstrip('\n') #This does nothing, expected to remove \n Chris already pointed out error he

PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"!

2014-07-20 Thread Rick Johnson
BUG 1: FileDialog Duplicity: If you open the IDLE application (either utilizing the "shell window" or "editor window") and then go to the "File" menu and choose the "Open" co

Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"!

2014-07-20 Thread Mark Lawrence
On 20/07/2014 22:14, Rick Johnson wrote: [loads of stuff snipped] Why bother writing all that here, why not put it all on the bug tracker, or has that already been done, either by you or someone else? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do

Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"!

2014-07-20 Thread Irmen de Jong
On 20-7-2014 23:14, Rick Johnson wrote: > And since IDLE is not a "tabbed editor", only *1* document > is going to be displayed at a time. False. Idle opens any number of documents at the same time just fine (in different windows - rather than tabs). While I don't see the use case for the possib

Idle's Shell: prompts and indents (was ...) Idle users please read

2014-07-20 Thread Terry Reedy
On 7/19/2014 9:31 PM, Rick Johnson wrote: On Saturday, July 19, 2014 3:45:07 PM UTC-5, Terry Reedy wrote: Idle's Shell currently uses a primary prompt ('>>> '), no secondary prompt*, and tabs for indents. This is a compromise between conflicting goals. It works but perhaps we can do better.

Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"!

2014-07-20 Thread Rick Johnson
On Sunday, July 20, 2014 4:40:59 PM UTC-5, Irmen de Jong wrote: > On 20-7-2014 23:14, Rick Johnson wrote: > > And since IDLE is not a "tabbed editor", only *1* > > document is going to be displayed at a time. > False. Idle opens any number of documents at the same time > just fine (in different win

Re: Idle's Shell: prompts and indents (was ...) Idle users please read

2014-07-20 Thread Chris Angelico
On Mon, Jul 21, 2014 at 7:52 AM, Terry Reedy wrote: > On 7/19/2014 9:31 PM, Rick Johnson wrote: > The problem originates in differences between the console - interactive > python interaction and Idle Shell - execution server interaction. > Interactive python prints prompts to and reads lines from

Re: Tabbed IDLE (was PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"!)

2014-07-20 Thread Tim Chase
On 2014-07-20 23:40, Irmen de Jong wrote: > > And since IDLE is not a "tabbed editor", only *1* document > > is going to be displayed at a time. > > False. Idle opens any number of documents at the same time just > fine (in different windows - rather than tabs). This sounds like a failing of th

Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"!

2014-07-20 Thread Chris Angelico
On Mon, Jul 21, 2014 at 8:44 AM, Rick Johnson wrote: > Filedialogs should be "truly modal", and like any modal > dialog, should present themselves to the user utilizing > blocking -- that is the whole point of "modal dialogs", to > *BLOCK* further execution of the application *UNTIL* the > user pr

Re: Tabbed IDLE (was PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"!)

2014-07-20 Thread Chris Angelico
On Mon, Jul 21, 2014 at 10:56 AM, Tim Chase wrote: > On 2014-07-20 23:40, Irmen de Jong wrote: >> > And since IDLE is not a "tabbed editor", only *1* document >> > is going to be displayed at a time. >> >> False. Idle opens any number of documents at the same time just >> fine (in different window

Re: Idle's Shell: prompts and indents (was ...) Idle users please read

2014-07-20 Thread Rick Johnson
On Sunday, July 20, 2014 4:52:36 PM UTC-5, Terry Reedy wrote: > On 7/19/2014 9:31 PM, Rick Johnson wrote: > > On Saturday, July 19, 2014 3:45:07 PM UTC-5, Terry Reedy wrote: > * The third paragraph below explains that Shell's prompt > is a statement prompt rather than line prompt, so that a > seco

Re: Idle's Shell: prompts and indents (was ...) Idle users please read

2014-07-20 Thread Chris Angelico
On Mon, Jul 21, 2014 at 11:22 AM, Rick Johnson wrote: > How can i offer improvements if i don't know where to find > the code? Look in hg.python.org/cpython and see what you find. You never know, it might even be there! ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Improving Idle (was Re: Python 3 ...)

2014-07-20 Thread Mark Lawrence
On 19/07/2014 21:45, Terry Reedy wrote: If you are talking about user processes, and we are talking about patching Idle, as opposed to Python or the OS (such as Windows), I disagree. If you are talking about the Idle process, then yes, I would prefer that once Idle starts, it run forever, and re

Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"!

2014-07-20 Thread Rick Johnson
On Sunday, July 20, 2014 8:02:11 PM UTC-5, Chris Angelico wrote: > File dialogs can be modal or modeless. [...] and there are > good reasons for both operation styles [...] Are you > seriously unaware of standard GUI widget functionality? Chris i get so tired of your trolling, you cannot just post

Re: Tabbed IDLE (was PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"!)

2014-07-20 Thread Tim Chase
On 2014-07-20 23:40, Irmen de Jong wrote: > > And since IDLE is not a "tabbed editor", only *1* document > > is going to be displayed at a time. > > False. Idle opens any number of documents at the same time just > fine (in different windows - rather than tabs). This sounds like a failing of th

Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"!

2014-07-20 Thread Tim Chase
On 2014-07-20 19:06, Rick Johnson wrote: > > STEPS TO REPRODUCE BUG 1: "Attack of the clones!" > > > 1. Open the IDLE application > 2. Maximize the window that appears > 3. Go

Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"!

2014-07-20 Thread Chris Angelico
On Mon, Jul 21, 2014 at 12:06 PM, Rick Johnson wrote: > STEPS TO REPRODUCE BUG 1: "Attack of the clones!" > > 1. Open the IDLE application > 2. Maximize the window that appears > 3. Go to the "File Menu" and choose the "Open" command > > Now repeat step 3 at least one more time, but feel free to

Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"!

2014-07-20 Thread Mark Lawrence
[snipped to bits] On 21/07/2014 03:38, Chris Angelico wrote: On Mon, Jul 21, 2014 at 12:06 PM, Rick Johnson wrote: STEPS TO REPRODUCE BUG 1: "Attack of the clones!" This is not an Idle bug at all. It's a window manager issue. ChrisA Attack of the clown? -- My fellow Pythonistas, ask n

Idle open file dialogs (was ...)

2014-07-20 Thread Terry Reedy
On 7/20/2014 5:14 PM, Rick Johnson wrote: Idle's Open file dialog is not modal. More than one can be open at one time. The all open as the same place. They can all be hidden by other windows, including the parent, especially if the parent is full screen. These might or might not be design bugs

Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"!

2014-07-20 Thread Terry Reedy
On 7/20/2014 10:38 PM, Chris Angelico wrote: on Windows. The file dialog appears in the alt-tab list, which seems perfectly sane and sensible, and in fact alt-tab is the most logical way to move between maximized windows anyway. Thank you for the fact, and the suggestion. -- Terry Jan Reedy

Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"!

2014-07-20 Thread Chris Angelico
On Mon, Jul 21, 2014 at 1:05 PM, Terry Reedy wrote: > On 7/20/2014 10:38 PM, Chris Angelico wrote: > >> on Windows. The file dialog appears in the alt-tab list, which seems >> perfectly sane and sensible, and in fact alt-tab is the most logical >> way to move between maximized windows anyway. > >

Re: Idle's Shell: prompts and indents (was ...) Idle users please read

2014-07-20 Thread Terry Reedy
On 7/20/2014 8:55 PM, Chris Angelico wrote: Idea 4 (which I already suggested on the tracker). Put statement input prompts and output separators on lines by themselves. As with 3. above, use standard 4 space indents, as with : def f(x): if x: print('got it') return 'so

Re: Idle's Shell: prompts and indents (was ...) Idle users please read

2014-07-20 Thread Chris Angelico
On Mon, Jul 21, 2014 at 1:28 PM, Terry Reedy wrote: > A few users have noticed (and complained) that setting sys.ps1 and sys.ps2 > *in the batch mode user process* has no effect. The Idle doc should better > explain why this is and should be. User code should not affect the > operation of Idle. I

Re: Idle's Shell: prompts and indents (was ...) Idle users please read

2014-07-20 Thread Terry Reedy
On 7/20/2014 9:22 PM, Rick Johnson wrote: On Sunday, July 20, 2014 4:52:36 PM UTC-5, Terry Reedy wrote: The *real* problem is that the "interactive events" of the "editor window" and the "interactive events" of the "shell window" are far too tightly integrated with one another. I myself appre

Re: OT: usenet reader software

2014-07-20 Thread Monte Milanuk
On 2014-07-20, Chris Angelico wrote: > Ctrl-X in Angband, Ah-HAH! I've been trying to remember what the name was of an old CLI game that I used to play via a dialup ssh connection (using PuTTY) to a Panix.com account (they ran on NetBSD). Screen was my friend due to dropped connections, and I

Re: OT: usenet reader software

2014-07-20 Thread Chris Angelico
On Mon, Jul 21, 2014 at 2:06 PM, Monte Milanuk wrote: > On 2014-07-20, Chris Angelico wrote: >> Ctrl-X in Angband, > > Ah-HAH! I've been trying to remember what the name was of an old CLI > game that I used to play via a dialup ssh connection (using PuTTY) to a > Panix.com account (they ran on

Re: OT: usenet reader software

2014-07-20 Thread Paul Rudin
Sturla Molden writes: > wrote: > >> That doesn't address the problem at all! :-) You still need a news >> reader. > > The problem was that Thunderbird does not support killfiles when used as a > newsreader. Leafnode adds filtering capabilities which Thunderbird > (supposedly) does not have. >

Re: OT: usenet reader software

2014-07-20 Thread Martin S
I'm trying gnus again, and immediately see the beauty of it. Actually Usenet is fast and commercial free, and easier to secure from prying NSA etc al (?) so maybe it will receive a general revival eventually. /martin s On 21 Jul 2014, Paul Rudin wrote: >Sturla Molden writes: > >> wrote: >>