Re: [Tutor] REPL format

2015-04-25 Thread Steven D'Aprano
On Sat, Apr 25, 2015 at 04:38:33PM -0700, Jim Mooney wrote: > I'm curious why, when I read and decode a binary file from the net in one > fell swoop, the REPL prints it between parentheses, line by line but with > no commas, like a defective tuple. What REPL are you using? I can't reproduce what y

Re: [Tutor] Questions (and initial responses) on using version control [Was: Introductory questions on test-driven development and implementing Git version control.]

2015-04-25 Thread boB Stepp
On Sat, Apr 25, 2015 at 10:30 AM, boB Stepp wrote: > On Fri, Apr 24, 2015 at 7:36 PM, Steven D'Aprano wrote: >>On Fri, Apr 24, 2015 at 02:09:45PM -0500, boB Stepp wrote: > > [...] > >>> And what would be the best approach to integrating Git with these >>> efforts? Just how often does one commit on

Re: [Tutor] Introductory questions on test-driven development and implementing Git version control.

2015-04-25 Thread boB Stepp
On Fri, Apr 24, 2015 at 7:36 PM, Steven D'Aprano wrote: > So many questions... let's hope I don't miss any... :-) > > On Fri, Apr 24, 2015 at 02:09:45PM -0500, boB Stepp wrote: > >> First question: What testing modules/frameworks should I start out >> with? Doing a quick scan of the books I have,

Re: [Tutor] Introductory questions on test-driven development and implementing Git version control.

2015-04-25 Thread boB Stepp
On Sat, Apr 25, 2015 at 10:58 AM, boB Stepp wrote: > On Sat, Apr 25, 2015 at 3:20 AM, Laura Creighton wrote: >> In a message of Fri, 24 Apr 2015 20:24:38 -0500, boB Stepp writes: >>>I think that I can get an exception here (See a post in response that >>>I made earlier today.). What I am *certa

[Tutor] Please disable “digest mode” before participating (was: Tutor Digest, Vol 134, Issue 86)

2015-04-25 Thread Ben Finney
Juanald Reagan writes: > Okay, so it doesn't look like that worked...here is the traceback. I don't > understand the second part of your request. Juanold, to keep the context and thread of the discussion, please respond to individual messages, not digests. To do that, you first need to disable

Re: [Tutor] REPL format

2015-04-25 Thread Alan Gauld
On 26/04/15 00:38, Jim Mooney wrote: ...it's interesting that although HTML is case-free, you have to get the case right for the java server page. getbusesforroute.jsp doesn't work. That's because its a file name and has nothing to do with HTML. The HTML is what's inside the file. ?import ur

Re: [Tutor] REPL format

2015-04-25 Thread Danny Yoo
> I would strongly discourage not using it yourself in your own > programs. Ugh. There was one too many negations there. I deserved to make that mistake, since my sentence structure was unnecessarily nested. :P I meant to say: "I would strongly discourage using literal string concatenation in

Re: [Tutor] REPL format

2015-04-25 Thread Danny Yoo
On Sat, Apr 25, 2015 at 4:38 PM, Jim Mooney wrote: > I'm curious why, when I read and decode a binary file from the net in one > fell swoop, the REPL prints it between parentheses, line by line but with > no commas, like a defective tuple. The REPL is trying to be nice here. What you're seeing

[Tutor] REPL format

2015-04-25 Thread Jim Mooney
I'm curious why, when I read and decode a binary file from the net in one fell swoop, the REPL prints it between parentheses, line by line but with no commas, like a defective tuple. I can see breaking lines visually, at \n, but if the parentheses don't mean anything I can't see including them. Or

[Tutor] Looking up a value in a dictionary

2015-04-25 Thread Danny Yoo
On Sat, Apr 25, 2015 at 11:13 AM, Juanald Reagan wrote: > Okay, so it doesn't look like that worked...here is the traceback. I don't > understand the second part of your request. > > Jons-desktop:whois-0.7 2 jon$ python pythonwhois.py > > 8.8.8.8 > > Traceback (most recent call last): > > File "

