Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Steven D'Aprano
On Wed, 18 Dec 2013 01:33:03 +, Steven D'Aprano wrote: >> or just what operation "x + y" is >> actually going to perform. > > > With no operator overloading, that one at least is correct. Actually, I stand corrected. I was completely mistaken about that. The C operation x + y is undefined

Windows+Python: Why is the first opened window not shown active?

2013-12-17 Thread asmwarrior
Hello, Python community. I have found a very strange problem about using the python scripts under Python Windows command line prompt, to reproduce this issue, you can simply do those steps: 1. start a Python command line prompt(this is usually to hit the Start Menu->Python 2.7->Python(command

Re: Struggling for inspiration with lists

2013-12-17 Thread Tim Chase
On 2013-12-18 03:51, Denis McMahon wrote: > I need to keep the timestamp / data association because I need to > generate output that identifies (a) the longest repeated sequence > (b) how many elements in the longest repeated sequence (c) at what > timestamps each occurrence started. > > I'm not

Re: Logger module in python

2013-12-17 Thread rusi
On Wednesday, December 18, 2013 8:52:11 AM UTC+5:30, smileso...@gmail.com wrote: > Hi, > I am a newbie in python. I am looking for a existing module which I can > import in my program to log the objects to a file? > I know there is a module Data::Dumper in perl which dumps the objects to > fil

RE: seeking a framework to automate router configurations

2013-12-17 Thread Frank Cui
Thank you guys for the input, I have determined to go with the plain old "expect" as it seems most easy to go with for this task. Frank > Date: Tue, 17 Dec 2013 19:59:31 -0800 > Subject: Re: seeking a framework to automate router configurations > From: rustompm...@gmail.com > To: python-list@pyth

Re: Logger module in python

2013-12-17 Thread Mark Lawrence
On 18/12/2013 03:36, Cameron Simpson wrote: On 18Dec2013 03:27, Mark Lawrence wrote: On 18/12/2013 03:22, smilesonisa...@gmail.com wrote: I am a newbie in python. I am looking for a existing module which I can import in my program to log the objects to a file? I know there is a module Data

Re: seeking a framework to automate router configurations

2013-12-17 Thread rusi
On Wednesday, December 18, 2013 8:10:20 AM UTC+5:30, Frank Cui wrote: > Hi Pythoners, > I'm looking for a tool or framework in which I can do a slight modification to > achieve the following task: > "Asynchronously reset a large number of cisco routers back to their original > configurations and pu

Re: Logger module in python

2013-12-17 Thread Cameron Simpson
On 18Dec2013 03:27, Mark Lawrence wrote: > On 18/12/2013 03:22, smilesonisa...@gmail.com wrote: > > I am a newbie in python. I am looking for a existing module which I can > > import in my program to log the objects to a file? > >I know there is a module Data::Dumper in perl which dumps the obj

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Paul Smith
On Wed, 2013-12-18 at 01:33 +, Steven D'Aprano wrote: > And "What does 'implementation-specific undefined behaviour' actually > mean in practice?", another common question when dealing with C. Only asked by people who haven't had it explained. There's "undefined behavior", and there's "imple

Re: Logger module in python

2013-12-17 Thread Roy Smith
In article , smilesonisa...@gmail.com wrote: > Hi, > I am a newbie in python. I am looking for a existing module which I can > import in my program to log the objects to a file? > > I know there is a module Data::Dumper in perl which dumps the objects to > file. But not sure about python.

Struggling for inspiration with lists

2013-12-17 Thread Denis McMahon
Hi I have a list of data that presents as: timestamp: value Timestamps are used solely to determine the sequence of items in the list. I want to find the longest repeated sequence of values in the list. Example, in the following list: data = { 0: "d", 1: "x", 2: "y", 3: "t", 4: "d", 5: "y", 7

Re: Logger module in python

2013-12-17 Thread Paul Smith
On Wed, 2013-12-18 at 03:27 +, Mark Lawrence wrote: > On 18/12/2013 03:22, smilesonisa...@gmail.com wrote: > > Hi, > > I am a newbie in python. I am looking for a existing module which I > can import in my program to log the objects to a file? > > > > I know there is a module Data::Dumper in pe

Re: seeking a framework to automate router configurations

2013-12-17 Thread Chris Angelico
On Wed, Dec 18, 2013 at 2:13 PM, Frank Cui wrote: > Thanks for the advice! > > I'm aware of this module, the problem is that this is quite a low level > module and I would have quite a lot to re-invent specific to telneting to a > cisco router. Do you know what it is you'd have to be reinventing?

RE: seeking a framework to automate router configurations

2013-12-17 Thread Frank Cui
Hi Chris, Thanks for the advice! I'm aware of this module, the problem is that this is quite a low level module and I would have quite a lot to re-invent specific to telneting to a cisco router. Thanks! > Date: Wed, 18 Dec 2013 14:27:55 +1100 > Subject: Re: seeking a framework to automate route

Re: Is it more CPU-efficient to read/write config file or read/write sqlite database?

2013-12-17 Thread Chris Angelico
On Wed, Dec 18, 2013 at 1:37 PM, Cameron Simpson wrote: >> I'd say this is the right thing for a DB to do. If it comes back >> from a commit() call, it better be on that disk, barring a failure >> of the physical hardware. If it comes back from a commit() and data >> gets lost because of a power

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Chris Angelico
On Wed, Dec 18, 2013 at 2:12 PM, Devin Jeanpierre wrote: >> Wrong. A pointer is a scalar value, usually some kind of integer, and >> its lifetime is the same as any other scalar. > > The duration of a pointer's validity is far more interesting, and that > is why it is the primary meaning of the te

Re: seeking a framework to automate router configurations

2013-12-17 Thread Chris Angelico
On Wed, Dec 18, 2013 at 1:40 PM, Frank Cui wrote: > "Asynchronously reset a large number of cisco routers back to their original > configurations and push prepared initial configurations to them" >From the sound of your partial solutions, this is done over a TCP/IP socket? I don't know how you'd

Re: Logger module in python

2013-12-17 Thread Mark Lawrence
On 18/12/2013 03:22, smilesonisa...@gmail.com wrote: Hi, I am a newbie in python. I am looking for a existing module which I can import in my program to log the objects to a file? I know there is a module Data::Dumper in perl which dumps the objects to file. But not sure about python. Can

Logger module in python

2013-12-17 Thread smilesonisamal
Hi, I am a newbie in python. I am looking for a existing module which I can import in my program to log the objects to a file? I know there is a module Data::Dumper in perl which dumps the objects to file. But not sure about python. Can anybody help me in this regard? Regards Pradeep -- htt

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Devin Jeanpierre
On Tue, Dec 17, 2013 at 7:01 PM, Chris Angelico wrote: > On Wed, Dec 18, 2013 at 1:33 PM, Devin Jeanpierre > wrote: >> Yes you do. Lifetimes are hard, because you need to malloc a lot, and >> there is no defined lifetime for pointers -- they could last for just >> the lifetime of a stack frame, o

seeking a framework to automate router configurations

2013-12-17 Thread Frank Cui
Hi Pythoners, I'm looking for a tool or framework in which I can do a slight modification to achieve the following task: "Asynchronously reset a large number of cisco routers back to their original configurations and push prepared initial configurations to them" I did find some similar existing w

Re: Is it more CPU-efficient to read/write config file or read/write sqlite database?

2013-12-17 Thread Cameron Simpson
On 15Dec2013 18:07, Tim Chase wrote: > > + only lets one process access the db at a time, taking you back > > to a similar situation as with config files > > Is this a Python limitation? According to the docs[1], it's not a > sqlite limitation (except, as noted, on non-locking filesystems like

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Chris Angelico
On Wed, Dec 18, 2013 at 1:33 PM, Devin Jeanpierre wrote: > On Tue, Dec 17, 2013 at 4:32 PM, Roy Smith wrote: >> There's very few mysteries in C. You never have to wonder what the >> lifetime of an object is > > Yes you do. Lifetimes are hard, because you need to malloc a lot, and > there is no d

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Devin Jeanpierre
On Tue, Dec 17, 2013 at 4:32 PM, Roy Smith wrote: > There's very few mysteries in C. You never have to wonder what the > lifetime of an object is Yes you do. Lifetimes are hard, because you need to malloc a lot, and there is no defined lifetime for pointers -- they could last for just the lifeti

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Chris Angelico
On Wed, Dec 18, 2013 at 12:33 PM, Steven D'Aprano wrote: > On Tue, 17 Dec 2013 19:32:20 -0500, Roy Smith wrote: > >> There's very few mysteries in C. > > Apart from "What the hell does this piece of code actually do?". It's no > coincidence that C, and Perl which borrows a lot of syntax from C, ar

Re: Type of an object:

2013-12-17 Thread Ethan Furman
On 12/17/2013 03:51 PM, Steven D'Aprano wrote: This leads to another question: we've now seen two examples where (presumably) the internal type field and __class__ differ. In the weakproxy case, type(obj) returns the internal type field. In the "regular" case, where you set obj.__class__ to a cl

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Steven D'Aprano
On Tue, 17 Dec 2013 19:32:20 -0500, Roy Smith wrote: > There's very few mysteries in C. Apart from "What the hell does this piece of code actually do?". It's no coincidence that C, and Perl which borrows a lot of syntax from C, are the two champion languages for writing obfuscated code. And "W

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Roy Smith
In article , Grant Edwards wrote: > Ideally, you should also have written at least one functioning > compiler before learning C as well. Why? I've never written a compiler. I've written plenty of C. I don't see how my lack of compiler writing experience has hindered my ability to write C.

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Roy Smith
In article <20131217165144.39bf9ba1cd4e4f27a9689...@gmx.net>, Wolfgang Keller wrote: > C is just a kafkaesque mess invented by a sadistic pervert who must > have regularly consumed illegal substances for breakfast. Don't be absurd. C is a perfectly good language for the kinds of things it's

Re: Type of an object:

2013-12-17 Thread Steven D'Aprano
On Wed, 18 Dec 2013 11:15:03 +1300, Gregory Ewing wrote: > Steven D'Aprano wrote: >> Well, that is a surprise, but I don't think that is intended behaviour. >> I think that's something which only works by accident. The intention is >> that __class__ returns the instance's type, not arbitrary value

Re: Python and MIDI

2013-12-17 Thread Dave Angel
On Tue, 17 Dec 2013 08:45:28 -0800, Tobiah wrote: Is there a module out there that would let me send a predetermined list of midi messages to a MIDI device in such a way that the timing would be precise enough for music? Probably. I haven't tried it but I'd look first at pygame. Maybe first

Re: PDFMiner install question

2013-12-17 Thread MRAB
On 17/12/2013 20:59, Jason Mellone wrote:> On Tuesday, December 17, 2013 3:53:24 PM UTC-5, Jason Mellone wrote: >> On Tuesday, December 17, 2013 3:32:56 PM UTC-5, MRAB wrote: >>> On 17/12/2013 20:06, Jason Mellone wrote: Hello, I have python up and running using the exact setup as

Re: Type of an object:

2013-12-17 Thread Gregory Ewing
Steven D'Aprano wrote: Well, that is a surprise, but I don't think that is intended behaviour. I think that's something which only works by accident. The intention is that __class__ returns the instance's type, not arbitrary values. Well, a proxy object would obviously return a suitable class-

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread wxjmfauth
Le mardi 17 décembre 2013 19:06:35 UTC+1, Michael Torrie a écrit : > On 12/17/2013 08:00 AM, Wolfgang Keller wrote: > > >> Python is sooo slow when it waits for the human. > > > > > > With Windows systems, I waste something like 90% of my work time waiting > > > for that system to stop "No

Re: PDFMiner install question

2013-12-17 Thread Mark Lawrence
On 17/12/2013 20:59, Jason Mellone wrote: On Tuesday, December 17, 2013 3:53:24 PM UTC-5, Jason Mellone wrote: On Tuesday, December 17, 2013 3:32:56 PM UTC-5, MRAB wrote: On 17/12/2013 20:06, Jason Mellone wrote: Hello, I have python up and running using the exact setup a

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Joel Goldstick
On Tue, Dec 17, 2013 at 1:20 PM, Chris Angelico wrote: > On Wed, Dec 18, 2013 at 5:03 AM, rusi wrote: > > On Tuesday, December 17, 2013 8:21:39 PM UTC+5:30, Neil Cerutti wrote: > >> I can't think of a reference, but I to recall that > >> bugs-per-line-of-code is nearly constant; it is not langua

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread Mark Lawrence
On 17/12/2013 19:00, wxjmfa...@gmail.com wrote: Le mardi 17 décembre 2013 19:06:35 UTC+1, Michael Torrie a écrit : On 12/17/2013 08:00 AM, Wolfgang Keller wrote: Python is sooo slow when it waits for the human. With Windows systems, I waste something like 90% of my work time waiting

Re: Packaging a private project

2013-12-17 Thread Thomas Heller
Am 16.12.2013 12:18, schrieb Nicholas Cole: Dear List, What is the best way to distribute a private, pure python, Python 3 project that needs several modules (some available on pypi but some private and used by several separate projects) in order to run? I'd like to include everything that my p

Re: PDFMiner install question

2013-12-17 Thread Jason Mellone
On Tuesday, December 17, 2013 3:53:24 PM UTC-5, Jason Mellone wrote: > On Tuesday, December 17, 2013 3:32:56 PM UTC-5, MRAB wrote: > > > On 17/12/2013 20:06, Jason Mellone wrote: > > > > > > > Hello, > > > > > > > > > > > > > > I have python up and running using the exact setup as recomme

Re: PDFMiner install question

2013-12-17 Thread Jason Mellone
On Tuesday, December 17, 2013 3:32:56 PM UTC-5, MRAB wrote: > On 17/12/2013 20:06, Jason Mellone wrote: > > > Hello, > > > > > > I have python up and running using the exact setup as recommended by > > http://learnpythonthehardway.org/ > > > > > > I am now trying to use pdfminer. > > > > >

Re: PDFMiner install question

2013-12-17 Thread MRAB
On 17/12/2013 20:06, Jason Mellone wrote: Hello, I have python up and running using the exact setup as recommended by http://learnpythonthehardway.org/ I am now trying to use pdfminer. I have python here: C:\USERS\Python27 using "import os", i am able to cwd to C:\users\python where i have

Re: [newbie] Saving binaries in a specific way

2013-12-17 Thread Djoser
Thank you. With numpy it works perfectly. I thought it would lost the information about int32 and int16 with this approach. Now I will try to make the script with struct too, but I'll need a bit more time to really understand. For me it's a new paradigm. But that's nice. :) -- https://mail.pyth

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Grant Edwards
On 2013-12-17, Mark Lawrence wrote: > On 17/12/2013 16:59, Grant Edwards wrote: >> >> I've always thought C was a great language for low-level, bare-metal, >> embedded stuff -- but teaching it to first or second year computer >> science students is just insane. C has a certain minimalist >> ortho

Multiprocessing pool with custom process class

2013-12-17 Thread Sergey Fedorov
Hi All, I have a web-service that needs to handle a bunch of work requests. Each job involves IO call (DB, external web-services to fetch some data), so part of the time is spent on the blocking IO call. On the other side, after getting the data the job involves computational part (using numpy/pan

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Gene Heskett
On Tuesday 17 December 2013 12:23:28 Cousin Stanley did opine: > >> Rick Johnson wrote: > >> Dovetails are nothing more than sadistic nostalgia -- > >> they give old men a "chubby" and young men a nightmare. > > > > There is nothing more satisfying than cutting a set of dovetails by > > hand a

Re: PDFMiner install question

2013-12-17 Thread Mark Lawrence
On 17/12/2013 20:06, Jason Mellone wrote: Hello, I have python up and running using the exact setup as recommended by http://learnpythonthehardway.org/ I am now trying to use pdfminer. I have python here: C:\USERS\Python27 using "import os", i am able to cwd to C:\users\python where i have

PDFMiner install question

2013-12-17 Thread Jason Mellone
Hello, I have python up and running using the exact setup as recommended by http://learnpythonthehardway.org/ I am now trying to use pdfminer. I have python here: C:\USERS\Python27 using "import os", i am able to cwd to C:\users\python where i have C:\users\python\pdfminer-master\. when i na

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread Michael Torrie
On 12/17/2013 08:00 AM, Wolfgang Keller wrote: >> Please check JYTHON and those ready-for-novice GUI tools in java. > > All Java GUI frameworks I know of are ridiculous garbage. > > Not only that Java per se is obscenely fat (and unresponsive), but the > GUI frameworks leak like bottomless barrel

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Chris Angelico
On Wed, Dec 18, 2013 at 5:03 AM, rusi wrote: > On Tuesday, December 17, 2013 8:21:39 PM UTC+5:30, Neil Cerutti wrote: >> I can't think of a reference, but I to recall that >> bugs-per-line-of-code is nearly constant; it is not language >> dependent. So, unscientifically, the more work you can get

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread Terry Reedy
On 12/17/2013 10:07 AM, Wolfgang Keller wrote: On an actual operating system, the attitude of the developers (do they actually care or just don't give a darn) is *the* critical issue for end-user productivity. If a developer makes a statement such as of "just get a faster computer" or "just get

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread Michael Torrie
On 12/17/2013 08:00 AM, Wolfgang Keller wrote: >> Python is sooo slow when it waits for the human. > > With Windows systems, I waste something like 90% of my work time waiting > for that system to stop "Not Responding". > > And no, it's not a matter of hardware. Something is wrong then. Win

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread rusi
On Tuesday, December 17, 2013 8:21:39 PM UTC+5:30, Neil Cerutti wrote: > On 2013-12-17, Steven D'Aprano wrote: > > I would really like to see good quality statistics about bugs > > per program written in different languages. I expect that, for > > all we like to make fun of COBOL, it probably has f

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Mark Lawrence
On 17/12/2013 16:59, Grant Edwards wrote: I've always thought C was a great language for low-level, bare-metal, embedded stuff -- but teaching it to first or second year computer science students is just insane. C has a certain minimalist orthogonality that I have always found pleasing. [Peopl

Re: New to Python, Help to get script working?

2013-12-17 Thread Joel Goldstick
On Tue, Dec 17, 2013 at 12:33 PM, Rick Johnson wrote: > On Monday, December 16, 2013 1:09:38 AM UTC-6, Mark wrote: > > On Sunday, December 15, 2013 9:33:17 PM UTC-5, Chris Angelico wrote: > > > I went and looked at the post linked to, and it has > > > buggy indentation. (Quite possibly indicates

Re: New to Python, Help to get script working?

2013-12-17 Thread Rick Johnson
On Monday, December 16, 2013 1:09:38 AM UTC-6, Mark wrote: > On Sunday, December 15, 2013 9:33:17 PM UTC-5, Chris Angelico wrote: > > I went and looked at the post linked to, and it has > > buggy indentation. (Quite possibly indicates that the > > author has two-space tabs, and didn't notice a bug

ANN: Version 0.1.2 of sarge (a subprocess wrapper library) has been released.

2013-12-17 Thread Vinay Sajip
Version 0.1.2 of Sarge, a cross-platform library which wraps the subprocess module in the standard library, has been released. What changed? - - Fixed issue #12: Prevented a hang which occurred when a redirection failed. - Fixed issue #11: Added "+" to the characters allowed in param

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Mark Lawrence
On 17/12/2013 17:18, Larry Martell wrote: On Tue, Dec 17, 2013 at 11:59 AM, Grant Edwards wrote: On 2013-12-17, Wolfgang Keller wrote: I was also taught C as an undergrad but having already learned Java, C and C++ before arriving at University I found the C course very easy so my own experie

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Larry Martell
On Tue, Dec 17, 2013 at 11:59 AM, Grant Edwards wrote: > On 2013-12-17, Wolfgang Keller wrote: > >>> I was also taught C as an undergrad but having already learned Java, C >>> and C++ before arriving at University I found the C course very easy >>> so my own experience is not representative. Many

Re: New to Python, Help to get script working?

2013-12-17 Thread rusi
On Tuesday, December 17, 2013 4:35:31 PM UTC+5:30, Mark wrote: > I am sorry, using google groups i cant tell what you see... > Anyways, I guess i will just make lots of lines instead of long sentences? > How about this, the first person that can get this to work for me... > I will paypal them 20 d

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Oscar Benjamin
On 17 December 2013 15:51, Wolfgang Keller wrote: >> >> I was also taught C as an undergrad but having already learned Java, C >> and C++ before arriving at University I found the C course very easy >> so my own experience is not representative. Many of the other students >> at that time found the

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Grant Edwards
On 2013-12-17, Wolfgang Keller wrote: >> I was also taught C as an undergrad but having already learned Java, C >> and C++ before arriving at University I found the C course very easy >> so my own experience is not representative. Many of the other students >> at that time found the course too ha

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread rusi
On Tuesday, December 17, 2013 9:51:07 PM UTC+5:30, larry@gmail.com wrote: > On Tue, Dec 17, 2013 at 10:35 AM, Mark Lawrence wrote: > > I was in charge of the team at work that had to make all code Y2K compliant. > > I discovered the one bug that to my knowledge slipped through the net. Four >

Python and MIDI

2013-12-17 Thread Tobiah
Is there a module out there that would let me send a predetermined list of midi messages to a MIDI device in such a way that the timing would be precise enough for music? Thanks, Tobiah -- https://mail.python.org/mailman/listinfo/python-list

Re: Question RE urllib

2013-12-17 Thread Tobiah
On 12/17/2013 08:10 AM, Larry Martell wrote: On Tue, Dec 17, 2013 at 10:26 AM, Jeff James mailto:j...@jeffljames.com>> wrot So I'm using the following script to check our sites to make sure they are all up and some of them are reporting they are "down" when, in fact, they are actually

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Larry Martell
On Tue, Dec 17, 2013 at 10:35 AM, Mark Lawrence wrote: > I was in charge of the team at work that had to make all code Y2K compliant. > I discovered the one bug that to my knowledge slipped through the net. Four > years later back at the same place on contract I fixed the fix!!! >From around 199

Re: Question RE urllib

2013-12-17 Thread Larry Martell
On Tue, Dec 17, 2013 at 10:26 AM, Jeff James wrot > > So I'm using the following script to check our sites to make sure they > are all up and some of them are reporting they are "down" when, in fact, > they are actually up. These sites do not require a logon in order for the > home page to come

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Wolfgang Keller
> I was also taught C as an undergrad but having already learned Java, C > and C++ before arriving at University I found the C course very easy > so my own experience is not representative. Many of the other students > at that time found the course too hard and just cheated on all the > assignments

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Mark Lawrence
On 17/12/2013 15:24, Steven D'Aprano wrote: On Tue, 17 Dec 2013 09:54:41 -0500, Roy Smith wrote: In article , Neil Cerutti wrote: On 2013-12-17, Steven D'Aprano wrote: I would really like to see good quality statistics about bugs per program written in different languages. I expect that,

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread Wolfgang Keller
> On Sun, Dec 15, 2013 at 4:33 PM, Wolfgang Keller > wrote: > > And besides, again, a commercially licensed PyQt itself isn't *that* > > expensive. > > > The cost of a commercial PyQt license for a single developer is £350 > > (GBP). You may pay in either US Dollars, Euros or GBP. I didn't write

RE: Question RE urllib

2013-12-17 Thread Jeff James
So I'm using the following script to check our sites to make sure they are all up and some of them are reporting they are "down" when, in fact, they are actually up. These sites do not require a logon in order for the home page to come up. Could this be due to some port being blocked internally

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Steven D'Aprano
On Tue, 17 Dec 2013 09:54:41 -0500, Roy Smith wrote: > In article , > Neil Cerutti wrote: > >> On 2013-12-17, Steven D'Aprano >> wrote: >> > I would really like to see good quality statistics about bugs per >> > program written in different languages. I expect that, for all we >> > like to mak

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Wolfgang Keller
> > It's not just the abysmally appalling, hideously horrifying syntax. > > At about everything about C is just *not* "made for human beings" > > imho. > > I've never heard C syntax reviled quite so intensely. What syntax do > you like, out of curiosity? Pascal, Python, if written by someone wh

Re: Type of an object:

2013-12-17 Thread Steven D'Aprano
On Tue, 17 Dec 2013 23:35:10 +1300, Gregory Ewing wrote: > Steven D'Aprano wrote: >> I think I need to see an actual working demonstration, because as far >> as I can see, type(obj) returns obj.__class__. > > Nope: > > >>> class C(object): > ... def f(self): > ... return "Surprise!" > ... _

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread Wolfgang Keller
> Please check JYTHON and those ready-for-novice GUI tools in java. All Java GUI frameworks I know of are ridiculous garbage. Not only that Java per se is obscenely fat (and unresponsive), but the GUI frameworks leak like bottomless barrels and the look and feel is so hideous that I would say fro

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread Wolfgang Keller
> The other thing, specially if you would make a customer project, I > don't know how to pack the app written in python in an installer. If you want your application to be actually user-friendly, you make it available as an installer-less zip archive. It works with Python applications, no matter w

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Mark Lawrence
On 17/12/2013 14:54, Roy Smith wrote: In article , Neil Cerutti wrote: On 2013-12-17, Steven D'Aprano wrote: I would really like to see good quality statistics about bugs per program written in different languages. I expect that, for all we like to make fun of COBOL, it probably has few bu

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread Wolfgang Keller
> For example Firefox implements its entire GUI in > Javascript using XML GUI definitions. Which has made Firefox essentially unusable because it will fall into koma ("Not Responding") for minutes upon almost each and every mouseclick. Unfortunately I don't know any significantly better alternativ

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread Wolfgang Keller
> Python is sooo slow when it waits for the human. With Windows systems, I waste something like 90% of my work time waiting for that system to stop "Not Responding". And no, it's not a matter of hardware. Sincerely, Wolfgang -- https://mail.python.org/mailman/listinfo/python-list

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Roy Smith
In article , Neil Cerutti wrote: > On 2013-12-17, Steven D'Aprano > wrote: > > I would really like to see good quality statistics about bugs > > per program written in different languages. I expect that, for > > all we like to make fun of COBOL, it probably has few bugs per > > unit-of-useful-w

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Neil Cerutti
On 2013-12-17, Steven D'Aprano wrote: > I would really like to see good quality statistics about bugs > per program written in different languages. I expect that, for > all we like to make fun of COBOL, it probably has few bugs per > unit-of-useful-work-done than the equivalent written in C. I ca

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread Mark Lawrence
On 17/12/2013 14:43, wxjmfa...@gmail.com wrote: Addendum. I should say, I had also a lot of fun in writing my own "styling engine". Because when one has to deal with a language, which does not recognize its own keywords... 1and 444 444 tokenize.py could have been a solution, but it's rea

Re: Type of an object:

2013-12-17 Thread Ethan Furman
On 12/17/2013 02:35 AM, Gregory Ewing wrote: Steven D'Aprano wrote: I think I need to see an actual working demonstration, because as far as I can see, type(obj) returns obj.__class__. Nope: class C(object): ... def f(self): ... return "Surprise!" ... __class__ = property(f) ... c = C

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread wxjmfauth
Addendum. I should say, I had also a lot of fun in writing my own "styling engine". Because when one has to deal with a language, which does not recognize its own keywords... >>> 1and 444 444 >>> tokenize.py could have been a solution, but it's really too slow. jmf -- https://mail.python.org/

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Cousin Stanley
Rick Johnson wrote: Dovetails are nothing more than sadistic nostalgia -- they give old men a "chubby" and young men a nightmare. There is nothing more satisfying than cutting a set of dovetails by hand and having them glide together like silk, the first time you test-fit them, with no da

Bootstrapping a test environment

2013-12-17 Thread Burak Arslan
Hello list, I decided to set up a portable Jenkins environment for an open source project I'm working on. After a couple of hours of tinkering, I ended up with this: https://github.com/arskom/spyne/blob/05f7a08489e6dc04a3b5659eb325390bea13b2ff/run_tests.sh (it should have been a Makefile) This

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Chris Angelico
On Tue, Dec 17, 2013 at 10:12 PM, Oscar Benjamin wrote: > I was also taught C as an undergrad but having already learned Java, C > and C++ before arriving at University I found the C course very easy > so my own experience is not representative. Many of the other students > at that time found the

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread wxjmfauth
Le mardi 17 décembre 2013 14:03:03 UTC+1, Robert Kern a écrit : > On 2013-12-17 11:13, Steven D'Aprano wrote: > > > On Tue, 17 Dec 2013 09:39:06 +, Mark Lawrence wrote: > > > > > >> Personally I am convinced that wxPython can't handle unicode for the > > >> simple reason that it doesn't yet

patch for making distutils cross compile on win32

2013-12-17 Thread Robin Becker
I have struggled to get Python-3.3.3 distutils to cross compile win-amd64 on win32. For the specific command (bdist_wininst) I am using the patch below seems to fix things so I can build amd64 binaries on win32. The code seems a bit schizophrenic about whether this is supposed to work, but witho

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread Mark Lawrence
On 17/12/2013 11:13, Steven D'Aprano wrote: On Tue, 17 Dec 2013 09:39:06 +, Mark Lawrence wrote: Personally I am convinced that wxPython can't handle unicode for the simple reason that it doesn't yet support Python 3 and we all know that Python 2 and unicode don't mix. I don't think this

Fwd: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread Igor Korot
On Tue, Dec 17, 2013 at 01:36:43AM -0800, Igor Korot wrote: > Hi, guys, > > On Tue, Dec 17, 2013 at 1:29 AM, Steven D'Aprano wrote: > > On Mon, 16 Dec 2013 23:58:15 -0800, wxjmfauth wrote: > I think you are doing exactly what Steven D'Aprano said: Please compare: "abc" vs 'abc' from wxPytho

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread Chris Angelico
On Tue, Dec 17, 2013 at 8:33 PM, Christian Gollwitzer wrote: > Am 16.12.13 23:40, schrieb Chris Angelico: >> But my rule of thumb with bash scripts is: If it exceeds a page or >> two in length, it's probably time it got rewritten in an application >> language. When a program is the size of gitk (>

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread Robert Kern
On 2013-12-17 11:13, Steven D'Aprano wrote: On Tue, 17 Dec 2013 09:39:06 +, Mark Lawrence wrote: Personally I am convinced that wxPython can't handle unicode for the simple reason that it doesn't yet support Python 3 and we all know that Python 2 and unicode don't mix. I don't think this

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread wxjmfauth
Le mardi 17 décembre 2013 10:29:28 UTC+1, Steven D'Aprano a écrit : > On Mon, 16 Dec 2013 23:58:15 -0800, wxjmfauth wrote: > > > > > From all the toolkits, wxPython is probably the most interesting. I used > > > all versions from 2.0 (?) up to 2.8. Then it has been decided to go > > > unicode.

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Steven D'Aprano
On Tue, 17 Dec 2013 11:12:07 +, Oscar Benjamin wrote: > These types of problems are compounded by the fact that the current C > course uses automated marking so a program that produces the correct > output gets full marks even if it is terribly written and the student > entirely misses the poi

Re: [newbie] Saving binaries in a specific way

2013-12-17 Thread Oscar Benjamin
On 16 December 2013 22:19, Djoser wrote: > Hi all, Hi Djoser, > I am new to this forum and also to Python, but I'm trying hard to understand > it better. > I need to create a binary file, but the first 4 lines must be in > signed-Integer16 and all the others in signed-Integer32. I have a prog

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread Steven D'Aprano
On Tue, 17 Dec 2013 09:39:06 +, Mark Lawrence wrote: > Personally I am convinced that wxPython can't handle unicode for the > simple reason that it doesn't yet support Python 3 and we all know that > Python 2 and unicode don't mix. I don't think this is right. The Unicode support in Python 2

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Oscar Benjamin
On 17 December 2013 00:39, rusi wrote: > On Tuesday, December 17, 2013 5:58:12 AM UTC+5:30, Ned Batchelder wrote: >> On 12/16/13 3:32 PM, Wolfgang Keller wrote: >> >>> And ever after that experience, I avoided all languages that were >> >>> even remotely similar to C, such as C++, Java, C#, Javasc

Re: New to Python, Help to get script working?

2013-12-17 Thread Mark
I am sorry, using google groups i cant tell what you see... Anyways, I guess i will just make lots of lines instead of long sentences? How about this, the first person that can get this to work for me... I will paypal them 20 dollars for helping me. I just want to get this thing up and going. Ive

Re: Reading csv file

2013-12-17 Thread Peter Otten
Igor Korot wrote: > Hi, guys, > > On Tue, Dec 17, 2013 at 12:55 AM, Peter Otten <__pete...@web.de> wrote: >> Peter Otten wrote: >> >>> You are still reading the complete csv file. Assuming >>> >>> (1) the first row of the csv contains the column names >>> (2) you want to skip the first five rows

Re: Type of an object:

2013-12-17 Thread Gregory Ewing
Steven D'Aprano wrote: I think I need to see an actual working demonstration, because as far as I can see, type(obj) returns obj.__class__. Nope: >>> class C(object): ... def f(self): ... return "Surprise!" ... __class__ = property(f) ... >>> c = C() >>> type(c) >>> c.__class__ 'Surprise!

  1   2   >