Re: Strange behaviour with a for loop.

2014-01-03 Thread Cameron Simpson
On 04Jan2014 16:54, Sean Murphy wrote: > Thanks everyone. > > Mark thanks for the correction on the ':'. Since I didn't cut and copy, > rather typed it out. Errors crept in. :-) > > another question in relation to slicing strings. If you want to get a single > character, just using the index p

Re: Strange behaviour with a for loop.

2014-01-03 Thread Chris Angelico
On Sat, Jan 4, 2014 at 5:32 PM, Sean Murphy wrote: > So I suspect the offset number still starts at the beginning of the string > and counts forward or another way to look at it you are slicing from element > x to element y. If element y is less then element x, return nothing. Does > this make

Re: Strange behaviour with a for loop.

2014-01-03 Thread Sean Murphy
Hi everyone. Worked out what I was doing wrong with the string splicing. The offset number was lower then the index number, so it was failing. E.G: On 04/01/2014, at 4:54 PM, Sean Murphy wrote: > Thanks everyone. > > Mark thanks for the correction on the ':'. Since I didn't cut and copy,

Re: Strange behaviour with a for loop.

2014-01-03 Thread Sean Murphy
Thanks everyone. Mark thanks for the correction on the ':'. Since I didn't cut and copy, rather typed it out. Errors crept in. :-) another question in relation to slicing strings. If you want to get a single character, just using the index position will get it. If I use the following, shouldn'

Re: Blog "about python 3"

2014-01-03 Thread Mark Lawrence
On 02/01/2014 17:36, Robin Becker wrote: On 31/12/2013 15:41, Roy Smith wrote: I'm using 2.7 in production. I realize that at some point we'll need to upgrade to 3.x. We'll keep putting that off as long as the "effort + dependencies + risk" metric exceeds the "perceived added value" metric.

Re: Creating a list with holes

2014-01-03 Thread Frank Millman
"Larry Martell" wrote in message news:CACwCsY5P47-dB1NLQTUTQ=0aF6B+-M3y4hCxcUGmcVmHM8=-x...@mail.gmail.com... >I think I know the answer is no, but is there any package that allows > creating a list with holes in it? E.g. I'd want to do something like: > > x[10] = 12 > x[20] = 30 > > I'm thinkin

Re: Suggest an open-source log analyser?

2014-01-03 Thread Walter Hurry
On Thu, 02 Jan 2014 16:40:19 +1100, Alec Taylor wrote: > I use the Python logger class; with the example syntax of: > Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') > > Can of course easily use e.g.: a JSON syntax here instead. > > Are there any open-source log viewers (e.

Re: How to make a tkinter GUI work on top of a CUI program?

2014-01-03 Thread Jerry Hill
On Fri, Jan 3, 2014 at 9:44 PM, Beinan Li wrote: > But some console programs have their own shell or ncurse-like CUI, such as > cscope. > So I figured that I need to first subprocess.popen a bidirectional pipe and > send command through stdin and get results from stdout and stderr. > > But in such

Re: Strange behaviour with a for loop.

2014-01-03 Thread Mark Lawrence
On 04/01/2014 04:03, Sean Murphy wrote: Hello all. This is a newly question. But I wish to understand why the below code is providing different results. import os, sys if len(sys.argv) > 2: filenames = sys.argv[1:] else print ("no parameters provided\n") sys.edit() for filename in

Re: Highest performance HTTP REST microframework?

2014-01-03 Thread Chris Angelico
On Sat, Jan 4, 2014 at 3:26 PM, Alec Taylor wrote: > What is the highest performance REST microframework? > > Happy if it's mostly written in C or C++; as long as it provides a > simple routes interface in Python. > > Currently using bottle and utilising its application, @route and > app.merge(app

Re: Strange behaviour with a for loop.

2014-01-03 Thread Chris Angelico
On Sat, Jan 4, 2014 at 3:03 PM, Sean Murphy wrote: > filenames = sys.argv[1:] > > for filename in filenames: > print ("filename is: %s\n" %filename) versus > filenames = sys.argv[1] > > for filename in filenames: > print ("filename is: %s\n" % filename) The first one is slicing sys.arg

Re: Strange behaviour with a for loop.