Re: [Tutor] whois github package

2015-04-25 Thread Alan Gauld
On 25/04/15 14:46, Juanald Reagan wrote: Hello! I have a question regarding how to use/implement a package found at github. https://github.com/secynic/ipwhois We are not experts on this here since this list s for people learning the core Python lamguage and its standard library. Howe er I se

[Tutor] Python Whois [was Re: Tutor Digest, Vol 134, Issue 86]

2015-04-25 Thread Steven D'Aprano
Hi Jon, Before I answer your question, first some mailing list housekeeping. If you are going to read and respond to messages here, please change from "Daily Digest" to individual messages. Your reply includes 500 lines (about 10 or 12 pages!) of old messages. We've already seen those messages

Re: [Tutor] Tutor Digest, Vol 134, Issue 86

2015-04-25 Thread Juanald Reagan
Okay, so it doesn't look like that worked...here is the traceback. I don't understand the second part of your request. Jons-desktop:whois-0.7 2 jon$ python pythonwhois.py 8.8.8.8 Traceback (most recent call last): File "pythonwhois.py", line 14, in print results.asn_registry AttributeE

Re: [Tutor] Codec lookup, was Re: name shortening in a csv module output

2015-04-25 Thread Jim Mooney
> > Hm, who the heck uses "u8"? I'd rather go with > > >>> encodings.aliases.aliases["steven_s_preferred_encoding"] = "utf_8" > >>> "Hello".encode("--- Steven's preferred encoding ---") > b'Hello' > > ;) > Peter Otten > __ > Or normalize almost any mistyping ;'): >>> encodings.normalize_encodin

Re: [Tutor] Questions (and initial responses) on using version control [Was: Introductory questions on test-driven development and implementing Git version control.]

2015-04-25 Thread Alan Gauld
On 25/04/15 16:30, boB Stepp wrote: And what would be the best approach to integrating Git with these efforts? Just how often does one commit one's code to the version control system? Or do I have some GCEs (Gross Conceptual Errors) here? Going back to first principles. What is often called Ve

Re: [Tutor] Introductory questions on test-driven development and implementing Git version control.

2015-04-25 Thread Alan Gauld
On 25/04/15 16:34, boB Stepp wrote: Done! I do not know if what I did matches your intent, but I hope so! You've done much more than I intended. I only wanted you to consider what has already been said then re-frame any remaining VC questions in a new mail. But no harm done except for your t

Re: [Tutor] Introductory questions on test-driven development and implementing Git version control.

2015-04-25 Thread boB Stepp
On Sat, Apr 25, 2015 at 3:20 AM, Laura Creighton wrote: > In a message of Fri, 24 Apr 2015 20:24:38 -0500, boB Stepp writes: >>The Python versions at work are 2.4.4 and 2.6.4(?)(Not certain about >>the last digit there.) Based on responses to date, the fact that >>unittest is in the standard libr

Re: [Tutor] Introductory questions on test-driven development and implementing Git version control.

2015-04-25 Thread Alex Kleider
On 2015-04-25 08:34, boB Stepp wrote: On Sat, Apr 25, 2015 at 3:21 AM, Alan Gauld wrote: Having looked at this thread and its early responses I think it would be good to break it up into its two natural parts. TDD and version control are pretty much separate concepts and should be on separate t

Re: [Tutor] Introductory questions on test-driven development and implementing Git version control.

2015-04-25 Thread boB Stepp
On Sat, Apr 25, 2015 at 3:21 AM, Alan Gauld wrote: > Having looked at this thread and its early responses I think it > would be good to break it up into its two natural parts. TDD > and version control are pretty much separate concepts and > should be on separate threads. > > Bob, could you please

[Tutor] Questions (and initial responses) on using version control [Was: Introductory questions on test-driven development and implementing Git version control.]

2015-04-25 Thread boB Stepp
N.B.: This is a manual recreation of portions of the original thread, "Introductory questions on test-driven development and implementing Git version control". The portions included here are those relevant to the version control. Where "[...]" appears, this indicates I did not include those portion

