Re: Running python's own unit tests?

2013-11-16 Thread Tim Golden
On 15/11/2013 23:10, Russell E. Owen wrote: In article <[email protected]>, Tim Golden wrote: http://docs.python.org/devguide/ Thank you and the other responders. I was expecting to find the information here <http://docs.python.org/2/using/unix.html> under Bui

Re: PYTHON 3.4 LEFTOVERS

2013-11-16 Thread Tim Chase
On 2013-11-16 08:03, Ferrous Cranus wrote: > root@secure [~]# find / -name python3.4 | rm -rf [snip] > 1. DELETE ALL REMAINS OF PYTHON3.4 I'm surprised I haven't seen the suggestion to move the "/" to the end of the entire command...it would certainly DELETE ALL REMAINS OF PYTHON3.4 ;-) Note1:

Re: Installing Python 3.3.2 pip

2013-11-17 Thread Tim Golden
On 17/11/2013 09:56, Nikos wrote: python3.4 is gone at this stage. Now if i only could install pip for Python 3.3.2 Here is what i have tried: root@secure [~]# which python3 /usr/bin/python3 root@secure [~]# which pip /usr/bin/pip root@secure [~]# yum install pip3 Loaded plugins: fastestmirr

Re: When to use assert

2013-11-17 Thread Tim Chase
On 2013-11-17 07:35, Steven D'Aprano wrote: > py> x = 23 > py> assert x > 0, "x is not zero or negative" This is the worst way to use an assertion: with a misleading message ;-) -tkc -- https://mail.python.org/mailman/listinfo/python-list

Re: Program Translation - Nov. 14, 2013

2013-11-17 Thread Tim Prince
ave a rule against using current syntax and indentation for Fortran, but others don't. -- Tim Prince -- https://mail.python.org/mailman/listinfo/python-list

Re: Self-defence

2013-11-17 Thread Tim Golden
On 17/11/2013 17:16, Chris “Kwpolska” Warrick wrote: We could report abuse to his server, eternal-september.org[0]. I tried to do this, but they wanted fancy usenetty headers, and I am not equipped to get them. I have reported to that address. It's up to them whether they consider it abuse. (

Re: Self-defence

2013-11-17 Thread Tim Golden
On 17/11/2013 17:09, Zero Piraeus wrote: Note: I drafted a version of this post earlier today. I had been waiting to see whether Nikos succeeded in baiting the list into yet another round of unpleasantness before sending it, because I didn't want to worsen the situation, but at this point things

Re: Obtaining "the" name of a function/method

2013-11-17 Thread Tim Chase
On 2013-11-17 11:34, Ned Batchelder wrote: > Functions have a __name__ attribute, which is the name they were > defined as: > > >>> def foo(): pass > ... > >>> foo.__name__ > 'foo' > >>> bar = foo > >>> bar.__name__ > 'foo' which they have even in less-than-usefu

Re: Data structure question

2013-11-17 Thread Tim Chase
On 2013-11-18 02:03, Joseph L. Casale wrote: > I have a need for a script to hold several tuples with three > values, two text strings and a lambda. I need to index the tuple > based on either of the two strings. Normally a database would be > ideal but for a self-contained script that's a bit much

Re: sendmail library ?!

2013-11-17 Thread Tim Roberts
r that import smtplib s = smtplib.SMTP("localhost") usually communicates directly with the local server, whether it be sendmail or postfix or whatever. -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc. -- https://mail.python.org/mailman/listinfo/python-list

Re: When to use assert

2013-11-18 Thread Tim Chase
On 2013-11-18 09:50, Oscar Benjamin wrote: > If the program is invoked from a terminal I would probably go with > 'import pdb; pdb.set_trace()' rather than 'assert 0'. Then you can > check much more than whether or not the code is being executed. > It's a bit more to type but I type it so often tha

Re: Oh look, another language (ceylon)

2013-11-18 Thread Tim Daneliuk
e language designers! Ahem, I already commented on this in some detail" https://mail.python.org/pipermail/python-list/2004-September/241055.html -- -------- Tim Daneliuk [email protected] PGP Key: http://www

Re: Oh look, another language (ceylon)

2013-11-18 Thread Tim Daneliuk
he GIL (Global Interpreter Lock) with the much simpler, DR (Dread Lock). -------- Tim Daneliuk [email protected] PGP Key: http://www.tundraware.com/PGP/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Automation

