Re: Running a command line program and reading the result as it runs

2013-08-22 Thread Ian Simcock
Chris Angelico wrote: On Fri, Aug 23, 2013 at 1:26 AM, Ian Simcock wrote: Chris Angelico wrote: A lot of programs, when their output is not going to the console, will buffer output. It's more efficient for many purposes. With Unix utilities, there's often a parameter like --pipe or --unbuff

Re: PEPs should be included with the documentation download

2013-08-22 Thread Ben Finney
Chris Angelico writes: > Hence the question: How many people actually do use the downloaded > docs? Maybe it'd turn out to be quite high, but it's not an > unreasonable question. I think it's an unreasonable question. What would you accept as an answer? Who could possibly be autoritative at esti

Re: Basic Python Query

2013-08-22 Thread random832
On Thu, Aug 22, 2013, at 18:22, Dennis Lee Bieber wrote: > Well... The main thing to understand is that this particular "forum" is > NOT JUST a mailing-list. It is cross-linked with the Usenet > comp.lang.python news-group (and that, unfortunately, is cross-linked to > Google-Groups). And to

Current trends in python

2013-08-22 Thread Rohit Chormale
Dear friends, can anybody help me to know latest trends in python...back,middle,front end softwares...frameworks etc also how exactly python based projects are developed? thank u -- http://mail.python.org/mailman/listinfo/python-list

Re: c# async, await

2013-08-22 Thread Ian Kelly
On Thu, Aug 22, 2013 at 5:29 AM, Neal Becker wrote: > So my son is now spending his days on c# and .net. He's enthusiastic about > async and await, and said to me last evening, "I don't think python has > anything > like that". I'm not terribly knowledgeable myself regarding async programming >

Re: Basic Python Query