Re: [Tutor] whois github package

2015-04-25 Thread Steven D'Aprano
On Sat, Apr 25, 2015 at 09:46:26AM -0400, Juanald Reagan wrote: > from ipwhois import IPWhois > > obj = IPWhois(ipaddy) > results = [obj.lookup()] > print results [0] > > This returns ALL the fields not just the "asn_registry" field. I looked for > documentation on github but did

[Tutor] whois github package

2015-04-25 Thread Juanald Reagan
Hello! I have a question regarding how to use/implement a package found at github. https://github.com/secynic/ipwhois I am able to run the sample code without any issues but what I don't understand is how to put all the data that is returned into an indexed list. I want to be able to pick out som

Re: [Tutor] sig no matter what

2015-04-25 Thread eryksun
On Fri, Apr 24, 2015 at 10:46 PM, Jim Mooney wrote: > The docs don't mention that case is immaterial for aliases, when it usually > matters in Python. Section 7.2.3: Notice that spelling alternatives that only differ in case or use a hyphen instead of an underscore are also valid aliases

Re: [Tutor] name shortening in a csv module output

2015-04-25 Thread Steven D'Aprano
On Fri, Apr 24, 2015 at 01:04:57PM +0200, Laura Creighton wrote: > In a message of Fri, 24 Apr 2015 12:46:20 +1000, "Steven D'Aprano" writes: > >The Japanese, Chinese and Korean > >governments, as well as linguists, are all in agreement that despite a > >few minor differences, the three languages

Re: [Tutor] sig no matter what

2015-04-25 Thread Jim Mooney
> See 7.2.3 (aliases) and 7.2.7 (utf_8_sig) in the codecs documentation. > > https://docs.python.org/3/library/codecs.html > The docs don't mention that case is immaterial for aliases, when it usually matters in Python. The actual dictionary entries in aliases.py often differ in case from the docs

Re: [Tutor] Introductory questions on test-driven development and implementing Git version control.

2015-04-25 Thread Laura Creighton
In a message of Fri, 24 Apr 2015 20:24:38 -0500, boB Stepp writes: >I have joined! Great! Great! >The Python versions at work are 2.4.4 and 2.6.4(?)(Not certain about >the last digit there.) Based on responses to date, the fact that >unittest is in the standard library and that because of this mo

Re: [Tutor] name shortening in a csv module output

2015-04-25 Thread Jim Mooney
> > > I wouldn't use utf-8-sig for output, however, as it puts the BOM in the > file for others to trip over. > > -- > DaveA Yeah, I found that out when I altered the aliases.py dictionary and added 'ubom' : 'utf_8_sig' as an item. Encoding didn't work out so good, but decoding was fine ;') _

Re: [Tutor] Spongebob Pythonpants

2015-04-25 Thread Jim Mooney
Unicode for Idiots indeed, a Python list can always find something better than that :) > > http://www.joelonsoftware.com/articles/Unicode.html > http://nedbatchelder.com/text/unipain.html > > > Mark Lawrence > > Batcheder's looks good. I'm going through it. I tried the Unicode Consortium website a

[Tutor] Codec lookup, was Re: name shortening in a csv module output

2015-04-25 Thread Peter Otten
Steven D'Aprano wrote: > On Fri, Apr 24, 2015 at 04:34:19PM -0700, Jim Mooney wrote: > >> I was looking things up and although there are aliases for utf_8 (utf8 >> and utf-8) I see no aliases for utf_8_sig, so I'm surprised the utf-8-sig >> I tried using, worked at all. Actually, I was trying to

Re: [Tutor] Introductory questions on test-driven development and implementing Git version control.

2015-04-25 Thread Alan Gauld
Having looked at this thread and its early responses I think it would be good to break it up into its two natural parts. TDD and version control are pretty much separate concepts and should be on separate threads. Bob, could you please ask your version control questions again, taking account of e