2013-11-19 Thread Tim Golden
On 19/11/2013 13:50, Mark Lawrence wrote: > On 19/11/2013 10:48, Chris Angelico wrote: >> >> Anyway, we Aussies know more about your geography than you know about >> ours, I reckon. Which of these is not a real place: Parramatta, >> Warrnambool, Cerinabbin, Mordialloc? No fair Googling them, see if

Re: My first real request for help

2013-11-19 Thread Tim Chase
On 2013-11-19 11:19, Gene Heskett wrote: >>> Traceback (most recent call last): >>> File "/usr/bin/axis", line 3326, in >>> >>> _dynamic_tabs(inifile) >>> >>> File "/usr/bin/axis", line 3182, in _dynamic_tabs >>> >>> child = Popen(cmd) > > You are suggesting I edit /usr/lib/py

Re: My first real request for help

2013-11-19 Thread Tim Chase
On 2013-11-19 12:19, Gene Heskett wrote: > > On 2013-11-19 11:19, Gene Heskett wrote: > > >>> Traceback (most recent call last): > > >>> File "/usr/bin/axis", line 3326, in > > >>> > > >>> _dynamic_tabs(inifile) > > >>> > > >>> File "/usr/bin/axis", line 3182, in _dynamic_tabs > >

Re: My first real request for help

2013-11-19 Thread Tim Chase
On 2013-11-19 13:43, Gene Heskett wrote: > Interesting, a print cmd immediately in front of that is quite > noisy: ['./camview-emc-f1oat.py', '-v', '1280x720', '-C', > 'camview.cfg', '-g', 'cam.ui', '-H', 'campins.hal', '-w', > '150995278'] This suggests that the value of "cmd" is indeed a list of

Re: pypix

2013-11-19 Thread Tim Roberts
on is a well-established and mature programming tool. -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc. -- https://mail.python.org/mailman/listinfo/python-list

Re: run command line on Windows without showing DOS console window

2013-11-20 Thread Tim Golden
On 20/11/2013 14:44, iMath wrote: > > > is there anyway to run command line on Windows without showing DOS console > window ? > > can you use the following command line to give a little example ? > > wget -r -np -nd http://example.com/packages/ > > the path to wget is C:\Program Files\GnuWin3

Re: Automation

2013-11-20 Thread Tim Golden
On 20/11/2013 16:19, Chris Angelico wrote: > On Thu, Nov 21, 2013 at 3:14 AM, Grant Edwards > wrote: >> On 2013-11-19, Chris Angelico wrote: >> >>> Anyway, we Aussies know more about your geography than you know about >>> ours, I reckon. Which of these is not a real place: Parramatta, >>> Warrna

Re: Setting longer default decimal precision

2013-11-20 Thread Tim Golden
On 20/11/2013 19:59, Mark Lawrence wrote: On 20/11/2013 19:34, Kay Y. Jheallee wrote: Ah, that looks like just the puppy I'm looking for. :) Okay then, I just installed the PortableApps version of Python, but when I downloaded "mpmath-0.17.win32" the installer aborted with "No Python installati

Re: Setting longer default decimal precision

2013-11-20 Thread Tim Golden
On 20/11/2013 19:34, Kay Y. Jheallee wrote: Ah, that looks like just the puppy I'm looking for. :) Okay then, I just installed the PortableApps version of Python, but when I downloaded "mpmath-0.17.win32" the installer aborted with "No Python installation found in the registry". So I'm trying to

Re: Off-topic: Aussie place names [was Re: Automation]

2013-11-20 Thread Tim Delaney
riginal_origin Just noticed that my town was missing - added it: https://en.wikipedia.org/wiki/Mittagong,_New_South_Wales Tim Delaney -- https://mail.python.org/mailman/listinfo/python-list

Re: Off-topic: Pop culture references [was Re: Newbie - Trying to Help a Friend]

2013-11-21 Thread Tim Golden
On 21/11/2013 00:27, Steven D'Aprano wrote: > I fully support the right of everyone to make cryptic references to > movies, television shows, science fiction and fantasy novels, internet > memes, and assorted pop culture references. One of the (occasionally humbling) effects of internet communi

Re: Got a Doubt ! Wanting for your Help ! Plz make it ASAP !

2013-11-23 Thread Tim Chase
On 2013-11-23 10:44, Dennis Lee Bieber wrote: > On Fri, 22 Nov 2013 23:42:44 -0700, Ian Kelly > declaimed the following: > > > >On Fri, Nov 22, 2013 at 8:47 PM, Dennis Lee Bieber > > wrote: > >> > >> Rice is the plural of rouse > > > >Not according to the dictionary. But it does seem