2014-01-03 Thread Larry Martell
On Fri, Jan 3, 2014 at 11:03 PM, Sean Murphy wrote: > Hello all. > > This is a newly question. But I wish to understand why the below code is > providing different results. > > import os, sys > > > if len(sys.argv) > 2: > filenames = sys.argv[1:] > else > print ("no parameters provided\n") >

Strange behaviour with a for loop.

2014-01-03 Thread Sean Murphy
Hello all. This is a newly question. But I wish to understand why the below code is providing different results. import os, sys if len(sys.argv) > 2: filenames = sys.argv[1:] else print ("no parameters provided\n") sys.edit() for filename in filenames: print ("filename is: %s\n" %file

Highest performance HTTP REST microframework?

2014-01-03 Thread Alec Taylor
What is the highest performance REST microframework? Happy if it's mostly written in C or C++; as long as it provides a simple routes interface in Python. Currently using bottle and utilising its application, @route and app.merge(app2) extra features. -- https://mail.python.org/mailman/listinfo/

Re: Suggest an open-source log analyser?

2014-01-03 Thread Alec Taylor
Web interface (and/or SQL-like query interface); is useful for drilling down and rolling up multiparametric analyses. Currently looking at logstash, kibana, graylog2 and a few others. Might end up writing my own to escape the Java dependency. Would welcome further suggestions. On Fri, Jan 3, 201

Re: Blog "about python 3"

2014-01-03 Thread Mark Lawrence
On 03/01/2014 22:00, Terry Reedy wrote: On 1/3/2014 7:28 AM, Robin Becker wrote: On 03/01/2014 09:01, Terry Reedy wrote: There was more speedup in 3.3.2 and possibly even more in 3.3.3, so OP should run the latter. python 3.3.3 is what I use on windows. As for astral / non-bmp etc etc that's

Re: Creating a list with holes

2014-01-03 Thread Chris Angelico
On Sat, Jan 4, 2014 at 2:32 PM, Dan Stromberg wrote: > That is fine, sorting once at then end of a script is a good use of > sorted(some_dict.keys()). However, it probably should be pointed out > that this, while similar, is not so good: > > for thing in range(n): >for key in sorted(some_dict

Re: Creating a list with holes

2014-01-03 Thread Dan Stromberg
On Fri, Jan 3, 2014 at 7:00 PM, Chris Angelico wrote: > On Sat, Jan 4, 2014 at 1:58 PM, Dan Stromberg wrote: >> On Fri, Jan 3, 2014 at 7:37 AM, Chris Angelico wrote: >>> Depending on what exactly you need, it's probably worth just using a >>> dict. In what ways do you need it to function as a li

Re: Creating a list with holes

2014-01-03 Thread Chris Angelico
On Sat, Jan 4, 2014 at 1:58 PM, Dan Stromberg wrote: > On Fri, Jan 3, 2014 at 7:37 AM, Chris Angelico wrote: >> Depending on what exactly you need, it's probably worth just using a >> dict. In what ways do you need it to function as a list? You can >> always iterate over sorted(some_dict.keys())

Re: Creating a list with holes

2014-01-03 Thread Dan Stromberg
On Fri, Jan 3, 2014 at 7:37 AM, Chris Angelico wrote: > Depending on what exactly you need, it's probably worth just using a > dict. In what ways do you need it to function as a list? You can > always iterate over sorted(some_dict.keys()) if you need to run > through them in order. FWIW, sorting

Re: How to make a tkinter GUI work on top of a CUI program?

2014-01-03 Thread Chris Angelico
On Sat, Jan 4, 2014 at 1:44 PM, Beinan Li wrote: > But some console programs have their own shell or ncurse-like CUI, such as > cscope. > So I figured that I need to first subprocess.popen a bidirectional pipe and > send command through stdin and get results from stdout and stderr. > > But in such

How to make a tkinter GUI work on top of a CUI program?

2014-01-03 Thread Beinan Li
I know how to make a GUI program work on top of a console program like "ls", which exits immediately. But some console programs have their own shell or ncurse-like CUI, such as cscope. So I figured that I need to first subprocess.popen a bidirectional pipe and send command through stdin and get re

Re: Creating a list with holes

2014-01-03 Thread Denis McMahon
On Fri, 03 Jan 2014 20:18:06 -0500, Roy Smith wrote: > In article , > Larry Martell wrote: > > >> Thanks, but I know all that about dicts. I need to use a list for >> compatibility with existing code. > > Generalizing what I think the situation is, "A dict is the best data > structure for the

Re: [newbie] Recursive algorithm - review

2014-01-03 Thread Chris Angelico
On Sat, Jan 4, 2014 at 11:13 AM, Wiktor wrote: > Hi, > it's my first post on this newsgroup so welcome everyone. :) Hi! Welcome! > I'm still learning Python (v3.3), and today I had idea to design (my first) > recursive function, that generates board to 'Towers' Puzzle: > http://www.chiark.greene

Re: [newbie] Recursive algorithm - review

2014-01-03 Thread Terry Reedy
On 1/3/2014 7:16 PM, Wiktor wrote: Hi, it's my first post on this newsgroup so welcome everyone. :) I'm still learning Python (v3.3), and today I had idea to design (my first) recursive function, that generates (filled out) board to 'Towers' Puzzle: http://www.chiark.greenend.org.uk/~sgtatham/p

Re: Creating a list with holes

2014-01-03 Thread Chris Angelico
On Sat, Jan 4, 2014 at 11:18 AM, Larry Martell wrote: > Your last suggestion is what I ended up doing, but I had to key off > the unit - I couldn't use because that > isn't present for ones that have no - that messed me up for > hours. But it's working now. Thanks all! Sure, you know your dat

Re: Creating a list with holes

2014-01-03 Thread Roy Smith
In article , Larry Martell wrote: > > Thanks, but I know all that about dicts. I need to use a list for > compatibility with existing code. Generalizing what I think the situation is, "A dict is the best data structure for the parsing phase, but I need a list later to hand off to legacy inte

[newbie] Recursive algorithm - review

2014-01-03 Thread Wiktor
Hi, it's my first post on this newsgroup so welcome everyone. :) I'm still learning Python (v3.3), and today I had idea to design (my first) recursive function, that generates (filled out) board to 'Towers' Puzzle: http://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/towers.html (so I could in

Re: Creating a list with holes

2014-01-03 Thread Larry Martell
On Fri, Jan 3, 2014 at 11:07 AM, Chris Angelico wrote: > On Sat, Jan 4, 2014 at 2:55 AM, Larry Martell wrote: >> The use case is that I'm parsing a XML file like this: >> >> >> >> >> True >> >> >> >>

Re: Creating a list with holes

2014-01-03 Thread Larry Martell
On Fri, Jan 3, 2014 at 1:07 PM, Denis McMahon wrote: > On Fri, 03 Jan 2014 10:41:21 -0500, Larry Martell wrote: > >> The holes would be between the items I put in. In my example above, if I >> assigned to [10] and [20], then the other items ([0..9] and [11..19]) >> would have None. > dic = {

[newbie] Recursive algorithm - review

2014-01-03 Thread Wiktor
Hi, it's my first post on this newsgroup so welcome everyone. :) I'm still learning Python (v3.3), and today I had idea to design (my first) recursive function, that generates board to 'Towers' Puzzle: http://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/towers.html (so I could in future write a

Re: Blog "about python 3"

2014-01-03 Thread Terry Reedy
On 1/3/2014 7:28 AM, Robin Becker wrote: On 03/01/2014 09:01, Terry Reedy wrote: There was more speedup in 3.3.2 and possibly even more in 3.3.3, so OP should run the latter. python 3.3.3 is what I use on windows. As for astral / non-bmp etc etc that's almost irrelevant for the sort of tests w

Re: About some problem

2014-01-03 Thread Ethan Furman
On 01/03/2014 12:55 PM, Steven D'Aprano wrote: André Malo wrote: * Steven D'Aprano wrote: Mark Lawrence wrote: raise "Not Valid DB Type" is perfectly valid in Python 2. Actually, no it isn't. It's only valid up to Python 2.4. In Python 2.5, string exceptions display a warning but continu

Re: Debugging on the Mac question.

2014-01-03 Thread Sean Murphy
PETER, thanks Peter, I have already found the PDB module and have had a play with it. It will do for now. On 03/01/2014, at 8:08 PM, Paul Rudin wrote: > Sean Murphy writes: > > >> I am a Vision Impaired programmer on the Mac and Window platforms. I have >> started to learn Python. The bigges

Re: About some problem

2014-01-03 Thread Steven D'Aprano
André Malo wrote: > * Steven D'Aprano wrote: > >> Mark Lawrence wrote: >> >>> raise "Not Valid DB Type" >>> >>> is perfectly valid in Python 2. >> >> Actually, no it isn't. It's only valid up to Python 2.4. In Python 2.5, >> string exceptions display a warning but continue to work, and in Pyth

Python 2.x vs 3.x survey

2014-01-03 Thread Dan Stromberg
The results of the survey are at: https://wiki.python.org/moin/2.x-vs-3.x-survey -- https://mail.python.org/mailman/listinfo/python-list

Re: Is Python really "Lisp without parentheses"? So would it be easy to *implement* a lot of Python in Scheme/Lisp?

2014-01-03 Thread Steven D'Aprano
Chris Seberino wrote: > The basics of Scheme or Lisp are amazingly easy to implement. Would > implementing a subset of Python in a Scheme subset be a clever way to > easily implement a lot of Python? I don't know how easy it was, but it was done: http://common-lisp.net/project/clpython/ --

Re: About some problem

2014-01-03 Thread André Malo
* Steven D'Aprano wrote: > Mark Lawrence wrote: > >> raise "Not Valid DB Type" >> >> is perfectly valid in Python 2. > > Actually, no it isn't. It's only valid up to Python 2.4. In Python 2.5, > string exceptions display a warning but continue to work, and in Python > 2.6 they generate a compil

The Economic System of Islam

2014-01-03 Thread BV BV
The Economic System of Islam 1-An introduction to the principles Islam has legislated to guide the economic system of society. Part 1: The sources from which the laws that guide economical activity are derived. 2-The Ideological Basis of Economic Activity and the general principles by which the

Re: Is Python really "Lisp without parentheses"? So would it be easy to *implement* a lot of Python in Scheme/Lisp?

2014-01-03 Thread Devin Jeanpierre
On Fri, Jan 3, 2014 at 9:26 AM, Chris Seberino wrote: > On Friday, January 3, 2014 11:10:07 AM UTC-6, Devin Jeanpierre wrote: >> A lecturer of mine back in university did this (implemented a subset >> of Python in Racket). My understanding is that this is primarily >> interesting to show that Rack

Re: Creating a list with holes

2014-01-03 Thread Denis McMahon
On Fri, 03 Jan 2014 10:41:21 -0500, Larry Martell wrote: > The holes would be between the items I put in. In my example above, if I > assigned to [10] and [20], then the other items ([0..9] and [11..19]) > would have None. >>> dic = { 10:6, 20:11} >>> dic.get(10) 6 >>> dic.get(14) >>> dic.get(27,

Re: Is Python really "Lisp without parentheses"? So would it be easy to *implement* a lot of Python in Scheme/Lisp?

2014-01-03 Thread Rustom Mody
On Fri, Jan 3, 2014 at 10:20 PM, Chris Seberino wrote: > > Exceptions, modules, OOP, etc. would be tricky to implement in Scheme but at > least the basics like for loops, while loops, assignment etc. would seem > doable and very instructive for students.they would thereafter, for all > time

Re: Python 2.x and 3.x usage survey

2014-01-03 Thread emile
On 01/02/2014 08:55 AM, Grant Edwards wrote: On 2013-12-31, Steven D'Aprano wrote: You laugh, but there was at least one attendee at the last PyCon who was still using 1.5 professionally. Software never quite dies so long as there is hardware capable of running it. ITYM: ... so long as ther

Re: Is Python really "Lisp without parentheses"? So would it be easy to *implement* a lot of Python in Scheme/Lisp?

2014-01-03 Thread Roy Smith
In article , Devin Jeanpierre wrote: > // C++ > Foo x = y; > x.bar = 3; > > // Java > Foo x = y; > x.bar = 3; > > // Scheme > (define x y) > (foo-bar x 3) > > The syntax of the first two is identical, so the uneducated would > assume they do the same thing. This is one of the things that tr

Re: Is Python really "Lisp without parentheses"? So would it be easy to *implement* a lot of Python in Scheme/Lisp?

2014-01-03 Thread Chris Seberino
On Friday, January 3, 2014 11:10:07 AM UTC-6, Devin Jeanpierre wrote: > A lecturer of mine back in university did this (implemented a subset > > of Python in Racket). My understanding is that this is primarily > > interesting to show that Racket is not as crazily different as it > > looks from

Re: Blog "about python 3"

2014-01-03 Thread Ethan Furman
On 01/03/2014 02:24 AM, Chris Angelico wrote: I worked that out with a sheet of paper and a pencil. The pencil was a little help, but the paper was three sheets in the wind. Beautiful! -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Is Python really "Lisp without parentheses"? So would it be easy to *implement* a lot of Python in Scheme/Lisp?

2014-01-03 Thread Devin Jeanpierre
On Thu, Jan 2, 2014 at 10:46 PM, Chris Seberino wrote: > I've heard it said, by no less a guru than Peter Norvig, that Python is a lot > like Lisp without the parentheses at least for the basics of Python. There are plenty of non-superficial differences. Python has lexical scope, lisps usual

Re: Is Python really "Lisp without parentheses"? So would it be easy to *implement* a lot of Python in Scheme/Lisp?

2014-01-03 Thread Chris Seberino
Exceptions, modules, OOP, etc. would be tricky to implement in Scheme but at least the basics like for loops, while loops, assignment etc. would seem doable and very instructive for students.they would thereafter, for all time, have a mental image of what the Python interpreter is doing.

Re: Creating a list with holes

2014-01-03 Thread Chris Angelico
On Sat, Jan 4, 2014 at 2:55 AM, Larry Martell wrote: > The use case is that I'm parsing a XML file like this: > > > > > True > > > > > False > >

Re: Creating a list with holes

2014-01-03 Thread Roy Smith
In article , Chris Angelico wrote: > Alternatively, if you expect to fill in most of the elements, it's > possible you'd be happier working with a subclass of list that > auto-expands by filling in the spare space with a singleton meaning > "no element here". And, if you know ahead of time the

Re: Creating a list with holes

2014-01-03 Thread Chris Angelico
On Sat, Jan 4, 2014 at 2:51 AM, Roy Smith wrote: > In article , > Chris Angelico wrote: > >> Alternatively, if you expect to fill in most of the elements, it's >> possible you'd be happier working with a subclass of list that >> auto-expands by filling in the spare space with a singleton meaning

Re: Ifs and assignments

2014-01-03 Thread Duncan Booth
Chris Angelico wrote: > Maybe a for loop isn't the best other example, but I > frequently work with places where I want to call some function and > keep iterating with the result of that until it returns false: > > while (var = func()) > { > > } > > In Python, that gets a lot clunkier.

Re: Creating a list with holes

2014-01-03 Thread Larry Martell
On Fri, Jan 3, 2014 at 10:37 AM, Chris Angelico wrote: > On Sat, Jan 4, 2014 at 2:19 AM, Larry Martell wrote: >> I think I know the answer is no, but is there any package that allows >> creating a list with holes in it? E.g. I'd want to do something like: >> >> x[10] = 12 >> x[20] = 30 >> >> I'm

Re: Blog "about python 3"

2014-01-03 Thread Chris Angelico
On Sat, Jan 4, 2014 at 1:57 AM, Roy Smith wrote: > I was doing a project a while ago importing 20-something million records > into a MySQL database. Little did I know that FOUR of those records > contained astral characters (which MySQL, at least the version I was > using, couldn't handle). > > M

Re: Creating a list with holes

2014-01-03 Thread Chris Angelico
On Sat, Jan 4, 2014 at 2:38 AM, Roy Smith wrote: > Why do you want holes? Is the issue that you're storing sparse data and > don't want to waste memory on unused keys? If so, a dictionary should > do you fine. > > Do you need to be able to read the values back out in a specific order? > You can

Re: need to print seconds from the epoch including the millisecond

2014-01-03 Thread Grant Edwards
On 2014-01-03, Dave Angel wrote: > On Thu, 2 Jan 2014 16:23:22 + (UTC), Grant Edwards > wrote: >> AFAIK, that's irrelevent. time.time() returns a float. On all the >> CPython implementations I know of, that is a 64-bit IEEE format, >> which provides 16 decimal digits of precision regardles

Re: Creating a list with holes

2014-01-03 Thread Larry Martell
On Fri, Jan 3, 2014 at 10:30 AM, wrote: > On Friday, January 3, 2014 4:19:09 PM UTC+1, larry@gmail.com wrote: >> I think I know the answer is no, but is there any package that allows >> >> creating a list with holes in it? E.g. I'd want to do something like: >> >> x[10] = 12 >> x[20] = 30 >>

Re: need to print seconds from the epoch including the millisecond

2014-01-03 Thread Chris Angelico
On Sat, Jan 4, 2014 at 2:33 AM, Grant Edwards wrote: > time.time() returns a Python float. A Python float will have 16 digits > of precision. Perhaps the OS always sets some of those digits to 0 (or > even random values), but they're still there. Perhaps the accuracy or > granularity of the value

Re: Creating a list with holes

2014-01-03 Thread Roy Smith
In article , Larry Martell wrote: > I think I know the answer is no, but is there any package that allows > creating a list with holes in it? E.g. I'd want to do something like: > > x[10] = 12 > x[20] = 30 Whenever you ask, "What data structure do I want", you need to be able to answer, "What

Re: Creating a list with holes

2014-01-03 Thread Chris Angelico
On Sat, Jan 4, 2014 at 2:19 AM, Larry Martell wrote: > I think I know the answer is no, but is there any package that allows > creating a list with holes in it? E.g. I'd want to do something like: > > x[10] = 12 > x[20] = 30 > > I'm thinking of something like defaultdict but for lists (I know > th

Re: Creating a list with holes

2014-01-03 Thread eneskristo
On Friday, January 3, 2014 4:19:09 PM UTC+1, larry@gmail.com wrote: > I think I know the answer is no, but is there any package that allows > > creating a list with holes in it? E.g. I'd want to do something like: > > > > x[10] = 12 > > x[20] = 30 > > > > I'm thinking of something like

Creating a list with holes

2014-01-03 Thread Larry Martell
I think I know the answer is no, but is there any package that allows creating a list with holes in it? E.g. I'd want to do something like: x[10] = 12 x[20] = 30 I'm thinking of something like defaultdict but for lists (I know that's very different, but ... ) Thanks! -larry -- https://mail.pyth

Re: Blog "about python 3"

2014-01-03 Thread Roy Smith
In article , Robin Becker wrote: > On 03/01/2014 09:01, Terry Reedy wrote: > > There was more speedup in 3.3.2 and possibly even more in 3.3.3, so OP > > should run the latter. > > python 3.3.3 is what I use on windows. As for astral / non-bmp etc etc that's > almost irrelevant for the sort of

Re: Debugging on the Mac question.

2014-01-03 Thread Robert Kern
On 2014-01-03 04:17, Sean Murphy wrote: Team, I am a Vision Impaired programmer on the Mac and Window platforms. I have started to learn Python. The biggest road block I have is the ability of debugging my simple scripts. The IDLE program does not work with the screen readers I use on the Ma

Re: Blog "about python 3"

2014-01-03 Thread Robin Becker
On 03/01/2014 09:01, Terry Reedy wrote: There was more speedup in 3.3.2 and possibly even more in 3.3.3, so OP should run the latter. python 3.3.3 is what I use on windows. As for astral / non-bmp etc etc that's almost irrelevant for the sort of tests we're doing which are mostly simple engli

pip's wheel support requires setuptools >= 0.8 for dist-info support

2014-01-03 Thread seaders
I have a Jenkins server running Ubuntu which has been running perfectly fine for as long as I've been using it, and in one of the jobs, it runs a few things under the shiningpanda plugin (a python virtual environment wrapper). At some point today, or over the weekend, the job that uses it starte

WebSocket for Python 2 and 3 on Twisted and asyncio

2014-01-03 Thread Tobias Oberstein
Hi, Autobahn provides open-source implementations of * The WebSocket Protocol * The Web Application Messaging Protocol (WAMP) https://github.com/tavendo/AutobahnPython https://pypi.python.org/pypi/autobahn Starting with the release 0.7.0, Autobahn now fully supports (with all features) both *

Re: Blog "about python 3"

2014-01-03 Thread Robin Becker
On 02/01/2014 23:57, Antoine Pitrou wrote: .. Running a test suite is a completely broken benchmarking methodology. You should isolate workloads you are interested in and write a benchmark simulating them. I'm certain you're right, but individual bits of code like generating our r

Re: Blog "about python 3"

2014-01-03 Thread Robin Becker
On 02/01/2014 18:37, Terry Reedy wrote: On 1/2/2014 12:36 PM, Robin Becker wrote: I just spent a large amount of effort porting reportlab to a version which works with both python2.7 and python3.3. I have a large number of functions etc which handle the conversions that differ between the two p

Re: On a scrollbar for tkinter

2014-01-03 Thread Vlastimil Brom
2014/1/3 : > @Rick > I found some solutions for python 2.x, but still, as I am with the future, I > need a futuristic solution or 2, so if anyone else could help me, I'd be > grateful! > -- Hi, I usually don't use tkinter myself, hence others may have more idiomatic suggestions, but you can of

Re: Blog "about python 3"

2014-01-03 Thread Robin Becker
On 02/01/2014 18:25, David Hutto wrote: Just because it's 3.3 doesn't matter...the main interest is in compatibility. Secondly, you used just one piece of code, which could be a fluke, try others, and check the PEP. You need to realize that evebn the older versions are benig worked on, and they h

Re: Blog "about python 3"

2014-01-03 Thread Chris Angelico
On Fri, Jan 3, 2014 at 9:10 PM, wrote: > It's time to understand the Character Encoding Models > and the math behind it. > Unicode does not differ from any other coding scheme. > > How? With a sheet of paper and a pencil. > One plus one is two, therefore Python is better than Haskell. Four time

Re: Blog "about python 3"

2014-01-03 Thread wxjmfauth
It's time to understand the Character Encoding Models and the math behind it. Unicode does not differ from any other coding scheme. How? With a sheet of paper and a pencil. jmf -- https://mail.python.org/mailman/listinfo/python-list

Re: Is Python really "Lisp without parentheses"? So would it be easy to *implement* a lot of Python in Scheme/Lisp?

2014-01-03 Thread Rustom Mody
On Fri, Jan 3, 2014 at 12:16 PM, Chris Seberino wrote: > I've heard it said, by no less a guru than Peter Norvig, that Python is a lot > like Lisp without the parentheses at least for the basics of Python. > > For pedagogical reasons, I'm wondering if it would be easy to implement a big > su

Is Python really "Lisp without parentheses"? So would it be easy to *implement* a lot of Python in Scheme/Lisp?

2014-01-03 Thread Chris Seberino
I've heard it said, by no less a guru than Peter Norvig, that Python is a lot like Lisp without the parentheses at least for the basics of Python. For pedagogical reasons, I'm wondering if it would be easy to implement a big subset of Python in Scheme. The basics of Scheme or Lisp are ama

Re: Debugging on the Mac question.

2014-01-03 Thread Paul Rudin
Sean Murphy writes: > I am a Vision Impaired programmer on the Mac and Window platforms. I have > started to learn Python. The biggest road block I have is the ability of > debugging my simple scripts. The IDLE program does not work with the screen > readers I use on the Mac or Windows. A screen

Re: Blog "about python 3"

2014-01-03 Thread Terry Reedy
On 1/2/2014 11:49 PM, Steven D'Aprano wrote: Robin Becker wrote: For fairly sensible reasons we changed the internal default to use unicode rather than bytes. After doing all that and making the tests compatible etc etc I have a version which runs in both and passes all its tests. However, for

Debugging on the Mac question.

2014-01-03 Thread Sean Murphy
Team, I am a Vision Impaired programmer on the Mac and Window platforms. I have started to learn Python. The biggest road block I have is the ability of debugging my simple scripts. The IDLE program does not work with the screen readers I use on the Mac or Windows. A screen reader is a program

Re: Ifs and assignments

2014-01-03 Thread Terry Reedy
On 1/2/2014 8:20 PM, Mark Lawrence wrote: On 03/01/2014 00:57, Gary Herron wrote: On 01/02/2014 01:44 PM, John Allsup wrote: The point of my original post was that, whilst C's if( x = 2 ) { do something } and if( x == 2 ) { do something } are easy to confuse, and a source of bugs, having a

Re: On a scrollbar for tkinter

2014-01-03 Thread eneskristo
@Terry Quite sorry but had to write that message in a hurry, didn't notice the name. @Rick I found some solutions for python 2.x, but still, as I am with the future, I need a futuristic solution or 2, so if anyone else could help me, I'd be grateful! -- https://mail.python.org/mailman/listinfo/