2013-08-22 Thread Steven D'Aprano
On Thu, 22 Aug 2013 13:54:14 +0200, Ulrich Eckhardt wrote: > Firstly, there is one observation: The Python object of type Thread is > one thing, the actual thread is another thing. This is similar to the > File instance and the actual file. The Python object represents the > other thing (thread or

Re: Basic Python Query

2013-08-22 Thread Steven D'Aprano
On Thu, 22 Aug 2013 09:45:43 -0400, Ned Batchelder wrote: > So that I understand what's going on, what's the bad thing that happens > with a multi-part message? I would have thought that mail readers would > choose the preferred part, or is it something to do with the message > quoting? This is

Re: New book: Python in Practice

2013-08-22 Thread Steven D'Aprano
On Thu, 22 Aug 2013 02:39:01 -0700, Mark Summerfield wrote: > Hi, > > My new Python 3-based book, "Python in Practice", is due out next week. > > The book is aimed at people who can already program in Python and want > to take their coding further. > > The book's web page (http://www.qtrac.eu/p

Re: Encapsulation unpythonic?

2013-08-22 Thread chaz2cry
On Saturday, August 17, 2013 8:26:32 AM UTC-4, Fernando Saldanha wrote: > I am new to Python, with experience in Java, C++ and R. > > > > As I understand encapsulation is not a big thing in the Python world. I read > that you can put two underscores before the name of a variable within a class

Re: PEPs should be included with the documentation download

2013-08-22 Thread Chris Angelico
On Fri, Aug 23, 2013 at 11:47 AM, Ben Finney wrote: > Chris Angelico writes: > >> Also, how many people actually depend on the downloadable >> documentation, rather than simply reading things online? > > Many countries do not have infrastructure that allows reliable, fast, > low-latency internet

Re: PEPs should be included with the documentation download

2013-08-22 Thread Ben Finney
Chris Angelico writes: > Also, how many people actually depend on the downloadable > documentation, rather than simply reading things online? Many countries do not have infrastructure that allows reliable, fast, low-latency internet access 24-hours-a-day. Most countries's internet infrastructure

Re: Replace blanks with letter

2013-08-22 Thread Dave Angel
eschneide...@comcast.net wrote: > I wanted the program to stop only after all the letters were typed; why in > the world would I try to write a program with blanks for each letter that > seem intended to be filled, only to have it stop if the last letter is typed, > or have to type each letter

Re: Using PyQT with QT Designer

2013-08-22 Thread tausciam
On Thursday, August 22, 2013 3:26:17 AM UTC-5, Phil Thompson wrote: > It looks like you aren't using a layout to arrange your widgets. > > Explicitly specifying geometries is a bad idea. > > > > Phil Thanks.QT Designer uses set geometry and I'm totally lost as how to implement it. I've tried

Re: c# async, await

2013-08-22 Thread Terry Reedy
On 8/22/2013 9:57 AM, Michael Torrie wrote: On 08/22/2013 05:29 AM, Neal Becker wrote: So my son is now spending his days on c# and .net. He's enthusiastic about async and await, and said to me last evening, "I don't think python has anything like that". I'm not terribly knowledgeable myself r

Re: PEPs should be included with the documentation download

2013-08-22 Thread Terry Reedy
On 8/22/2013 4:39 AM, Aseem Bansal wrote: I do depend on offline documentation. I have both Python2 and 3's documentation offline. A lot of people have 24-hour access to internet but a lot of people don't have. And while moving around it isn't always possible to have internet then offline docu

Re: Replace blanks with letter

2013-08-22 Thread eschneider92
I wanted the program to stop only after all the letters were typed; why in the world would I try to write a program with blanks for each letter that seem intended to be filled, only to have it stop if the last letter is typed, or have to type each letter so many times until its processed? If you

Re: Replace blanks with letter

2013-08-22 Thread eschneider92
I wanted the program to stop only after all the letters were typed; why in the world would I try to write a program with blanks for each letter that seem intended to be filled, only to have it stop if the last letter is typed, or have to type each letter so many times until its processed? If you

Re: Can a child access parent attributes if that child added post-hoc as an attribute to the parent?

2013-08-22 Thread Bitswapper
On Thursday, August 22, 2013 4:26:24 PM UTC-5, Prasad, Ramit wrote: > Bitswapper wrote: > > > > > > So I have a parent and child class: > > > > > > > > > class Map(object): > > > def __init__(self, name=''): > > > self.mapName = name > > > self.rules = {} > > > > > > c

Re: Can a child access parent attributes if that child added post-hoc as an attribute to the parent?

2013-08-22 Thread Ian Kelly
On Thu, Aug 22, 2013 at 3:26 PM, Prasad, Ramit wrote: > Bitswapper wrote: >> >> So I have a parent and child class: >> >> >> class Map(object): >> def __init__(self, name=''): >> self.mapName = name >> self.rules = {} >> >> class Rule(Map): >> def __init__(self, number): >>

RE: Can a child access parent attributes if that child added post-hoc as an attribute to the parent?

2013-08-22 Thread Prasad, Ramit
Bitswapper wrote: > > So I have a parent and child class: > > > class Map(object): > def __init__(self, name=''): > self.mapName = name > self.rules = {} > > class Rule(Map): > def __init__(self, number): > Map.__init__(self) > self.number = number This

Re: Running a command line program and reading the result as it runs

2013-08-22 Thread Rob Wolfe
Ian Simcock writes: > Greetings all. > > I'm using Python 2.7 under Windows and am trying to run a command line > program and process the programs output as it is running. A number of > web searches have indicated that the following code would work. > > import subprocess > > p = subprocess.Popen(

Can a child access parent attributes if that child added post-hoc as an attribute to the parent?

2013-08-22 Thread Bitswapper
So I have a parent and child class: class Map(object): def __init__(self, name=''): self.mapName = name self.rules = {} class Rule(Map): def __init__(self, number): Map.__init__(self) self.number = number def __repr__(self): return "Map " + se

Re: python3-sqlalchemy and debian repo

2013-08-22 Thread Lele Gaifax
Chris Angelico writes: > It may be that the -ext accelerator isn't available for Py3 in package > form, or it might be incorporated, I don't know. AFAICT, the Py3 accelerators will be available with SA 0.9. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real:

Re: Basic Python Query

2013-08-22 Thread random832
On Thu, Aug 22, 2013, at 9:45, Ned Batchelder wrote: > So that I understand what's going on, what's the bad thing that happens > with a multi-part message? I would have thought that mail readers would > choose the preferred part, or is it something to do with the message > quoting? The bad thi

Re: Basic Python Query

2013-08-22 Thread Ned Batchelder
On 8/22/13 1:43 AM, Bob Martin wrote: in 704175 20130822 010625 Ned Batchelder wrote: This is a multi-part message in MIME format. Please post in plain text, not HTML. Sorry, Bob, I will try to remember in the future. I think Thunderbird is sending in the same format as the replied-to

Re: Python, VST and Csound

2013-08-22 Thread Tobiah
Have you tried the csound mailing list? There's a lot of strong talent there. To subscribe, send an e-mail to: sy...@lists.bath.ac.uk On 08/22/2013 08:32 AM, esnho esnho wrote: Hello to all, I have a question for you: is possible to develop VST using Python interfaced with Csound? In case it

Python, VST and Csound

2013-08-22 Thread esnho esnho
Hello to all, I have a question for you: is possible to develop VST using Python interfaced with Csound? In case it is possible, there are any resources that can help in the developing? Thank you very much. -- http://mail.python.org/mailman/listinfo/python-list

Re: Running a command line program and reading the result as it runs

2013-08-22 Thread Chris Angelico
On Fri, Aug 23, 2013 at 1:26 AM, Ian Simcock wrote: > Chris Angelico wrote: >> >> Is the program actually producing output progressively? I just tried >> your exact code with "dir /ad /s /b" and it worked fine, producing >> output while the dir was still spinning (obviously setting shell=True >> t

Re: Running a command line program and reading the result as it runs

2013-08-22 Thread Ian Simcock
Chris Angelico wrote: Is the program actually producing output progressively? I just tried your exact code with "dir /ad /s /b" and it worked fine, producing output while the dir was still spinning (obviously setting shell=True to make that work, but I don't think that'll make a difference). It m

Re: I wonder if I would be able to collect data from such page using Python

2013-08-22 Thread Chris Angelico
On Fri, Aug 23, 2013 at 1:03 AM, Comment Holder wrote: > As I am new, I won't ask for assistance before I get some general idea about > Python. I shall dedicate the weekend for this purpose, or at least Sunday. > Once I am done, I will post my results back in here. Smart move :) I strongly rec

Re: I wonder if I would be able to collect data from such page using Python

2013-08-22 Thread Comment Holder
Dear Piet, Many thanks for your assistance. It is much appreciated. I have just installed Python 3.3.2 and BeautifulSoup 4.3.1. I tried running the code, but run into some syntax errors. > I wonder how you would want that with multiparagraph contents. I am looking to save all the paragraphs

Re: I wonder if I would be able to collect data from such page using Python

2013-08-22 Thread Comment Holder
Dear Terry, Many thanks for your comments. Actually I was, because the target-page doesn't have a neat structure. But, after all of your contributions, I think the task can be achieved very well with Python. Thanks again & all best// -- http://mail.python.org/mailman/listinfo/python-list

Re: c# async, await

2013-08-22 Thread Neil Cerutti
On 2013-08-22, Neal Becker wrote: > So my son is now spending his days on c# and .net. He's enthusiastic about > async and await, and said to me last evening, "I don't think python has > anything > like that". I'm not terribly knowledgeable myself regarding async > programming > (since I ne

Re: c# async, await

2013-08-22 Thread Michael Torrie
On 08/22/2013 05:29 AM, Neal Becker wrote: > So my son is now spending his days on c# and .net. He's enthusiastic about > async and await, and said to me last evening, "I don't think python has > anything > like that". I'm not terribly knowledgeable myself regarding async > programming > (si

Re: pydoc vs. non-def'd methods

2013-08-22 Thread Dan Sommers
On Thu, 22 Aug 2013 06:39:48 +, Steven D'Aprano wrote: > On Thu, 22 Aug 2013 05:13:03 +, Dan Sommers wrote: >> class Spam1: >> >> def eggs(self): >> '''Return the Meaning of Life.''' >> return 42 >> >> ham = eggs >> >> >> help(Spam1) shows that ham = eggs(self)

Re: A data transformation framework. A presentation inviting commentary.

2013-08-22 Thread F.R.
On 08/21/2013 06:29 PM, F.R. wrote: Hi all, In an effort to do some serious cleaning up of a hopelessly cluttered working environment, I developed a modular data transformation system that pretty much stands. I am very . . . etc Chris, Terry, Dieter, thanks for your suggestions. Chris: If

Re: python3-sqlalchemy and debian repo

2013-08-22 Thread Chris Angelico
On Thu, Aug 22, 2013 at 4:41 AM, Mohsen Pahlevanzadeh wrote: > Dear all, > > I want to use sqlalchemy library, When i use "apt-cashe search > sqlalchemy" , get the following result(part of result): > /// > python-sqlalchemy - SQL toolkit and Object Relational Mapper for Python > python

Re: Basic Python Query

2013-08-22 Thread Ulrich Eckhardt
Am 21.08.2013 20:58, schrieb Johannes Bauer: On 21.08.2013 11:11, Ulrich Eckhardt wrote: That said, there is never a need for deriving from the Thread class, you can also use it to run a function without that. That way is IMHO clearer because the threading.Thread instance is not the thread, jus

c# async, await

2013-08-22 Thread Neal Becker
So my son is now spending his days on c# and .net. He's enthusiastic about async and await, and said to me last evening, "I don't think python has anything like that". I'm not terribly knowledgeable myself regarding async programming (since I never need to use it). I did look at this: http:

New book: Python in Practice

2013-08-22 Thread Mark Summerfield
Hi, My new Python 3-based book, "Python in Practice", is due out next week. The book is aimed at people who can already program in Python and want to take their coding further. The book's web page (http://www.qtrac.eu/pipbook.html) has the table of contents and a link to a free PDF of Chapter 1

Re: pydoc vs. non-def'd methods

2013-08-22 Thread Fábio Santos
On 22 Aug 2013 06:17, "Dan Sommers" wrote: > > Greetings, > > I'm hava a class in which there are two equally useful names for one > method. Consider this design (there are other approaches, but that's > not what my question is about): > > class Spam1: > > def eggs(self): > '''Return

Re: Basic Python Query

2013-08-22 Thread Johannes Bauer
On 22.08.2013 02:06, Ned Batchelder wrote: >> I cannot tell whether you are trolling or are just new to this, but >> you don't always have to use threads. You use threads when you need >> multiple parts of your program running concurrently. Don't inherit >> Thread if all you are doing is a simple

Re: Basic Python Query

2013-08-22 Thread Johannes Bauer
On 22.08.2013 00:50, Fábio Santos wrote: >>> That said, there is never a need for deriving >>> from the Thread class, you can also use it to run a function without >>> that. That way is IMHO clearer because the threading.Thread instance is >>> not the thread, just like a File instance is not a fil

Re: PEPs should be included with the documentation download

2013-08-22 Thread Aseem Bansal
On Wednesday, August 21, 2013 11:25:44 PM UTC+5:30, rand...@fastmail.us wrote: > I think, though, that if there's any useful information that can be > obtained by reading accepted PEPs but not the documentation, or if > things are explained less clearly than in the PEPs, that's a bug in the > docum

Re: Basic Python Query

2013-08-22 Thread Fábio Santos
On 22 Aug 2013 08:58, "chandan kumar" wrote: > > Hi all, > > Sorry for not explaining question properly.Here Its not about threading and dont worry about any indentations.Please see below example > > class Call_Constructor(): > def __init__(self): > print "In __init__ " > > class Test_

Re: PEPs should be included with the documentation download

2013-08-22 Thread Aseem Bansal
I do depend on offline documentation. I have both Python2 and 3's documentation offline. A lot of people have 24-hour access to internet but a lot of people don't have. And while moving around it isn't always possible to have internet then offline documentation is really helpful. -- http://mail

Re: Using PyQT with QT Designer

2013-08-22 Thread Phil Thompson
On Wed, 21 Aug 2013 21:04:47 -0500, Michael Staggs wrote: > I'm learning Python and I have a problem. I've asked the question > everywhere > and no one helps me, so I'm hoping someone here will. I am making a > program > that shows album covers and you click on the album cover in the top > windo

Re: Basic Python Query

2013-08-22 Thread chandan kumar
Hi all, Sorry for not explaining question properly.Here Its not about threading and dont worry about any indentations.Please see below example class Call_Constructor(): def __init__(self): print "In __init__ " class Test_Constructor(Call_Constructor): def method(self):