Re: Got a Doubt ! Wanting for your Help ! Plz make it ASAP !

2013-11-23 Thread Tim Chase
On 2013-11-23 15:06, Rick Johnson wrote: > I don't thank so. What purpose does that serve? > > If we allow people to speak INCORRECT English under the > guise of "political correctness" then no one will benefit. "I don't thank so"? talk about the plank in your own eye... -tkc -- https://mai

Re: general ConfigParser question

2013-11-25 Thread Tim Chase
On 2013-11-25 18:32, Rita wrote: > I was wondering if the default ConfigParser can handle multi line > strings (especially in the relate section) > > [Relate] > data="parent process A child process B > Parent process B child process C Yes, though I seem to recall that subsequent lines have to be

Re: general ConfigParser question [PS]

2013-11-25 Thread Tim Chase
On 2013-11-25 18:29, Tim Chase wrote: > On 2013-11-25 18:32, Rita wrote: > > I was wondering if the default ConfigParser can handle multi line > > strings (especially in the relate section) > > > > [Relate] > > data="parent process A child process B > &g

Re: Access and write .mp3 metadata/tags using Python 3

2013-11-26 Thread Tim Chase
On 2013-11-26 07:41, [email protected] wrote: > Hey everyone. > > I'm trying to figure out how to get python to access the properties > section of an mp3 file. When you right click an mp3 file and go to > properties you can edit the title, album, and things like that. I > also want to be able

Re: Got a Doubt ! Wanting for your Help ! Plz make it ASAP !

2013-11-26 Thread Tim Delaney
aying something like "I think I can help here, but I'm confused about - could you or someone else clarify please?" And if an unfamiliar dialect annoys you, killfile the person. No skin off my nose. Tim Delaney -- https://mail.python.org/mailman/listinfo/python-list

Re: Cracking hashes with Python

2013-11-26 Thread Tim Delaney
ot;stumped" is actually coming from the problem of a plough getting stuck on a stump (i.e. can't progress any further). Not much of an issue anymore since the invention of the stump-jump plough: https://en.wikipedia.org/wiki/Stump-jump_plough (Looked it up, my guess is considered the most likely origin of the term). Tim Delaney -- https://mail.python.org/mailman/listinfo/python-list

Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)

2013-11-27 Thread Tim Golden
On 27/11/2013 08:31, Hoàng Tuấn Việt wrote: > I cannot see your reply in python-list until I search this question > on Internet again. (cc-ing the OP because of the nature of the problem) Viet, That's because you're not subscribed to the list. The way it works is that you subscribe to the list a

Re: Got a Doubt ! Wanting for your Help ! Plz make it ASAP !

2013-11-27 Thread Tim Chase
On 2013-11-27 01:32, rusi wrote: > > And will you be here to explain to time-travelling Shakespeare > > why we are all of us speaking English completely wrong (to his > > ears)? > > And to my (Indian!!) ears when Tim says 'plank in the eye' where > King

Re: Got a Doubt ! Wanting for your Help ! Plz make it ASAP !

2013-11-27 Thread Tim Chase
On 2013-11-27 20:08, Roy Smith wrote: > > How do you expect people to know they're using a local idiom? > > Look it up in Urban Dictionary and Bob's your uncle. I thought that's how one could tell if it was an *inappropriate* idiom. As a matter of fact, I'm surprised that "Bob's your uncle" does

Re: Python and PEP8 - Recommendations on breaking up long lines?

2013-11-28 Thread Tim Chase
On 2013-11-28 03:58, Steven D'Aprano wrote: >> input = open(self.full_path) >> output = open(self.output_csv, 'ab') >> with input as input, output as output: >> ... > > That's really clever! Why didn't I think of that? Because if the 2nd output fails, the input doesn't get

Re: Jython - Can't access enumerations?

2013-11-28 Thread Tim Delaney
either with LibGDX or (more likely) way you are using it. Please post a minimal example that demonstrates the problem plus the exact error message you get (I don't know LibGLX at all, but someone else might, plus trimming it down to a minimal example may reveal the problem to you). Tim Delaney -- https://mail.python.org/mailman/listinfo/python-list

Re: Jython - Can't access enumerations?

2013-11-29 Thread Tim Delaney
On 30 November 2013 03:15, Eamonn Rea wrote: > Ok, here's the code: > [elided] > As I said, please also show the *exact* error - copy and paste the stack trace. Tim Delaney -- https://mail.python.org/mailman/listinfo/python-list

Re: Need help with programming in python for class (beginner level)

2013-11-29 Thread Tim Chase
On 2013-11-29 16:31, [email protected] wrote: > It's for a school assignment. Thanks for the honesty--you'll get far more helpful & useful replies because of that. :-) > put them into a variable I called "number" but it seems to glitch > out that variable is in any command other than "print num

