Re: Missing stack frames?

2014-06-04 Thread dieter
Nikolaus Rath writes: > ... > Is there a way to produce a stacktrace without using the interactive > debugger? There is the "threadframe" package (on "PyPI"). It has helped me much to analyse problems in multithreaded programs (e.g. as part of "haufe.requestmonitoring"). However, I doubt that it

Re: Missing stack frames?

2014-06-04 Thread Paul Rubin
Nikolaus Rath writes: > Still no context before the ominous close() call. I'm very confused. close() could be getting called from a destructor as the top level function of a thread exits, or something like that. -- https://mail.python.org/mailman/listinfo/python-list

Re: pyflakes best practices?

2014-06-04 Thread Miki Tebeka
Greetings, > So, what's the best practice here? How do people deal with the false > positives? Is there some way to annotate the source code to tell > pyflakes to ignore something? We use flake8 (pyflakes + pep8) as pre step for the tests. We fail the tests on any output from flake8. flake8

Re: Unicode and Python

2014-06-04 Thread Rustom Mody
On Wednesday, June 4, 2014 6:09:54 AM UTC+5:30, 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? No exactly on-topic f

Re: Missing stack frames?

2014-06-04 Thread Nikolaus Rath
Chris Angelico writes: > On Wed, Jun 4, 2014 at 12:30 PM, Nikolaus Rath wrote: >> I've instrumented one of my unit tests with a conditional >> 'pdb.set_trace' in some circumstances (specifically, when a function is >> called by a thread other than MainThread). > > I think the likelihood of this b

Re: Error while installing PIL

2014-06-04 Thread Mark H Harris
On 6/4/14 10:02 PM, Sanjay Madhikarmi wrote: I have already install python 2.7 64bit in my windows 8 machine but while installing PIL 1.1.7 for python 2.7 it says that "Python 2.7 required which was not found in the registry" Please help me sort out this problem ... also this one; -- https:

Re: Error while installing PIL

2014-06-04 Thread Mark H Harris
On 6/4/14 10:02 PM, Sanjay Madhikarmi wrote: I have already install python 2.7 64bit in my windows 8 machine but while installing PIL 1.1.7 for python 2.7 it says that "Python 2.7 required which was not found in the registry" ... oops, sorry, also this one: http://stackoverflow.com/questions/

Re: How to use SQLite (sqlite3) more efficiently

2014-06-04 Thread Demian Brecht
> > On Thu, Jun 5, 2014 at 6:27 AM, ps16thypresence wrote: > > > > I'm completely new to SQL, and recently started using SQLite in > > > one of my Python programs. Unrelated to Python but as you're new to SQL I figured I'd ask: Do you have an index on the name field? If you don't, you'll incur a f

Re: Error while installing PIL

2014-06-04 Thread Mark H Harris
On 6/4/14 10:02 PM, Sanjay Madhikarmi wrote: I have already install python 2.7 64bit in my windows 8 machine but while installing PIL 1.1.7 for python 2.7 it says that "Python 2.7 required which was not found in the registry" Please help me sort out this problem http://stackoverflow.com/quest

Error while installing PIL

2014-06-04 Thread Sanjay Madhikarmi
Dear sir/madam I have already install python 2.7 64bit in my windows 8 machine but while installing PIL 1.1.7 for python 2.7 it says that "Python 2.7 required which was not found in the registry" Please help me sort out this problem Thanks in advance -- *Regards, Sanjay Madhikarmi Url: www.san

Re: Python 3.2 has some deadly infection

2014-06-04 Thread Akira Li
Steven D'Aprano writes: > On Tue, 03 Jun 2014 15:18:19 +0100, Robin Becker wrote: > >> Isn't it a bit old fashioned to think everything is connected to a >> console? > > The whole concept of stdin and stdout is based on the idea of having a > console to read from and write to. Otherwise, what wo

Re: OT: This Swift thing

2014-06-04 Thread Terry Reedy
On 6/4/2014 7:23 PM, Mark H Harris wrote: On 6/4/14 5:18 PM, Terry Reedy wrote: On 6/4/2014 10:53 AM, Mark H Harris wrote: The primary paradigm on this topic locally is that indents are bad because malformed or mangled code cannot be reformatted easily (if at all). Begin solution:':' as the e

