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

2013-12-17 Thread wxjmfauth
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. Let see in the wx interactive intepreter, it is only the top of the iceberg. (Py27, wxPy294) >>> len('ሴЃ') 5 --- It has alos been decided to rewo

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

2013-12-17 Thread Christian Gollwitzer
Am 17.12.13 06:37, schrieb Rick Johnson: On Sunday, December 15, 2013 11:01:53 AM UTC-6, Steven D'Aprano wrote: low-level language with some interface to Python. The main difference between this hypothetical "Python GUI" and Tcl is that Tcl is a Turing-complete interpreter which lives in it's ow

Re: Module missing when embedding?

2013-12-17 Thread Garthy
Hi all, On 12/12/13 18:03, Garthy wrote: > I am attempting to embed Python 3.3.3 into an application. ... > Any ideas about what I might be doing wrong? Anything I can try on the > Python side or the C API side? My Python knowledge is a bit rusty so I > may have missed something obvious on the

Re: Reading csv file

2013-12-17 Thread Peter Otten
Igor Korot wrote: > Hi, ALL, > Is there a better way to do that: > > def Read_CSV_File(filename): > file = open(filename, "r") > reader = csv.DictReader(file) > line = 1 > for row in reader: > if line < 6: > reader.next() > line++ > # pr

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

2013-12-17 Thread Gene Heskett
On Monday 16 December 2013 20:30:47 Mark Lawrence did opine: > On 17/12/2013 01:06, Roy Smith wrote: > > In article , > > > > Rick Johnson wrote: > >>Dovetails are nothing more than sadistic nostalgia -- > >>they give old men a "chubby" and young men a nightmare. > > > > There is noth

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 07:58, wxjmfa...@gmail.com 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. Let see in the wx interactive intepreter, it is only the top of the iceberg. (Py27, wxPy294) le

Re: Reading csv file

2013-12-17 Thread Bernd Nawothnig
On 2013-12-17, Igor Korot wrote: > Hi, ALL, > Is there a better way to do that: > > def Read_CSV_File(filename): > file = open(filename, "r") > reader = csv.DictReader(file) > line = 1 > for row in reader: > if line < 6: > reader.next() >

Re: Reading csv file

2013-12-17 Thread Peter Otten
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 of data > > you'd have to write > > reader = csv.Reader(file) Sorry, I meant DictReader, not Reader. > line = 0 > wh

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 09:33:24 UTC+1, Mark Lawrence a écrit : > On 17/12/2013 07:58, wxjmfa...@gmail.com 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: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread Steven D'Aprano
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. > > Let see in the wx interactive intepreter, it is only the top of the > iceberg. (Py27

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

2013-12-17 Thread Christian Gollwitzer
Am 16.12.13 23:40, schrieb Chris Angelico: On Tue, Dec 17, 2013 at 9:06 AM, Christian Gollwitzer wrote: Let the flame war begin! I'll try to avoid flamage :) :) So let's vigorously discuss about facts;) But my rule of thumb with bash scripts is: If it exceeds a page or two in length, it's

Re: [newbie] trying socket as a replacement for nc

2013-12-17 Thread Jean-Michel Pichavant
> I'm a newbie in Python programming that is very much true, and > contrary to what you seem to suggest I did my homework At no point that was my intention, my apologies. If you fixed the syntax error, you should be pretty close to the solution though. JM -- IMPORTANT NOTICE: The contents of

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 09:29, Steven D'Aprano wrote: Even if it is true that wxPython cannot handle Unicode text, you haven't shown it here. 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 unico

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 09:18, wxjmfa...@gmail.com wrote: Le mardi 17 décembre 2013 09:33:24 UTC+1, Mark Lawrence a écrit : On 17/12/2013 07:58, wxjmfa...@gmail.com 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 be

Re: Reading csv file

2013-12-17 Thread Igor Korot
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 of data Looking at the Peter's

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!

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: 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: 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: 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: [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: 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: 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: 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 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 (>

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 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

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 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

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

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 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

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: 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 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: 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: 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: 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: 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: 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
> 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: 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: 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: 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: 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: 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: 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: 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: 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 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 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

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: 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 >

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 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: 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 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: 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

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: 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

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: 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: 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: 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: 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: 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 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

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: 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

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

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 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

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: 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: 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 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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 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: 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 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: 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 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: 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

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: 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

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: 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

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: 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

  1   2   >