Re: Need help with programming in python for class (beginner level)

2013-11-29 Thread Tim Chase
On 2013-11-30 00:59, Mark Lawrence wrote: > Wrong again, or at least overengineered. > > print "The total rolled was:", number, " ^ > > You don't even need the spaces as print kindly does it for you :) but you could at least include the missing quotati

Re: Python Unicode handling wins again -- mostly

2013-11-30 Thread Tim Chase
On 2013-12-01 00:22, Steven D'Aprano wrote: > * KELVIN SIGN versus LATIN CAPITAL LETTER A I should hope so ;-) -tkc -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Unicode handling wins again -- mostly

2013-11-30 Thread Tim Chase
On 2013-12-01 00:54, Steven D'Aprano wrote: > On Sat, 30 Nov 2013 18:52:48 -0600, Tim Chase wrote: > > > On 2013-12-01 00:22, Steven D'Aprano wrote: > >> * KELVIN SIGN versus LATIN CAPITAL LETTER A > > > > I should hope so ;-) > >

Re: Extending the 'function' built-in class

2013-12-01 Thread Tim Chase
On 2013-12-01 19:18, G. wrote: > Hi, I can't figure out how I can extend the 'function' built-in > class. I tried: class test(function): > def test(self): > print("test") > but I get an error. Is it possible ? While I don't have an answer, I did find this interesting. First, "function"

Re: Python Unicode handling wins again -- mostly

2013-12-01 Thread Tim Delaney
a troll? Probably because out of all his baseless complaints about the FSR, he *did* have one valid point about performance that has now been fixed. Tim Delaney -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Unicode handling wins again -- mostly

2013-12-01 Thread Tim Delaney
His initial postings did lead to a regression being found. Tim Delaney -- https://mail.python.org/mailman/listinfo/python-list

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-03 Thread Tim Chase
On 2013-12-03 15:47, Piotr Dobrogost wrote: > > The getattr function is meant for when your attribute name is in a > > variable. Being able to use strings that aren't valid identifiers > > is a side effect. > > Why do you say it's a side effect? I think random832 is saying that the designed pu

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-03 Thread Tim Roberts
gnificant enough savings to create new syntax. Remember the Python philosophy that there ought to be one way to do it. -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc. -- https://mail.python.org/mailman/listinfo/python-list

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-04 Thread Tim Chase
On 2013-12-04 21:33, Chris Angelico wrote: > I don't think so. What the OP asked for was: > > my_object.'valid-attribute-name-but-not-valid-identifier' > > Or describing it another way: A literal string instead of a token. > This is conceivable, at least, but I don't think it gives any > advantag

Re: Input without line break, is it possible?

2013-12-04 Thread Tim Chase
On 2013-12-04 07:38, [email protected] wrote: > for i in range(8): >n = input() > > When we run it, consider the numbers below is the user input, > > 1 > 2 > 3 > 4 > 5 > 6 > (and so forth) > > my question, can i make it in just a single line like, > > 1 2 3 4 5 6 (and so forth) Not easily

Re: Input without line break, is it possible? [correction]

2013-12-04 Thread Tim Chase
On 2013-12-04 09:55, Tim Chase wrote: > You could make it a bit more robust with something like: > > answers = [] > while len(answers) < 8: > s = input() > answers.append(s.split()) this should be answers.extend(s.split()) instead of .append() That's w

Re: Embedding multiple interpreters

2013-12-06 Thread Tim Golden
On 06/12/2013 09:27, Chris Angelico wrote: > On Fri, Dec 6, 2013 at 7:21 PM, Garthy > wrote: >> PS. Apologies if any of these messages come through more than once. Most >> lists that I've posted to set reply-to meaning a normal reply can be used, >> but python-list does not seem to. The replies I

Re: Eliminate "extra" variable

2013-12-06 Thread Tim Chase
On 2013-12-06 11:37, Igor Korot wrote: > def MyFunc(self, originalData): > data = {} > for i in xrange(0, len(originalData)): >dateStr, freq, source = originalData[i] >data[str(dateStr)] = {source: freq} this can be more cleanly/pythonically written as def my_

