Re: Introdution

2014-06-03 Thread Chris
Hi, On 06/03/2014 12:01 AM, Hisham Mughal wrote: plz tell me about books for python i am beginner of this lang.. the most important commands are in A Byte of Python [1]. This eBook isn't sufficient for programming, but it's a nice introduction. I bought Learning Python from Mark Lutz. It's

Re: ImportError: No module named _gdb

2014-06-03 Thread dieter
Marcelo Sardelich msardel...@gmail.com writes: Didier thanks for your prompt reply. I installed a pre-built version of Python. As you said, probably something is missing. I tried to google packages related to gdb, but ain't had no luck. The missing part is related to the gdb-Python

Re: Python 3.2 has some deadly infection

2014-06-03 Thread Terry Reedy
On 6/3/2014 1:16 AM, Gregory Ewing wrote: Terry Reedy wrote: The issue Armin ran into is this. He write a library module that makes sure the streams are binary. Seems to me he made a mistake right there. A library should *not* be making global changes like that. It can obtain binary streams

Re: can someone explain the concept of strings (or whatever) being immutable

2014-06-03 Thread Rustom Mody
On Tuesday, June 3, 2014 10:36:37 AM UTC+5:30, Deb Wyatt wrote: That was just the first question. What does immutable really mean if you can add items to a list? and concatenate strings? I don't understand enough to even ask a comprehensible question, I guess. It is with some pleasure that I

Re: Python 3 is killing Python

2014-06-03 Thread Rustom Mody
On Tuesday, June 3, 2014 11:42:30 AM UTC+5:30, jmf wrote: after thinking no Yes [Also called Oui] -- https://mail.python.org/mailman/listinfo/python-list

Re: Benefits of asyncio

2014-06-03 Thread Marko Rauhamaa
Paul Rubin no.email@nospam.invalid: Marko Rauhamaa ma...@pacujo.net writes: - Thread programming assumes each thread is waiting for precisely one external stimulus in any given state -- in practice, each state must be prepared to handle quite a few possible stimuli. Eh?

Re: Lock Windows Screen GUI using python

2014-06-03 Thread Jaydeep Patil
On Tuesday, 3 June 2014 10:39:31 UTC+5:30, Ian wrote: On Mon, Jun 2, 2014 at 10:28 PM, Jaydeep Patil patil.jay2...@gmail.com wrote: Dear all, Can we Lock Windows Screen GUI till program runs unlock screen GUI when program finishes? If you mean can you programmatically bring

Re: Lock Windows Screen GUI using python

2014-06-03 Thread Ian Kelly
On Tue, Jun 3, 2014 at 12:40 AM, Jaydeep Patil patil.jay2...@gmail.com wrote: Hi Lan, Currently I am doing some automation in python excel. It read the data plots number of graphs. It took more than 20 minutes. So while running my python program if user clicks on excel, error came. So

Re: can someone explain the concept of strings (or whatever) being immutable

2014-06-03 Thread Steven D'Aprano
On Mon, 02 Jun 2014 21:06:37 -0800, Deb Wyatt wrote: a_string = This is a string a_string is pointing to the above string now I change the value of a_string This is where English can lead us astray. Change the value of a_string can mean two different things. An analogy may help make it

Re: Lock Windows Screen GUI using python

2014-06-03 Thread Jaydeep Patil
On Tuesday, 3 June 2014 12:39:38 UTC+5:30, Ian wrote: On Tue, Jun 3, 2014 at 12:40 AM, Jaydeep Patil patil.jay2...@gmail.com wrote: Hi Lan, Currently I am doing some automation in python excel. It read the data plots number of graphs. It took more than 20 minutes. So while

Re: can someone explain the concept of strings (or whatever) being immutable

2014-06-03 Thread Mark Lawrence
On 03/06/2014 07:28, Rustom Mody wrote: On Tuesday, June 3, 2014 10:36:37 AM UTC+5:30, Deb Wyatt wrote: That was just the first question. What does immutable really mean if you can add items to a list? and concatenate strings? I don't understand enough to even ask a comprehensible question, I

Re: Strange Behavior

2014-06-03 Thread Peter Otten
Steven D'Aprano wrote: On Mon, 02 Jun 2014 20:05:29 +0200, robertw89 wrote: I invoked the wrong bug.py :/ , works fine now (this happens to me when im a bit tired sometimes...). Clarity in naming is an excellent thing. If you have two files called bug.py, that's two too many. In the