Re: How to use SQLite (sqlite3) more efficiently

2014-06-04 Thread Rustom Mody
On Thursday, June 5, 2014 2:53:21 AM UTC+5:30, Chris Angelico wrote: > On Thu, Jun 5, 2014 at 6:27 AM, ps16thypresence wrote: > > I'm completely new to SQL, and recently started using SQLite in > > one of my Python programs. : : > Happy to help out! But before I look into the code itself, two sma

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

2014-06-04 Thread Rustom Mody
On Thursday, June 5, 2014 12:12:06 AM UTC+5:30, Roy Smith wrote: > Chris Angelico wrote: > > You can't ignore those. You might be able to say "Well, my program > > will run slower if you throw these at it", but if you're going down > > that route, you probably want the full FSR and the advantage

Re: Python 3.2 has some deadly infection

2014-06-04 Thread Gregory Ewing
Steven D'Aprano wrote: The whole concept of stdin and stdout is based on the idea of having a console to read from and write to. Not really; stdin and stdout are frequently connected to files, or pipes to other processes. The console, if it exists, just happens to be a convenient default value

Re: OT: This Swift thing

2014-06-04 Thread Mark H Harris
On 6/4/14 5:18 PM, Terry Reedy wrote: On 6/4/2014 10:53 AM, Mark H Harris wrote: The primary paradigm on this topic locally is that indents are bad because malformed or mangled code cannot be reformatted easily (if at all). Begin solution:':' as the end of a line means 'begin block; indent nex

Re: OT: This Swift thing

2014-06-04 Thread Terry Reedy
On 6/4/2014 10:53 AM, Mark H Harris wrote: The topic came up because the C/C++ coders were being encouraged to try Python3 as the language of choice for a new project, and someone said they would never consider Python for a project primary language because of indentation block delimiting. T

Re: How to use SQLite (sqlite3) more efficiently

2014-06-04 Thread Chris Angelico
On Thu, Jun 5, 2014 at 6:27 AM, wrote: > I'm completely new to SQL, and recently started using SQLite in one of my > Python programs. I've gotten what I wanted to work, but I'm not sure if I'm > doing it in the best/most efficient way. I have attached some sample code and > would appreciate any

How to use SQLite (sqlite3) more efficiently

2014-06-04 Thread ps16thypresenceisfullnessofjoy
I'm completely new to SQL, and recently started using SQLite in one of my Python programs. I've gotten what I wanted to work, but I'm not sure if I'm doing it in the best/most efficient way. I have attached some sample code and would appreciate any (polite) comments about how the SQL (or Python)

Re: Command prompt not shown when running Python script with subprocess on Windows

2014-06-04 Thread ps16thypresenceisfullnessofjoy
Thanks again for your help. I tried something similar to what you suggested: def run_app(self, app_path): args = shlex.split(app_path.replace("\\", "")) args = [arg.replace("", "\\") for arg in args] args[0] = os.path.expandvars(args[0]) try: if pywin32:

Re: Embedding numpy works once, but not twice??

2014-06-04 Thread John Gordon
In Mark Lawrence writes: > On 04/06/2014 20:14, Andre wrote: > > Any Solution? > > > > -- > > AL Barbieri > > http://scholar.google.com/citations?user=tylaKAMJ > > > If you'd take the trouble to give us some context you might get some > answers. His post title began with "Re: ", so I ass

Re: Embedding numpy works once, but not twice??

2014-06-04 Thread Mark Lawrence
On 04/06/2014 20:14, Andre wrote: Any Solution? -- AL Barbieri http://scholar.google.com/citations?user=tylaKAMJ If you'd take the trouble to give us some context you might get some answers. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for ou

Re: Automating windows media player on win7

2014-06-04 Thread MRAB
On 2014-06-03 09:10, Deogratius Musiige 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 work. I can see from device manager that a driver is

Re: Embedding numpy works once, but not twice??

2014-06-04 Thread Andre
Any Solution? -- AL Barbieri http://scholar.google.com/citations?user=tylaKAMJ -- https://mail.python.org/mailman/listinfo/python-list

Re: immutable vs mutable