Re: Managing Google Groups headaches

2013-12-07 Thread Tim Chase
On 2013-12-07 11:08, Roy Smith wrote: > In article <[email protected]>, > [email protected] wrote: > > > It is on this level the FSR fails. > > What is "FSR"? I apologize if this was explained earlier in the > thread and I can't find the reference. Flexibl

Re: Is It Bug?

2013-12-07 Thread Tim Roberts
information. >>> s = 'Hello, \\\\World' >>> s 'Hello, World' >>> print s Hello, \\World >>> s = s.replace('','\\') >>> s 'Hello, \\World' >>> print s Hello, \World >>> -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc. -- https://mail.python.org/mailman/listinfo/python-list

Re: Centring text in a rect in PyGame?

2013-12-08 Thread Tim Golden
On 07/12/2013 12:41, Eamonn Rea wrote: First of all. I’d like to say I have no idea how these ‘mailing lists’ work, so I don’t know if this’ll come through right, but we’ll see I guess :-) I’m coming from the Google Group comp.lang.python, and was suggested to use this instead. Assuming attachmen

Re: Centring text in a rect in PyGame?

2013-12-08 Thread Tim Golden
On 07/12/2013 12:41, Eamonn Rea wrote: Anyway, I have a problem. In my game, I want to draw a button. I’ve gotten the button to draw fine, but I want some text on the button. I’ve gotten the text to draw, but I can’t get it to centre into the button. Here’s the code I’ve used: *self.surface.blit

Re: Eliminate "extra" variable

2013-12-08 Thread Tim Chase
On 2013-12-08 15:04, Peter Otten wrote: > > data = dict( > > (str(date), {source: freq}) > > for date, freq, source in original_data > > ) > > or even just > > data = {str(date): {source: freq} > for date, freq, source in original_data} I maintain enough pre-2.7 c

Re: Eliminate "extra" variable

2013-12-08 Thread Tim Chase
On 2013-12-07 23:14, Igor Korot wrote: > def MyFunc(self, originalData): > self.dates = [] > data = {} > dateStrs = [] > for i in xrange(0, len(originalData)): > dateStr, freq, source = originalData[i] > data[str(dateStr)] = {source: freq} >

Re: Eliminate "extra" variable

2013-12-08 Thread Tim Chase
On 2013-12-08 19:10, Mark Lawrence wrote: > On 08/12/2013 18:58, Tim Chase wrote: > > On 2013-12-07 23:14, Igor Korot wrote: > > [big snip] > > Whenever I need date manipulations I always reach out to this > http://labix.org/python-dateutil But based on the OP's

Re: Eliminate "extra" variable

2013-12-08 Thread Tim Chase
On 2013-12-08 12:58, Igor Korot wrote: > Also, the data comes from either SQLite or mySQL and so to eliminate > the difference between those engines dates are processed as strings > and converted to dates for the calculation purposes only. > Maybe I will need to refactor SQLite processing to get th

Re: Possible PEP Submission

2013-12-09 Thread Tim Chase
On 2013-12-09 14:36, Logan Collins wrote: > Just checking whether 1) a PEP is the proper place for this and 2) > what y'all think about it. > > I would like to propose a change to the the 're' standard library to > support iterables. > > So, something like the following would work: > > import re

Re: Permission for contribution: http://bugs.python.org/issue19940

2013-12-10 Thread Tim Golden
On 10/12/2013 11:35, shankha wrote: > I wish to make contribution to Python source code. I have studied the > developers guide and made myself familiar with mercurial. I wish to > start of with some doc bugs as this will give me insight into > how the whole process(review, tests, patches) works. Is

Re: Permission for contribution: http://bugs.python.org/issue19940

2013-12-10 Thread Tim Golden
On 10/12/2013 11:35, shankha wrote: > I wish to make contribution to Python source code. I have studied the > developers guide and made myself familiar with mercurial. I wish to > start of with some doc bugs as this will give me insight into > how the whole process(review, tests, patches) works. Is

Unit testing asynchronous processes

2013-12-10 Thread Tim Chase
I've got some code that kicks off a background request to a remote server over an SSL connection using client-side certificates. Since the request is made from a separate thread, I'm having trouble testing that everything is working without without spinning up an out-of-band mock server and actual

Re: grab dict keys/values without iterating ?!