Re: Python 3 is killing Python

2014-06-03 Thread Mark Lawrence
On 03/06/2014 07:30, Rustom Mody wrote: On Tuesday, June 3, 2014 11:42:30 AM UTC+5:30, jmf wrote: after thinking no Yes [Also called Oui] I'm very puzzled over thinking, what context was this in as I've kill-filed our most illustrious resident unicode expert? -- My fellow Pythonistas,

Re: Lock Windows Screen GUI using python

2014-06-03 Thread Mark Lawrence
On 03/06/2014 08:53, Jaydeep Patil wrote: Would you please use the mailing list https://mail.python.org/mailman/listinfo/python-list or read and action this https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing double line spacing and single line paragraphs, thanks. -- My

Re: Benefits of asyncio

2014-06-03 Thread Paul Sokolovsky
Hello, On Mon, 02 Jun 2014 21:51:35 -0400 Terry Reedy tjre...@udel.edu wrote: To all the great responders. If anyone thinks the async intro is inadequate and has a paragraph to contribute, open a tracker issue. Not sure about intro (where's that?), but docs

Automating windows media player on win7

2014-06-03 Thread Deogratius Musiige
Hi guys, I have been fighting with automating wmplayer but with no success. It looks to me that using the .OCX would be the best option. I found the code below on the net but I cannot get it to work. I can see from device manager that a driver is started by I get no audio out. What am I doing

Re: Benefits of asyncio

2014-06-03 Thread Chris Angelico
On Tue, Jun 3, 2014 at 4:36 PM, Marko Rauhamaa ma...@pacujo.net wrote: I have yet to see that in practice. The typical thread works as follows: while True: while request.incomplete(): request.read() # block sql_stmt = request.process()

Re: Automating windows media player on win7

2014-06-03 Thread Chris Angelico
On Tue, Jun 3, 2014 at 6:10 PM, Deogratius Musiige dmusi...@sennheisercommunications.com wrote: Hi guys, I have been fighting with automating wmplayer but with no success. It looks to me that using the .OCX would be the best option. I found the code below on the net but I cannot get it to

Re: Lock Windows Screen GUI using python

2014-06-03 Thread Chris Angelico
On Tue, Jun 3, 2014 at 5:53 PM, Jaydeep Patil patil.jay2...@gmail.com wrote: During copy paste of excel data, if user by mistake doing some copy paste operation outside excel(for e.g. doing copy paste in outlook mails, firefox browser etc), it may be cause for the another error. How i can

Re: Benefits of asyncio

2014-06-03 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: def request.process(self): # I know this isn't valid syntax db.act(whatever) # may block but shouldn't for long db.commit() # ditto write(self, response) # won't block This works as long as your database is reasonably fast and close I find that

Re: Benefits of asyncio

2014-06-03 Thread Chris Angelico
On Tue, Jun 3, 2014 at 7:10 PM, Marko Rauhamaa ma...@pacujo.net wrote: Chris Angelico ros...@gmail.com: def request.process(self): # I know this isn't valid syntax db.act(whatever) # may block but shouldn't for long db.commit() # ditto write(self, response) # won't block This

Re: Automating windows media player on win7

2014-06-03 Thread Chris Angelico
On Tue, Jun 3, 2014 at 7:42 PM, Deogratius Musiige dmusi...@sennheisercommunications.com wrote: Hi Chris, I want to have wmplayer as part of my automitized test for a headset via the USB HID. I want to be able to execute some of the following operations in my python script: 1. Play

Re: Benefits of asyncio

2014-06-03 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: Okay, but how do you handle two simultaneous requests going through the processing that you see above? You *MUST* separate them onto two transactions, otherwise one will commit half of the other's work. (Or are you forgetting Databasing 101 - a transaction

Re: Benefits of asyncio

2014-06-03 Thread Chris Angelico
On Tue, Jun 3, 2014 at 8:08 PM, Marko Rauhamaa ma...@pacujo.net wrote: Chris Angelico ros...@gmail.com: Okay, but how do you handle two simultaneous requests going through the processing that you see above? You *MUST* separate them onto two transactions, otherwise one will commit half of the

RE: Automating windows media player on win7

2014-06-03 Thread Deogratius Musiige
Thanks for the good info Chris. I'll look into the project. However, I hope that I can find a solution using OCX dispatch. The dispatch provides all the functionalities I need. Best regards / Med venlig hilsen Deo -Original Message- From: Python-list

RE: Automating windows media player on win7

2014-06-03 Thread Deogratius Musiige
Hi Chris, I want to have wmplayer as part of my automitized test for a headset via the USB HID. I want to be able to execute some of the following operations in my python script: 1. Play 2. Get playing track 3. Next 4. Get active device 5. ... I am not sure

Re: hashing strings to integers

2014-06-03 Thread Adam Funk
On 2014-05-28, Dan Sommers wrote: On Tue, 27 May 2014 17:02:50 +, Steven D'Aprano wrote: - rather than zillions of them, there are few enough of them that the chances of an MD5 collision is insignificant; (Any MD5 collision is going to play havoc with your strategy of using hashes

Re: hashing strings to integers

2014-06-03 Thread Adam Funk
On 2014-05-27, Steven D'Aprano wrote: On Tue, 27 May 2014 16:13:46 +0100, Adam Funk wrote: Well, here's the way it works in my mind: I can store a set of a zillion strings (or a dict with a zillion string keys), but every time I test if new_string in seen_strings, the computer

Re: Benefits of asyncio

2014-06-03 Thread Burak Arslan
On 06/03/14 12:30, Chris Angelico wrote: Write me a purely nonblocking web site concept that can handle a million concurrent connections, where each one requires one query against the database, and one in a hundred of them require five queries which happen atomically. I don't see why that

Re: Benefits of asyncio

2014-06-03 Thread Frank Millman
Chris Angelico ros...@gmail.com wrote in message news:captjjmqwkestvrsrg30qjo+4ttlqfk9q4gabygovew8nsdx...@mail.gmail.com... This works as long as your database is reasonably fast and close (common case for a lot of web servers: DB runs on same computer as web and application and etc

Re: Benefits of asyncio

2014-06-03 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: your throughput is defined by your database. Asyncio is not (primarily) a throughput-optimization method. Sometimes it is a resource consumption optimization method as the context objects are lighter-weight than full-blown threads. Mostly asyncio is a way to

Re: Python 3 is killing Python

2014-06-03 Thread Ned Batchelder
On 6/3/14 4:03 AM, Mark Lawrence wrote: On 03/06/2014 07:30, Rustom Mody wrote: On Tuesday, June 3, 2014 11:42:30 AM UTC+5:30, jmf wrote: after thinking no Yes [Also called Oui] I'm very puzzled over thinking, what context was this in as I've kill-filed our most illustrious resident

Re: Strange Behavior

2014-06-03 Thread Steven D'Aprano
On Tue, 03 Jun 2014 10:01:26 +0200, Peter Otten wrote: Steven D'Aprano wrote: On Mon, 02 Jun 2014 20:05:29 +0200, robertw89 wrote: I invoked the wrong bug.py :/ , works fine now (this happens to me when im a bit tired sometimes...). Clarity in naming is an excellent thing. If you have

Re: Benefits of asyncio

2014-06-03 Thread Chris Angelico
On Tue, Jun 3, 2014 at 9:05 PM, Burak Arslan burak.ars...@arskom.com.tr wrote: On 06/03/14 12:30, Chris Angelico wrote: Write me a purely nonblocking web site concept that can handle a million concurrent connections, where each one requires one query against the database, and one in a hundred

Re: Benefits of asyncio

2014-06-03 Thread Chris Angelico
On Tue, Jun 3, 2014 at 9:09 PM, Frank Millman fr...@chagford.com wrote: So why not keep a 'connection pool', and for every potentially blocking request, grab a connection, set up a callback or a 'yield from' to wait for the response, and unblock. Compare against a thread pool, where each

Micro Python -- a lean and efficient implementation of Python 3

2014-06-03 Thread Damien George
Hi, We would like to announce Micro Python, an implementation of Python 3 optimised to have a low memory footprint. While Python has many attractive features, current implementations (read CPython) are not suited for embedded devices, such as microcontrollers and small systems-on-a-chip. This

Would a Python 2.8 help you port to Python 3?

2014-06-03 Thread Mark Lawrence
An interesting article from Lennart Regebro http://regebro.wordpress.com/2014/06/03/would-a-python-2-8-help-you-port-to-python-3/ although I'm inclined to ignore it as it appears to be factual. We can't have that getting in the way of plain, good, old fashioned FUD now can we? -- My fellow

Re: Benefits of asyncio

2014-06-03 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: I don't see how Marko's assertion that event-driven asynchronous programming is a breath of fresh air compared with multithreading. The only way multithreading can possibly be more complicated is that preemption can occur anywhere - and that's exactly one of

Re: Micro Python -- a lean and efficient implementation of Python 3

2014-06-03 Thread Chris Angelico
On Tue, Jun 3, 2014 at 10:27 PM, Damien George damien.p.geo...@gmail.com wrote: - Supports almost full Python 3 syntax, including yield (compiles 99.99% of the Python 3 standard library). - It supports a growing subset of Python 3 types and operations. - Part of the Python 3 standard library

Re: Benefits of asyncio

2014-06-03 Thread Chris Angelico
On Tue, Jun 3, 2014 at 11:05 PM, Marko Rauhamaa ma...@pacujo.net wrote: Chris Angelico ros...@gmail.com: I don't see how Marko's assertion that event-driven asynchronous programming is a breath of fresh air compared with multithreading. The only way multithreading can possibly be more

Re: Benefits of asyncio

2014-06-03 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: https://docs.python.org/3.4/library/logging.html#logging.Logger.debug What happens if that blocks? How can you make sure it won't? I haven't used that class. Generally, Python standard libraries are not readily usable for nonblocking I/O. For myself, I have

Having trouble in expressing constraints in Python

2014-06-03 Thread varun7rs
I have a problem in writing a constraint in Python. Firstly, I wrote the code in AMPL and it was working and I'm using Python for the reason that it is more suitable to handle large data. I managed to write the code quite fine except for one constraint(Link Mapping Constraint). I've attached

Re: Would a Python 2.8 help you port to Python 3?

2014-06-03 Thread Chris Angelico
On Tue, Jun 3, 2014 at 10:40 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: An interesting article from Lennart Regebro http://regebro.wordpress.com/2014/06/03/would-a-python-2-8-help-you-port-to-python-3/ although I'm inclined to ignore it as it appears to be factual. We can't have that

Re: Benefits of asyncio

2014-06-03 Thread Chris Angelico
On Tue, Jun 3, 2014 at 11:42 PM, Marko Rauhamaa ma...@pacujo.net wrote: Chris Angelico ros...@gmail.com: https://docs.python.org/3.4/library/logging.html#logging.Logger.debug What happens if that blocks? How can you make sure it won't? I haven't used that class. Generally, Python standard

Re: Micro Python -- a lean and efficient implementation of Python 3

2014-06-03 Thread Steven D'Aprano
On Tue, 03 Jun 2014 13:27:11 +0100, Damien George wrote: Hi, We would like to announce Micro Python, an implementation of Python 3 optimised to have a low memory footprint. Fantastic! -- Steven D'Aprano http://import-that.dreamwidth.org/ --

Re: Python 3.2 has some deadly infection

2014-06-03 Thread Robin Becker
The problem is that causal readers like Robin sometimes jump from 'In Python 3, it can be hard to do something one really ought not to do' to 'Binary I/O is hard in Python 3' -- which is is not. I'm fairly causal and I did understand that the rant was a bit over the top for fairly

Re: can someone explain the concept of strings (or whatever) being immutable

2014-06-03 Thread Cameron Simpson
On 02Jun2014 21:35, Deb Wyatt codemon...@inbox.com wrote: Please adjust your mailer to send plain text only. It is all you need anyway, and renders more reliably for other people. I am so sorry, I did not realize it was a problem. Hopefully it will behave now. Looks just great now. Many

Re: Python 3.2 has some deadly infection

2014-06-03 Thread Chris Angelico
On Wed, Jun 4, 2014 at 12:18 AM, Robin Becker ro...@reportlab.com wrote: I think the idea that we only give meaning to binary data using encodings is a bit limiting. A zip or gif file has structure, but I don't think it's reasonable to regard such a file as having an encoding in the python

Re: Having trouble in expressing constraints in Python

2014-06-03 Thread Mark Lawrence
On 03/06/2014 14:44, varun...@gmail.com wrote: I have a problem in writing a constraint in Python. Firstly, I wrote the code in AMPL and it was working and I'm using Python for the reason that it is more suitable to handle large data. I managed to write the code quite fine except for one

Re: Having trouble in expressing constraints in Python

2014-06-03 Thread Chris Angelico
On Wed, Jun 4, 2014 at 1:15 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: I also observe the gmail address which I'm assuming means google groups. No need to assume - the OP's headers show Google Groups injection info. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Lock Windows Screen GUI using python

2014-06-03 Thread Ian Kelly
On Jun 3, 2014 1:56 AM, Jaydeep Patil patil.jay2...@gmail.com wrote: I have another query. We can now block user inputs. But in my automation three is copy paste work going on continuously in Excel before plotting the graphs. During copy paste of excel data, if user by mistake doing some

Re: Benefits of asyncio

2014-06-03 Thread Roy Smith
In article 87ha42uos2@elektro.pacujo.net, Marko Rauhamaa ma...@pacujo.net wrote: Chris Angelico ros...@gmail.com: I don't see how Marko's assertion that event-driven asynchronous programming is a breath of fresh air compared with multithreading. The only way multithreading can

multiprocess (and paramiko)

2014-06-03 Thread mennis
I was able to work around this by using a completely different design but I still don''t understand why this doesn't work. It appears that the process that launches the process doesn't get access to updated object attributes. When I set and check them in the object itself it behaves as

Re: multiprocess (and paramiko)

2014-06-03 Thread Chris Angelico
On Wed, Jun 4, 2014 at 1:43 AM, mennis michaelian.en...@gmail.com wrote: I was able to work around this by using a completely different design but I still don''t understand why this doesn't work. It appears that the process that launches the process doesn't get access to updated object

Re: Benefits of asyncio

2014-06-03 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: Okay. How do you do basic logging? (Also - rolling your own logging facilities, instead of using what Python provides, is the simpler solution? This does not aid your case.) Asyncio is fresh out of the oven. It's going to take years before the standard

Re: Would a Python 2.8 help you port to Python 3?

2014-06-03 Thread Steven D'Aprano
On Tue, 03 Jun 2014 13:40:43 +0100, Mark Lawrence wrote: An interesting article from Lennart Regebro http://regebro.wordpress.com/2014/06/03/would-a-python-2-8-help-you- port-to-python-3/ although I'm inclined to ignore it as it appears to be factual. We can't have that getting in the way of

Re: Python 3.2 has some deadly infection

2014-06-03 Thread Steven D'Aprano
On Mon, 02 Jun 2014 12:10:48 +0100, Robin Becker wrote: there seems to be an implicit assumption in python land that encoded strings are the norm. On virtually every computer I encounter that assumption is wrong. The vast majority of bytes in most computers is not something that can be easily

Shutdown (was Re: Python-list Digest, Vol 129, Issue 4)

2014-06-03 Thread Terry Reedy
On 6/3/2014 6:07 AM, Ramas Sami wrote: My Python 3.3 is shutting down soon I open the new file or existing Python file Ramas, DO NOT reply to the digest with 100s of lines of other messages. Start a new thread. DO include enough information with your question so it can possibly be

Re: Python 3.2 has some deadly infection

2014-06-03 Thread Chris Angelico
On Wed, Jun 4, 2014 at 2:34 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Outside of those three kinds of files, I would expect that *by far* the single largest kind of file is text. Some text is wrapped in a binary layer, e.g. .doc, .odt, etc. but an awful lot of it is good

Re: multiprocess (and paramiko)

2014-06-03 Thread Roy Smith
In article 3c0be3a7-9d2d-4530-958b-13be97db3...@googlegroups.com, mennis michaelian.en...@gmail.com wrote: Here I have a simple multiprocessing class that when initializes takes a connected SSHClient instance and a command to run on the associated host in a new channel. ChrisA has already

Re: Micro Python -- a lean and efficient implementation of Python 3

2014-06-03 Thread Paul Sokolovsky
Hello, On Tue, 3 Jun 2014 23:11:46 +1000 Chris Angelico ros...@gmail.com wrote: On Tue, Jun 3, 2014 at 10:27 PM, Damien George damien.p.geo...@gmail.com wrote: - Supports almost full Python 3 syntax, including yield (compiles 99.99% of the Python 3 standard library). - It supports a

Re: Micro Python -- a lean and efficient implementation of Python 3

2014-06-03 Thread Chris Angelico
On Wed, Jun 4, 2014 at 2:49 AM, Paul Sokolovsky pmis...@gmail.com wrote: As can be seen from the dump above, MicroPython perfectly works on a Linux system, so we encourage any pythonista to touch a little bit of Python magic and give it a try! ;-) And we of course interested to get feedback

OT: This Swift thing

2014-06-03 Thread Sturla Molden
Dear Apple, Why should I be exited about an illegitmate child of Python, Go and JavaScript? Because it has curly brackets, no sane exception handling, and sucks less than Objective-C? Because init is spelled without double underscores? Because it faster than Python? Computers and smart phones

Re: Python 3.2 has some deadly infection

2014-06-03 Thread Terry Reedy
On 6/3/2014 10:18 AM, Robin Becker wrote: I think the idea that we only give meaning to binary data using encodings is a bit limiting. On the contrary, it is liberating. The fact that bits have no meaning other than 'a choice between two alterntives' means 1. any binary choice - 0/1, -/+,

Re: OT: This Swift thing

2014-06-03 Thread Skip Montanaro
From Apple's perspective, there's always platform lock-in. That's good for them, so it must be good for you, right? :-) Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: multiprocess (and paramiko)

2014-06-03 Thread mennis
I'm familiar with and have learned much from fabric. Its execution model don't work for this specific interface I'm working on. I use fabric for other things though and it's great. Ian -- https://mail.python.org/mailman/listinfo/python-list

Re: OT: This Swift thing

2014-06-03 Thread Nicholas Cole
Swift may yet be good for PyObjC (the python bridge to the various Apple libraries); it is possible that there is some kind of translation table that PyObjC can make use of to make its own method names less ugly. Of course, I wish they had picked Python rather than inventing their own language.

immutable vs mutable

2014-06-03 Thread Deb Wyatt
Thanks everyone for your help. I also found this article while I was waiting for answers from this list, in case anybody else is interested in this topic: http://www.spontaneoussymmetry.com/blog/archives/438 Deb in WA, USA FREE

Re: immutable vs mutable

2014-06-03 Thread Mark H Harris
On 6/3/14 12:29 PM, Deb Wyatt wrote: http://www.spontaneoussymmetry.com/blog/archives/438 Deb in WA, USA The article is bogged down in unnecessary complications with regard to mutability (or not) and pass-by reference|value stuff. The author risks confusing her audience (those who are

Re: OT: This Swift thing

2014-06-03 Thread Sturla Molden
Nicholas Cole nicholas.c...@gmail.com wrote: Of course, I wish they had picked Python rather than inventing their own language. But Apple put a huge stock in the ability of their libraries to make full use of multiple cores. The GIL is not relevant if they stick to the Objective-C runtime

Please turn off “digest mode” to participate (was: Python-list Digest, Vol 129, Issue 4)

2014-06-03 Thread Ben Finney
Ramas Sami ra...@live.co.uk writes: My Python 3.3 is shutting down soon I open the new file or existing Python file Please start a new thread to start a new discussion. Also, *before* you want to participate, don't reply to a digest message. Instead, first disable “digest mode” in your

Re: OT: This Swift thing

2014-06-03 Thread Chris Angelico
On Wed, Jun 4, 2014 at 6:43 AM, Sturla Molden sturla.mol...@gmail.com wrote: A Python with static typing would have been far better, IMHO. It seems they have created a Python-JavaScript bastard with random mix of features. Unfortunately they retained the curly brackets from JS... More

Re: OT: This Swift thing

2014-06-03 Thread Mark H Harris
On 6/3/14 1:26 PM, Skip Montanaro wrote: From Apple's perspective, there's always platform lock-in. That's good for them, so it must be good for you, right? :-) http://www.theregister.co.uk/2014/06/02/apple_aims_to_speed_up_secure_coding_with_swift_programming_language/ The key to this

Re: Loading modules from files through C++

2014-06-03 Thread Roland Plüss
I came now a bit further with Python 3 but I'm hitting a total road-block right now with the importer in C++ which worked in Py2 but is now totally broken in Py3. In general I've got a C++ class based module which has two methods: { find_module, ( PyCFunction )spModuleModuleLoader::cfFindModule,

Re: OT: This Swift thing

2014-06-03 Thread Marko Rauhamaa
Sturla Molden sturla.mol...@gmail.com: A Python with static typing would have been far better, IMHO. I don't think static typing and Python should be mentioned in the same sentence. It seems they have created a Python-JavaScript bastard with random mix of features. Unfortunately they

Re: Having trouble in expressing constraints in Python

2014-06-03 Thread varun7rs
Are you trying to implement your own code rather than use an existing library from pypi? I borrowed the idea from a previous file which I was working on. I input variables and coefficients as lists and then inturn as matrices to the CPLEX. So, I have a problem with expressing the

Re: Micro Python -- a lean and efficient implementation of Python 3

2014-06-03 Thread Paul Sokolovsky
Hello, On Wed, 4 Jun 2014 03:08:57 +1000 Chris Angelico ros...@gmail.com wrote: [] With that encouragement, I just cloned your repo and built it on amd64 Debian Wheezy. Works just fine! Except... I've just found one fairly major problem with your support of Python 3.x syntax. Your str type

Re: OT: This Swift thing

2014-06-03 Thread Mark H Harris
On 6/3/14 3:43 PM, Sturla Molden wrote: Nicholas Cole nicholas.c...@gmail.com wrote: {snip} Unfortunately they retained the curly brackets from JS... The curly braces come from C, and before that B and A/. (I think others used them too before that, but it escapes me now and I'm too lazy

Re: Micro Python -- a lean and efficient implementation of Python 3

2014-06-03 Thread Chris Angelico
On Wed, Jun 4, 2014 at 7:41 AM, Paul Sokolovsky pmis...@gmail.com wrote: Hello, On Wed, 4 Jun 2014 03:08:57 +1000 Chris Angelico ros...@gmail.com wrote: [] With that encouragement, I just cloned your repo and built it on amd64 Debian Wheezy. Works just fine! Except... I've just found one

Re: OT: This Swift thing

2014-06-03 Thread Chris Angelico
On Wed, Jun 4, 2014 at 7:49 AM, Mark H Harris harrismh...@gmail.com wrote: On 6/3/14 3:43 PM, Sturla Molden wrote: Nicholas Cole nicholas.c...@gmail.com wrote: {snip} Unfortunately they retained the curly brackets from JS... The curly braces come from C, and before that B and A/. (I

Re: OT: This Swift thing

2014-06-03 Thread Eric S. Johansson
On 6/3/2014 5:49 PM, Mark H Harris wrote: I have been engaged in a minor flame debate (locally) over block delimiters (or lack thereof) which I'm loosing. Locally, people hate python's indentation block delimiting, and wish python would adopt curly braces. I do not agree, of course;

Re: OT: This Swift thing

2014-06-03 Thread Chris Angelico
On Wed, Jun 4, 2014 at 9:22 AM, Eric S. Johansson e...@harvee.org wrote: On the other hand, curly braces are royal pain to dictate or navigate around when programming with speech recognition. I've never done that, in any language, but if I had to guess, I'd say that both braces and indentation

Re: OT: This Swift thing

2014-06-03 Thread Eric S. Johansson
On 6/3/2014 7:29 PM, Chris Angelico wrote: On Wed, Jun 4, 2014 at 9:22 AM, Eric S. Johansson e...@harvee.org wrote: On the other hand, curly braces are royal pain to dictate or navigate around when programming with speech recognition. I've never done that, in any language, but if I had to

Re: OT: This Swift thing

2014-06-03 Thread Kevin Walzer
On 6/3/14, 4:43 PM, Sturla Molden wrote: Are Python apps still banned from AppStore, even if we bundle an interpreter? Python apps are not banned from the App Store. See https://itunes.apple.com/us/app/quickwho/id419483981?mt=12. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin

Re: OT: This Swift thing

2014-06-03 Thread Sturla Molden
On 04/06/14 01:39, Kevin Walzer wrote: On 6/3/14, 4:43 PM, Sturla Molden wrote: Are Python apps still banned from AppStore, even if we bundle an interpreter? Python apps are not banned from the App Store. See https://itunes.apple.com/us/app/quickwho/id419483981?mt=12. Mac AppStore yes, iOS

Re: IDE for python

2014-06-03 Thread Joseph Martinot-Lagarde
Le 28/05/2014 13:31, Sameer Rathoud a écrit : I was searching for spyder, but didn't got any helpful installable. What problem did you encounter while trying to install spyder ? Spyder is oriented towards scientific applications, but can be used as a general python IDE. I use it for GUI

Upgrading from Python verison 2.7 to 3.4.1

2014-06-03 Thread Skafec, Allison
Hello All- Please forgive me, as I am new to installing and configuring Python. I am a server administrator trying to install a new version of Python on a server. We currently have Python version 2.7 installed (located at C:/Python27), along with Python (x,y) and using Spyder2 to view. I have

Unicode and Python - how often do you index strings?

2014-06-03 Thread Chris Angelico
A current discussion regarding Python's Unicode support centres (or centers, depending on how close you are to the cent[er]{2} of the universe) around one critical question: Is string indexing common? Python strings can be indexed with integers to produce characters (strings of length 1). They

Re: Upgrading from Python verison 2.7 to 3.4.1

2014-06-03 Thread Chris Angelico
On Wed, Jun 4, 2014 at 5:43 AM, Skafec, Allison allison.ska...@alliancedata.com wrote: Please forgive me, as I am new to installing and configuring Python. I am a server administrator trying to install a new version of Python on a server. We currently have Python version 2.7 installed (located

Re: Unicode and Python - how often do you index strings?

2014-06-03 Thread Tim Chase
On 2014-06-04 10:39, Chris Angelico wrote: A current discussion regarding Python's Unicode support centres (or centers, depending on how close you are to the cent[er]{2} of the universe) around one critical question: Is string indexing common? Python strings can be indexed with integers to

Re: immutable vs mutable

2014-06-03 Thread Deb Wyatt
The examples deal mostly with names and scope. The article in my opinion confuses a Python concept which is otherwise very straight-forward which has been beat to death on this forum. marcus Well, I'm glad you find this concept straight-forward. I guess I'm not as smart as you. I

Re: immutable vs mutable

2014-06-03 Thread Deb Wyatt
The examples deal mostly with names and scope. The article in my opinion confuses a Python concept which is otherwise very straight-forward which has been beat to death on this forum. marcus Well, I'm glad you find this concept straight-forward. I guess I'm not as smart as you. I

Re: Unicode and Python - how often do you index strings?

2014-06-03 Thread Roy Smith
In article mailman.10656.1401842403.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: A current discussion regarding Python's Unicode support centres (or centers, depending on how close you are to the cent[er]{2} of the universe) sarcasm style=regex-pedantUm, you mean

Re: immutable vs mutable

2014-06-03 Thread Ethan Furman
On 06/03/2014 06:14 PM, Deb Wyatt wrote: Mark Harris wrote: The examples deal mostly with names and scope. The article in my opinion confuses a Python concept which is otherwise very straight-forward which has been beat to death on this forum. Well, I'm glad you find this concept

Re: Unicode and Python - how often do you index strings?

2014-06-03 Thread Ethan Furman
On 06/03/2014 05:39 PM, Chris Angelico wrote: A current discussion regarding Python's Unicode support centres (or centers, depending on how close you are to the cent[er]{2} of the universe) around one critical question: Is string indexing common? I use it quite a bit, but the strings are

Re: OT: This Swift thing

2014-06-03 Thread Michael Torrie
On 06/03/2014 03:01 PM, Chris Angelico wrote: On Wed, Jun 4, 2014 at 6:43 AM, Sturla Molden sturla.mol...@gmail.com wrote: A Python with static typing would have been far better, IMHO. It seems they have created a Python-JavaScript bastard with random mix of features. Unfortunately they

Re: Unicode and Python - how often do you index strings?

2014-06-03 Thread Chris Angelico
On Wed, Jun 4, 2014 at 11:18 AM, Roy Smith r...@panix.com wrote: In article mailman.10656.1401842403.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: A current discussion regarding Python's Unicode support centres (or centers, depending on how close you are to the

Re: Unicode and Python - how often do you index strings?

2014-06-03 Thread Chris Angelico
On Wed, Jun 4, 2014 at 11:11 AM, Tim Chase python.l...@tim.thechases.com wrote: I then take row 2 and use it to make a mapping of header-name to a slice-object for slicing the subsequent strings: slice(i.start(), i.end()) print(EmpID = %s % row[header_map[EMPID]].strip())

Re: OT: This Swift thing

2014-06-03 Thread Chris Angelico
On Wed, Jun 4, 2014 at 11:47 AM, Michael Torrie torr...@gmail.com wrote: A Swift string is simply a one-to-one mapping of the NSString class. Apple claims it is unicode compliant whatever that means.

Corrputed stacktrace?

2014-06-03 Thread Nikolaus Rath
Hello, I'm trying to debug a problem. As far as I can tell, one of my methods is called at a point where it really should not be called. When setting a breakpoint in the function, I'm getting this: /home/nikratio/in-progress/s3ql/src/s3ql/backends/s3c.py(693)close() - if not self.md5_checked:

  1   2   3   >