2014-06-04 Thread Mark H Harris
On 6/3/14 8:14 PM, Deb Wyatt wrote: Well, I'm glad you find this concept straight-forward. I guess I'm not as smart as you. Not at all. I think you misunderstood me. I read the article and I reviewed it (although brief, I stand by what I said). To expand a bit, the article is poorly writt

Re: immutable vs mutable

2014-06-04 Thread Mark H Harris
On 6/3/14 8:24 PM, Ethan Furman wrote: Deb, do yourself a favor and just trash-can anything from Mark Harris. Ouch, that hurt. Did someone not get their coffee this morning? :-) -- https://mail.python.org/mailman/listinfo/python-list

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

2014-06-04 Thread Roy Smith
In article , Chris Angelico wrote: > You can't ignore those. You might be able to say "Well, my program > will run slower if you throw these at it", but if you're going down > that route, you probably want the full FSR and the advantages it > confers on ASCII and Latin-1 strings. Binding your pr

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

2014-06-04 Thread Paul Rubin
Tim Chase writes: > As mentioned elsewhere, I've got a LOT of code that expects that > string indexing is O(1) and rarely are those strings/offsets reused > I'm streaming through customer/provider data files, so caching > wouldn't do much good other than waste space and the time to maintain > them

Re: Missing stack frames?

2014-06-04 Thread Paul Rubin
Nikolaus Rath writes: > Is there a way to produce a stacktrace without using the interactive > debugger? Yes, use the traceback module. -- https://mail.python.org/mailman/listinfo/python-list

Re: pyflakes best practices?

2014-06-04 Thread Jean-Michel Pichavant
- Original Message - > We've recently started using pyflakes. The results seem to be > similar > to most tools of this genre. It found a few real problems. It > generated a lot of noise about things which weren't really wrong, but > were easy to fix (mostly, unused imports), and a few pl

Re: Corrputed stacktrace?

2014-06-04 Thread Nikolaus Rath
Chris Angelico writes: > On Wed, Jun 4, 2014 at 12:20 PM, Nikolaus Rath wrote: >> File "/usr/lib/python3.3/threading.py", line 878 in _bootstrap > > Can you replicate the problem in a non-threaded environment? Threads > make interactive debugging very hairy. Hmm. I could try to run the server

Re: Missing stack frames?

2014-06-04 Thread Nikolaus Rath
Chris Angelico writes: > On Wed, Jun 4, 2014 at 12:30 PM, Nikolaus Rath wrote: >> I've instrumented one of my unit tests with a conditional >> 'pdb.set_trace' in some circumstances (specifically, when a function is >> called by a thread other than MainThread). > > I think the likelihood of this b

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

2014-06-04 Thread Dave Angel
Chris Angelico Wrote in message: > On Wed, Jun 4, 2014 at 8:10 PM, Peter Otten <__pete...@web.de> wrote: >> The indices used for slicing typically don't come out of nowhere. A simple >> example would be >> >> def strip_prefix(text, prefix): >> if text.startswith(prefix): >> text = text

Re: pyflakes best practices?