2013-12-10 Thread Tim Chase
On 2013-12-11 02:02, Tamer Higazi wrote: > Is there a way to get dict by search terms without iterating the > entire dictionary ?! > > Let us assume I have: > > {'Amanda':'Power','Amaly':'Higgens','Joseph':'White','Arlington','Black','Arnold','Schwarzenegger'}

Re: grab dict keys/values without iterating ?!

2013-12-11 Thread Tim Chase
On 2013-12-11 13:44, Steven D'Aprano wrote: > If necessary, I would consider having 26 dicts, one for each > initial letter: > > data = {} > for c in "ABCDEFGHIJKLMNOPQRSTUVWXYZ": > data[c] = {} > > then store keys in the particular dict. That way, if I wanted keys > starting with Aa, I woul

Re: grab dict keys/values without iterating ?!

2013-12-11 Thread Tim Chase
On 2013-12-11 09:46, Roy Smith wrote: > The problem is, that doesn't make a whole lot of sense in Python. > The cited implementation uses dicts at each level. By the time > you've done that, you might as well just throw all the data into > one big dict and use the full search string as the key. I

Re: adding values from a csv column and getting the mean. beginner help

2013-12-11 Thread Tim Chase
On 2013-12-11 11:10, brian cleere wrote: > filename = sys.argv[1] > column = int(sys.argv[2]) > > for line in filename() , column (): > elements = line.strip().split(',') > values.append(int(elements[col])) 1) you need to open the file 2) you need to make use of the csv module on that fi

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

2013-12-11 Thread Tim Delaney
On 12 December 2013 03:25, Chris Angelico wrote: > On Thu, Dec 12, 2013 at 3:18 AM, Mark Lawrence > wrote: > > On 11/12/2013 16:04, Chris Angelico wrote: > >> > >> I strongly believe that a career > >> programmer should learn as many languages and styles as possible, but > >> most of them can wa

Re: adding values from a csv column and getting the mean. beginner help

2013-12-11 Thread Tim Chase
On 2013-12-12 07:03, Chris Angelico wrote: > Also common, but how do you specify a keyword, then? Say you have a > command with subcommands: > > $0 foo x y > Move the foo to (x,y) > $0 bar x y z > Go to bar X, order a Y, and Z it [eg 'compress', 'gzip', 'drink'] > > How do you show that x/y/z are

Re: min max from tuples in list

2013-12-12 Thread Tim Chase
On 2013-12-12 11:44, Steven D'Aprano wrote: > In any case, sorting in Python is amazingly fast. You may be > pleasantly surprised that a version that sorts your data, while > nominally O(N log N), may be much faster than an O(N) solution that > doesn't require sorted data. If I were a betting man,

Re: Islam is the fastest growing religion in the world especially since sept. 11.

2013-12-13 Thread Tim Golden
On 13/12/2013 16:32, Amirouche Boubekki wrote: > Why is [email protected] still not banned? [... snip long spiel from bv4 etc. ...] Before recently, the answer would have been: because they're coming in through the Usenet gateway so there's no mailing list subscript

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

2013-12-14 Thread Tim Chase
On 2013-12-14 07:29, JL wrote: > I have a number of python processes which communicate with each > other through writing/reading config text files. The python > ConfigParser is used. I am wondering if it is more CPU-efficient to > switch to using sqlite database instead of using configuration > fil

Re: min max from tuples in list

2013-12-14 Thread Tim Roberts
S used in English > >conformant => something that conforms >performant => something that performs Yes, I suspect it comes from people expecting too much consistency. If something that has "conformance" is "conformant", then something that has good "perfor

Re: Eliminate "extra" variable

2013-12-15 Thread Tim Chase
On 2013-12-14 23:49, Igor Korot wrote: > Tim, > > On Sun, Dec 8, 2013 at 2:18 PM, Tim Chase wrote: >>>>> conn = sqlite3.connect('x.sqlite', >>... detect_types=sqlite3.PARSE_DECLTYPES|sqlite3.PARSE_COLNAMES) Your example code omitted this one crucia

Re: Eliminate "extra" variable

2013-12-15 Thread Tim Chase
On 2013-12-15 06:17, Tim Chase wrote: >>>>>> conn = sqlite3.connect('x.sqlite', >>>... detect_types=sqlite3.PARSE_DECLTYPES|sqlite3.PARSE_COLNAMES) > > Your example code omitted this one crucial line. Do you specify the > detect_types parameter to co

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

2013-12-15 Thread Tim Chase
On 2013-12-16 10:12, Cameron Simpson wrote: > On 14Dec2013 10:15, Tim Chase wrote: > Annoyingly, sqlite: > > + only lets one process access the db at a time, taking you back > to a similar situation as with config files Is this a Python limitation? According to the docs[1], it

Re: Question RE urllib

2013-12-16 Thread Tim Chase
On 2013-12-16 04:40, Jeff James wrote: > These sites do not require a logon in order for the home > page to come up. Could this be due to some port being blocked > internally ? Only one of the sites reporting as down is "https" but > all are internal sites. Is there some other component I should

Re: [newbie] Saving binaries in a specific way

2013-12-16 Thread Tim Chase
On 2013-12-16 14:19, Djoser wrote: > I am new to this forum and also to Python, but I'm trying hard to > understand it better. Welcome aboard! > I need to create a binary file, but the first 4 lines must be in > signed-Integer16 and all the others in signed-Integer32. I have a > program that doe

Re: Struggling for inspiration with lists

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

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

2013-12-18 Thread Tim Golden
On 18/12/2013 06:35, asmwarrior wrote: > 1. start a Python command line prompt(this is usually to hit the Start > Menu->Python 2.7->Python(command line). > 2. > > type the following text, and hit Enter key. > > |import ctypes| > > 3. > > type the following text, and hit Enter

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

2013-12-18 Thread Tim Chase
On 2013-12-18 09:49, dick wrote: > Don't forget that most hard disks have an option to cache the write > data. This is a 'feature' that allows the manufacturers to claim > better write performance. You can't be sure when the data is written > to the disk if that option is in play. However, my unde

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

2013-12-18 Thread Tim Chase
On 2013-12-18 15:14, dick wrote: >>However, my understanding is that they have a small on-drive >>battery/capacitor that stores sufficient energy for the cached >>write(s) to complete in the event the system's power abruptly cuts >>off. >> >>Granted, this is purely hearsay, as it's been a long time

Re: Why Python is like C++

2013-12-21 Thread Tim Chase
On 2013-12-21 08:43, Tim Chase wrote: > Then there's the 6502 assembly on that Apple with its 2 user-facing > registers (plus the Instruction Pointer and Stack Pointer), so I > guess you could say that it has 1-bit variable names ;-) Doh, forgot momentarily that the 6502 had X, Y,

Re: Why Python is like C++

2013-12-21 Thread Tim Chase
On 2013-12-21 11:19, Christian Gollwitzer wrote: > GW-BASIC was a weak language, but two significant characters is > definitely too few. I think it was eight. Never used QuickBasic, I > went Turbo Pascal instead, which had 32 significant characters. In know that my first BASIC, Applesoft BASIC ha

Re: Why Python is like C++

2013-12-21 Thread Tim Chase
On 2013-12-21 10:59, Roy Smith wrote: > > In know that my first BASIC, Applesoft BASIC had the 2-character > > names, and you had to load Integer Basic (with Ints in addition > > to the standard Floats used in the BASIC provided by the ROM, a > > strange choice). > > Why is it a strange choice?

Re: [OT]Royal pardon for codebreaker Turing

2013-12-23 Thread Tim Johnson
g carried out during the war at Bletchley Park undoubtedly shortened the conflict and saved thousands of lives. """ From my research - general (and later president) Eisenhower seemed to think that Project Ultra save millions (not thousands) of lives, shortened and maybe won th

Re: [OT]Royal pardon for codebreaker Turing

2013-12-24 Thread Tim Johnson
a party celebrating > Turing's rehabilitation, and do it right outside the Russian Embassy. :) Yeah! -- Tim tim at tee jay forty nine dot com or akwebsoft dot com http://www.akwebsoft.com, http://www.tj49.com -- https://mail.python.org/mailman/listinfo/python-list

Re: [OT]Royal pardon for codebreaker Turing

2013-12-25 Thread Tim Johnson
* Steven D'Aprano [131224 16:19]: > Tim Johnson wrote: > > > * Steven D'Aprano [131224 07:05]: > >> On Tue, 24 Dec 2013 00:32:31 +, Mark Lawrence wrote: > >> > >> > Maybe of interest to some of you > >> > http://www.bbc.co

Re: cascading python executions only if return code is 0

2013-12-26 Thread Tim Chase
On 2013-12-27 12:44, Chris Angelico wrote: > On Fri, Dec 27, 2013 at 12:37 PM, Roy Smith wrote: > > In article , > > Ethan Furman wrote: > > > >> Mostly I don't want newbies thinking "Hey! I can use assertions > >> for all my confidence testing!" > > > > How about this one, that I wrote yes

Re: [OT]Royal pardon for codebreaker Turing

2013-12-27 Thread Tim Delaney
mir Putin into a homosexual icon (search "last leg sochi" without the quotes). Tim Delaney -- https://mail.python.org/mailman/listinfo/python-list

Re: [OT]Royal pardon for codebreaker Turing

2013-12-27 Thread Tim Delaney
t the rhetoric and > laws coming out of the Kremlin are just like that coming out of the > Reichstag in the thirties. You are of course correct - I was still groggy from waking up when I replied, and focused on the element that I had been most exposed to. Tim Delaney -- https://mail.python.org/mailman/listinfo/python-list

Re: Idle Problems

2013-12-30 Thread Tim Golden
On 30/12/2013 18:43, [email protected] wrote: Hi I just joined this list and have a question.I have python 3.3.3 and running it on a windows 7 computer.Python has been running good until recently.I can bring up python shell,but when I go to run a recently loaded program,the code comes up briefly on

Re: Ifs and assignments

2014-01-02 Thread Tim Chase
On 2014-01-02 17:20, John Allsup wrote: > m = r1.search(w) > if m: > handleMatch1(m) > else: > m = r2.search(w) > if m: > handleMatch2(m) > else: > print("No match") > > if not running unnecessary matches, yet capturing groups in the > event of a

Setuptools - cannot install

2014-01-02 Thread tim . hamza
setuptools 2.0.2, win7 x64, python 3.3.3 (64bit), tried as user (who is admin, and as admin) This started happening several versions ago. Could not track down a setuptools support list. Any ideas? C:\Users\tim\Desktop\setuptools-2.0.2>python setup.py install Traceback (most recent call l

Re: django question

2014-01-04 Thread Tim Chase
On 2014-01-04 15:30, Igor Korot wrote: > Does anybody here use django? Yes. However there's also a Django-users mailing list[1] for Django-specific questions. Folks there are friendly & helpful. > Is it possible to display a data grid table with django? The short answer is yes. > Basically I

Re: django question

2014-01-05 Thread Tim Chase
On 2014-01-05 00:24, Igor Korot wrote: > > While I prefer Django for larger projects, for a lighter-weight > > project such as what you describe, I'd be tempted to go with > > something a little more light-weight unless you need additional > > interactivity. I've recently been impressed with Bottl

Re: "More About Unicode in Python 2 and 3"

2014-01-05 Thread Tim Chase
le: > > $ hexdump data > 000 43 6c 67 75 62 61 > > That's "Python" in rot-13 encoded ascii. How would I turn that > into cleartext Unicode in Python 3? tim@laptop$ python3 Python 3.2.3 (default, Feb 20 2013, 14:44:27) [GCC 4.7.2] on linux2 Type "help&q

Re: "More About Unicode in Python 2 and 3"

2014-01-06 Thread Tim Chase
On 2014-01-06 15:51, Chris Angelico wrote: > >>> data = b"\x43\x6c\x67\x75\x62\x61" # is there an easier way to > >>> turn a hex dump into a bytes literal? Depends on how you source them: # space separated: >>> s1 = "43 6c 67 75 62 61" >>> ''.join(chr(int(pair, 16)) for pair in s1.split()) 'Clgu

Re: "More About Unicode in Python 2 and 3"

2014-01-06 Thread Tim Chase
On 2014-01-06 22:20, Serhiy Storchaka wrote: > data = b"\x43\x6c\x67\x75\x62\x61" # is there an easier way to > turn a hex dump into a bytes literal? > > >>> bytes.fromhex('43 6c 67 75 62 61') > b'Clguba' Very nice new functionality in Py3k, but 2.x doesn't seem to have such a meth

Re: Blog "about python 3"

2014-01-07 Thread Tim Delaney
orities for Unicode handling in Python were: 1. Correctness a. all code points must be handled correctly; b. it must not be possible to obtain part of a code point (e.g. the first byte only of a multi-byte code point); 2. No change in the Big O characteristics of string operations e.g. indexing must remain O(1); 3. Reduced memory use in most cases. It is impossible for UTF-8 to meet both criteria 1b and 2 without additional auxiliary data (which uses more memory and increases complexity of the implementation). The FSR meets all 3 criteria. Tim Delaney -- https://mail.python.org/mailman/listinfo/python-list

<    14   15   16   17   18   19   20   21   22   23   >