2014-06-04 Thread Roland Koebler
Hi, I would recommend to use Pylint (http://www.pylint.org/) in addition to pyflakes. Pylint is much more powerful than pyflakes, and largely configurable. Regards Roland -- https://mail.python.org/mailman/listinfo/python-list

Re: OT: This Swift thing

2014-06-04 Thread Chris Angelico
On Thu, Jun 5, 2014 at 1:00 AM, Michael Torrie wrote: > Do programmers not psuedo-code on paper or white boards anymore? I pseudocode in a text editor, these days. Sometimes that pseudocode gets reworked into code; more often it becomes comments that precede the code (which may or may not get dro

Re: OT: This Swift thing

2014-06-04 Thread Michael Torrie
On 06/03/2014 03: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. Yeah people do have strong

Re: OT: This Swift thing

2014-06-04 Thread Mark H Harris
On 6/4/14 9:24 AM, Skip Montanaro wrote: Surely your local colleagues realize that Python has been around for 20-odd years now, that indentation-based block structure has been there since Day One, and that it's not going to change, right? Yup. Its the primary argument on the side for indenta

Installing modules on different versions of python??

2014-06-04 Thread Nzyme11
Running SLES 12.3 and trying to install zlib for python2.7.7. I need zlib to install setup-tools to instal virtualenv. It's driving me crazy. Is there some basics to follow when installing modules from source to specific versions of python?? Everything wants to install the python2.6. Thanks

Re: OT: This Swift thing

2014-06-04 Thread Mark H Harris
On 6/3/14 11:54 PM, Steven D'Aprano wrote: I've been passing code snippets by email and Usenet for 15 years or more, and I've never had a problem with indentation. Of course, I've had problems with *other people's code*, because they use broken tools that break the text they send. Me too.

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

2014-06-04 Thread Michael Torrie
On 06/04/2014 12:50 AM, wxjmfa...@gmail.com wrote: > Like many, you are not understanding unicode because > you do not understand the coding of characters. If that is true, then I'm sure a well-written paragraph or two can set him straight. You continually berate people for not understanding unic

Re: OT: This Swift thing

2014-06-04 Thread Skip Montanaro
On Tue, Jun 3, 2014 at 4: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. Which reminds me of thi

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

2014-06-04 Thread Steven D'Aprano
On Wed, 04 Jun 2014 12:53:19 +0100, Robin Becker wrote: > I believe that we should distinguish between glyph/character indexing > and string indexing. Even in unicode it may be hard to decide where a > visual glyph starts and ends. I assume most people would like to assign > one glyph to one unico

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

2014-06-04 Thread alister
On Wed, 04 Jun 2014 05:52:24 -0700, Rustom Mody wrote: > On Wednesday, June 4, 2014 4:20:01 PM UTC+5:30, alister wrote: >> The language is ENGLISH so the correct spelling is Centre regional >> variations my be common but they are incorrect > > "my"? > > O mee Oo my -- cockney (or Aussie) pedant?

Re: Python 3 is killing Python

2014-06-04 Thread wxjmfauth
Le lundi 2 juin 2014 17:01:01 UTC+2, Ian a écrit : > On Jun 1, 2014 12:11 PM, wrote: > > > At least Py2 does not crash when using non ascii > > > (eg sticking with cp1252). > > > > > > I just noticed this last week, Thursday, when presenting > > > the absurdity of the Flexible String Represen

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

2014-06-04 Thread wxjmfauth
Le mercredi 4 juin 2014 02:39:54 UTC+2, Chris Angelico a écrit : > 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 str

Re: Python 3.2 has some deadly infection

2014-06-04 Thread Steven D'Aprano
On Tue, 03 Jun 2014 15:18:19 +0100, Robin Becker wrote: > >> 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

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

2014-06-04 Thread Rustom Mody
On Wednesday, June 4, 2014 4:20:01 PM UTC+5:30, alister wrote: > The language is ENGLISH so the correct spelling is Centre regional > variations my be common but they are incorrect "my"? O mee Oo my -- cockney (or Aussie) pedant?? -- https://mail.python.org/mailman/listinfo/python-list

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

2014-06-04 Thread Robin Becker
On 04/06/2014 13:17, Marko Rauhamaa wrote: . Note, for example, that Google manages to sort out issues like these. It sees past diacritics and even case ending. . I guess they must normalize all inputs to some standard form and then search / eigenvectorize on those. There are quite

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

2014-06-04 Thread Tim Chase
On 2014-06-04 14:57, Marko Rauhamaa wrote: > > If you use UTF-8 for everything, then you end up in a world where > > string-indexing (see ChrisA's other side thread on this topic) is > > no longer an O(1) operation, but an O(N) operation. > > Most string operations are O(N) anyway. Besides, you

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

2014-06-04 Thread Tim Chase
On 2014-06-04 12:53, Robin Becker wrote: > > If you use UTF-8 for everything, then you end up in a world where > > string-indexing (see ChrisA's other side thread on this topic) is > > no longer an O(1) operation, but an O(N) operation. Some of us > > slice strings for a living. ;-) > > I

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

2014-06-04 Thread Marko Rauhamaa
Robin Becker : u'\xc5ngstr\xf6m'==u'\xc5ngstro\u0308m' > False Now *that* would be a valid reason for our resident Unicode expert to complain! Py3 in no way solves text representation issues definitively. > I know this is artificial Not at all. It probably is out of scope for Python, but i

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

2014-06-04 Thread Marko Rauhamaa
Tim Chase : > On 2014-06-04 00:58, Paul Rubin wrote: >> I've never understood why not use UTF-8 for everything. > > If you use UTF-8 for everything, then you end up in a world where > string-indexing (see ChrisA's other side thread on this topic) is no > longer an O(1) operation, but an O(N) opera

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

2014-06-04 Thread Robin Becker
On 04/06/2014 12:01, Tim Chase wrote: On 2014-06-04 00:58, Paul Rubin wrote: Steven D'Aprano writes: Maybe there's a use-case for a microcontroller that works in ISO-8859-5 natively, thus using only eight bits per character, That won't even make the Russians happy, since in Russia there are m

Re: Lock Windows Screen GUI using python

2014-06-04 Thread Chris Angelico
On Wed, Jun 4, 2014 at 1:55 PM, Jaydeep Patil wrote: > For plotting one graph, I need to use four to five excel files. Currently I > am reading excel files one by one and copy data of excel files to another > single master excel file. This master excel file consists of all data from > all input

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

2014-06-04 Thread Tim Chase
On 2014-06-04 00:58, Paul Rubin wrote: > Steven D'Aprano writes: > >> Maybe there's a use-case for a microcontroller that works in > >> ISO-8859-5 natively, thus using only eight bits per character, > > That won't even make the Russians happy, since in Russia there > > are multiple incompatible l

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

2014-06-04 Thread alister
On Wed, 04 Jun 2014 18:48:29 +1200, Gregory Ewing wrote: > Chris Angelico wrote: >> On Wed, Jun 4, 2014 at 11:18 AM, Roy Smith wrote: >> >>>Um, you mean cent(er|re), don't you? The >>>pattern you wrote also matches centee and centrr. >> >> Maybe there's someone who spells it that way! > > Com

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

2014-06-04 Thread alister
On Tue, 03 Jun 2014 21:18:12 -0400, Roy Smith wrote: > In article , > 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) > > Um, you mean cent(er|re), don't you? The >

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

2014-06-04 Thread Chris Angelico
On Wed, Jun 4, 2014 at 8:10 PM, Peter Otten <__pete...@web.de> wrote: > The indices used for slicing typically don't come out of nowhere. A simple > example would be > > def strip_prefix(text, prefix): > if text.startswith(prefix): > text = text[len(prefix):] > return text > > If bo

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

2014-06-04 Thread Peter Otten
Mark Lawrence wrote: > On 04/06/2014 01: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 c

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

2014-06-04 Thread Robin Becker
On 04/06/2014 08:58, Paul Rubin wrote: Steven D'Aprano writes: Maybe there's a use-case for a microcontroller that works in ISO-8859-5 natively, thus using only eight bits per character, That won't even make the Russians happy, since in Russia there are multiple incompatible legacy encodings.

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

2014-06-04 Thread Chris Angelico
On Wed, Jun 4, 2014 at 6:22 PM, Mark Lawrence wrote: > Single characters quite often, iteration rarely if ever, slicing all the > time, but does that last one count? Yes, slicing counts. What matters here is the potential impact of internally representing strings as UTF-8 streams; when you ask fo

RE: Python 3.3 shuts down

2014-06-04 Thread Ramas Sami
Hi all, Python 3.3 IDLE opens perfectly from that If I am try to open any-python-file.py or New file the python IDLE closes automatically. Python Version 3.3OS Windows 7 This problem happened when I had installed py2exe to convert into Python executables, since I have tried other packages like c

Re: immutable vs mutable

2014-06-04 Thread Mark Lawrence
On 04/06/2014 04:56, Deb Wyatt wrote: Thank you for this link. I will do my best to ask *smart* questions. I struggle with explaining myself sometimes, especially when trying to grasp something that baffles me. Deb in WA, USA Welcome to the wonderful world of computing :) -- My fellow Py

Re: immutable vs mutable

2014-06-04 Thread Mark Lawrence
On 04/06/2014 06:02, Steven D'Aprano wrote: On Wed, 04 Jun 2014 12:27:36 +1000, Chris Angelico wrote: Want to be sure your questions are smart? Willing to put in a bit of effort to make yourself welcomed not just courteously, but enthusiastically? Check out this essay, one of the more famous on

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

2014-06-04 Thread Mark Lawrence
On 04/06/2014 01: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 produ

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

2014-06-04 Thread Wolfgang Maier
On 04.06.2014 09:16, Chris Angelico wrote: The point is not that you might be able to get away with sticking your head in the sand and wishing Unicode would just go away. Even if you can, it's not something Python 3 can ever do. Exactly. These endless discussions about different encodings star

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

2014-06-04 Thread Paul Rubin
Steven D'Aprano writes: >> Maybe there's a use-case for a microcontroller that works in ISO-8859-5 >> natively, thus using only eight bits per character, > That won't even make the Russians happy, since in Russia there are > multiple incompatible legacy encodings. I've never understood why not

Re: Benefits of asyncio

2014-06-04 Thread Paul Rubin
Marko Rauhamaa writes: > Mostly asyncio is a way to deal with anything you throw at it. What do > you do if you need to exit the application immediately and your threads > are stuck in a 2-minute timeout? Eh? When the main thread exits, all the child threads go with it. Sometimes there is some

Re: OT: This Swift thing

2014-06-04 Thread Andrea D'Amore
On 2014-06-03 20:43:06 +, Sturla Molden said: I see no reason to use Swift instead of Python and PyObjC Most likely there'll be better integration with Xcode and its tools. -- Andrea -- https://mail.python.org/mailman/listinfo/python-list

Re: Benefits of asyncio

2014-06-04 Thread Paul Rubin
Marko Rauhamaa writes: > That's a good reason to avoid threads. Once you realize you would have > been better off with an async approach, you'll have to start over. That just hasn't happened to me yet, at least in terms of program organization. Python threads get too slow once there are too many

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

2014-06-04 Thread Steven D'Aprano
On Wed, 04 Jun 2014 17:16:13 +1000, Chris Angelico wrote: > On Wed, Jun 4, 2014 at 2:40 PM, Rustom Mody > wrote: >> On Wednesday, June 4, 2014 9:22:54 AM UTC+5:30, Chris Angelico wrote: >>> On Wed, Jun 4, 2014 at 1:37 PM, Rustom Mody wrote: >>> > And so a pure BMP-supporting implementation may be

Re: Benefits of asyncio

2014-06-04 Thread Chris Angelico
On Wed, Jun 4, 2014 at 3:10 PM, Burak Arslan wrote: > Ah ok. Well, a couple of years of writing async code, my not-so-objective > opinion about it is that it forces you to split your code into functions, > just like Python forces you to indent your code properly. This in turn > generally helps the

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

2014-06-04 Thread Chris Angelico
On Wed, Jun 4, 2014 at 3:02 PM, Ian Kelly wrote: > On Tue, Jun 3, 2014 at 10:40 PM, Rustom Mody wrote: >>> 1) Most or all Chinese and Japanese characters >> >> Dont know how you count 'most' >> >> | One possible rationale is the desire to limit the size of the full >> | Unicode character set, whe

Re: Having trouble in expressing constraints in Python

2014-06-04 Thread Ian Kelly
On Tue, Jun 3, 2014 at 7:44 AM, 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 const

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

2014-06-04 Thread Chris Angelico
On Wed, Jun 4, 2014 at 2:40 PM, Rustom Mody wrote: > On Wednesday, June 4, 2014 9:22:54 AM UTC+5:30, Chris Angelico wrote: >> On Wed, Jun 4, 2014 at 1:37 PM, Rustom Mody wrote: >> > And so a pure BMP-supporting implementation may be a reasonable >> > compromise. [As long as no surrogate-pairs are

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

2014-06-04 Thread Chris Angelico
On Wed, Jun 4, 2014 at 5:00 PM, Terry Reedy wrote: > On 6/4/2014 1:55 AM, Ian Kelly wrote: >> >> >> On Jun 3, 2014 11:27 PM, "Steven D'Aprano" > > wrote: >> > For technical reasons which I don't fully understand, Unicode only >> > uses 21 of those 32 bits, giving a to

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

2014-06-04 Thread Terry Reedy
On 6/4/2014 1:55 AM, Ian Kelly wrote: On Jun 3, 2014 11:27 PM, "Steven D'Aprano" mailto:st...@pearwood.info>> wrote: > For technical reasons which I don't fully understand, Unicode only > uses 21 of those 32 bits, giving a total of 1114112 available code > points. I think mainly it's to acco