Re: value of pi and 22/7

2011-03-18 Thread Kee Nethery
ne of thirty >> cubits did compass it round about. ". So pi=3. End Of. > > RIIght. What's a cubit? I use cubits all the time. The distance from my elbow to my finger tips equals one cubit. When you don't have a proper measuring tape, it can be pretty accurate fo

Re: value of pi and 22/7

2011-03-17 Thread Kee Nethery
My favorite approximation is: 355/113 (visualize 113355 split into two 113 355 and then do the division). The first 6 decimal places are the same. 3.141592920353982 = 355/113 vs 3.1415926535897931 Kee Nethery -- http://mail.python.org/mailman/listinfo/python-list

Re: Books recommendation

2010-12-07 Thread Kee Nethery
d upon. The O'Reilly books talk about the language but are scarce on actual code. Kee Nethery -- http://mail.python.org/mailman/listinfo/python-list

Re: Python documentation too difficult for beginners

2010-11-02 Thread Kee Nethery
n non-official sites with the exact same confusion I have, and what they have tried and what ultimately worked. The suggestion was made that people create their own documentation if they don't like the official documentation, and that does seem to be a good source for python documentation. Kee Nethery -- http://mail.python.org/mailman/listinfo/python-list

Re: Python documentation too difficult for beginners

2010-11-02 Thread Kee Nethery
On Nov 2, 2010, at 11:07 AM, Ian wrote: > On 02/11/2010 14:47, jk wrote: >> I think the key difference is that I don't want to have to *read* >> the >> python docs - I want to be able to scan for what I'm looking for and >> find it easily. That makes me productive. >> > Hi jk, > > I totally a

Re: Introducing Kids to Programming: Scratch

2010-09-27 Thread Kee Nethery
is getting results. He's 8 years old. http://scratch.mit.edu For introducing kids to programming, I recommend Scratch. Kee Nethery -- http://mail.python.org/mailman/listinfo/python-list

Re: Is This Open To SQL Injection?

2010-07-07 Thread Kee Nethery
text could be interpreted as SQL and that is what you must avoid. Kee Nethery -- http://mail.python.org/mailman/listinfo/python-list

Re: switch

2009-12-08 Thread Kee Nethery
I string together a bunch of elif statements to simulate a switch if foo == True: blah elif bar == True: blah blah elif bar == False: blarg elif -- http://mail.python.org/mailman/listinfo/python-list

Sample CGI for use with Unit Tests

2009-11-17 Thread Kee Nethery
no unit tests and it really needed them. In this example, the CGI itself is a handful of lines that should never change and the bulk of the processing is in a function. This allows me to create unit tests on everything except the few unchanging lines that are the generic CGI in the cgiR

Re: elementtree XML() unicode

2009-11-03 Thread Kee Nethery
On Nov 3, 2009, at 7:06 PM, Gabriel Genellina wrote: En Tue, 03 Nov 2009 23:06:58 -0300, Kee Nethery escribió: If there was a place in the official docs for me to append these nuggets of information to the sections for "xml.etree.ElementTree.XML(text)" and "xml.etree.E

elementtree XML() unicode

2009-11-03 Thread Kee Nethery
web page that returns as XML and when I display it in the browser you can see the Japanese characters in the data. I've removed all the stuff in my code and tried to distill it down to just what is failing. Hopefully I have not removed something essential. Why is this not working and w

Re: elementtree XML() unicode

2009-11-03 Thread Kee Nethery
On Nov 3, 2009, at 4:44 PM, Gabriel Genellina wrote: En Tue, 03 Nov 2009 21:01:46 -0300, Kee Nethery escribió: I've removed all the stuff in my code and tried to distill it down to just what is failing. Hopefully I have not removed something essential. Sounds like I did r

Re: elementtree XML() unicode

2009-11-03 Thread Kee Nethery
On Nov 3, 2009, at 5:27 PM, John Machin wrote: On Nov 4, 11:01 am, Kee Nethery wrote: Having an issue with elementtree XML() in python 2.6.4. This code works fine: from xml.etree import ElementTree as et getResponse = u''' bobbleheadcity'''

Re: Pyfora, a place for python

2009-11-02 Thread Kee Nethery
I just noticed the tag line "a place for Python". Looked it up online (http://pyfora.org/ ) and it will be interesting to see if it can fill the void that I experience (no centralized place to post and view user submitted sample code) in the existing Python community. As for user community f

Re: elementtree examples

2009-10-19 Thread Kee Nethery
On Oct 19, 2009, at 1:02 PM, Robert Kern wrote: On 2009-10-19 14:50 PM, Kee Nethery wrote: Am looking for that level of documentation for each function, interface and object listed in the official docs for elementtree. Does it exist? No. Thank you. Kee -- http://mail.python.org

Re: elementtree examples

2009-10-19 Thread Kee Nethery
On Oct 19, 2009, at 12:06 PM, Paul Rubin wrote: Kee Nethery writes: do not appear to contain examples for each object, interface or function. Where would I find examples that use each elementtree function, interface and object? effbot.org has a few. yes I agree it has a few. It'

elementtree examples

2009-10-19 Thread Kee Nethery
used to test code changes to the various modules? Kee Nethery -- http://mail.python.org/mailman/listinfo/python-list

Re: how to write a unicode string to a file ?

2009-10-16 Thread Kee Nethery
e file, as UTF8 looks just like ASCII -- until it contains characters that can't be expressed in ASCII. But I don't know what type of file it is you're saving. We found that UTF-16 was required for Excel. It would not "do the right thing" when presented

Re: Which version of python I should use if I just start programming in python?

2009-09-12 Thread Kee Nethery
I am in 2.x because the IDE I am using does not support stepping through my code when in 3.x. As soon as the IDE I use supports debugging in 3.x, I'm moving up to 3.x. I would prefer to be in 3.x because all the inconsistencies of how you do things in 2.x make it harder than it needs to be

Re: Project euler no. 3

2009-09-12 Thread Kee Nethery
in checkPrime what do you return when "x" is less than 2? On Sep 12, 2009, at 8:46 AM, Someone Something wrote: But, I'm returning true or false right? On Sat, Sep 12, 2009 at 11:32 AM, MRAB wrote: Someone Something wrote: Project euler (in case you don't know: projecteuler.net

string literal vs string variable

2009-08-22 Thread Kee Nethery
On Aug 22, 2009, at 3:32 AM, Stefan Behnel wrote: You can use both, but I suspect parsing from StringIO to be slower than parsing from the string directly. That's the case for lxml, at least. Note that fromstring() behaves the same as XML(), but it reads better when parsing from a strin

Re: Questions on XML

2009-08-21 Thread Kee Nethery
On Aug 21, 2009, at 7:15 PM, joy99 wrote: Dear Group, I like to convert some simple strings of natural language to XML. May I use Python to do this? If any one can help me, on this. I am using primarily UTF-8 based strings, like Hindi or Bengali. Can I use Python to help me in this regard?

Re: Komodo(!)

2009-08-15 Thread Kee Nethery
On Aug 14, 2009, at 1:55 PM, William wrote: Personally, I rather like Wing I tried Wing and basically as a newbie, there were too many setup parameters that I did not know how to set correctly and I could never get it to work for me. It runs under X11 and I guess that was just a bit too

Re: Komodo(!)

2009-08-14 Thread Kee Nethery
From the web site it looks like the free version does not include the debugging stuff. I've been using the paid version with the debugger functionality and I find it easy to use and incredibly nice for trying to understand what the code is doing. The built-in debugger has saved me tons of t

Re: Python docs disappointing - group effort to hire writers?

2009-08-08 Thread Kee Nethery
user contributions resource tied to the main official docs to allow newbies to teach each other what they have learned. The desire is for python.org to have the same kind of support resource so that us newbies can self support each other. Kee Nethery -- http://mail.python.org/mailman

Re: Python docs disappointing - group effort to hire writers?

2009-08-07 Thread Kee Nethery
On Aug 7, 2009, at 10:48 AM, alex23 wrote: Kee Nethery wrote: I'm looking forward to the acceleration of improvements to the official docs based upon easy to provide user feedback. Glad to see that the bug tracking system is going to not be the primary means for documentation changes.

Re: Python docs disappointing - group effort to hire writers?

2009-08-07 Thread Kee Nethery
During all this conversation there was a ticket posted in the bug tracking system with the suggestion of each section in the official docs linking to a fixed wiki page that can contain user contributions. The ticket has been closed because this addition to the official docs is already in th

Re: Python docs disappointing - group effort to hire writers?

2009-08-06 Thread Kee Nethery
e point me to the docs that tell me how to "do it" so that we people with newbie questions and a need for examples can get out of your way and "do it" ourselves. Thanks, Kee Nethery -- http://mail.python.org/mailman/listinfo/python-list

Re: Python docs disappointing - group effort to hire writers?

2009-07-31 Thread Kee Nethery
e really detailed docs with lots of examples be written against the latest python version. Just a thought. Kee Nethery -- http://mail.python.org/mailman/listinfo/python-list

Re: Python debugger

2009-07-03 Thread Kee Nethery
o the parts of arrays and dictionaries to see what the (for example) 5th item of the 4th item named "blah" is set to and what type of data element it is (int, unicode, etc). I find it tremendously useful as a newbie to Python. Kee Nethery -- http://mail.python.org/mailman/listinfo/python-list

Re: question of style

2009-07-02 Thread Kee Nethery
the fact that you felt compelled to explain the "one minor point" in the first snippet tells me that the second snippet does not need that explanation and will be easier for someone (like you for example) to maintain in the future. Second snippet would be my choice. Kee Nethery

Re: Python simple web development

2009-06-27 Thread Kee Nethery
Until I'm an experience Python coder, I'm sticking with built-in packages only. My simple CGI is: #!/usr/bin/env python # this simple CGI responds to a GET or a POST # send anything you want to this and it will parrot it back. # a line that starts with #2 is the old-style code you should use

Re: looking for a book on python

2009-06-27 Thread Kee Nethery
I'm a newbie and I need examples and I find that Python for Dummies is my best paper source for examples. Kee Nethery -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginning with Python; the right choice?

2009-06-27 Thread Kee Nethery
do with RunRev being a variation of Hypercard (both use a HyperTalk style language) and I'm way past the 10,000 hour usage level on the HyperTalk language. I'm barely at 100 hours with Python so right now everything is a struggle. But I like Python and plan to stick with it. Kee Nethery -- http://mail.python.org/mailman/listinfo/python-list

Re: ElementTree.XML(string XML) and ElementTree.fromstring(string XML) not working

2009-06-26 Thread Kee Nethery
First, thanks to everyone who responded. Figured I'd test all the suggestions and provide a response to the list. Here goes ... On Jun 25, 2009, at 7:38 PM, Nobody wrote: Why do you need an ElementTree rather than an Element? XML(string) returns the root element, as if you had used et.parse(

Re: ElementTree.XML(string XML) and ElementTree.fromstring(string XML) not working

2009-06-25 Thread Kee Nethery
ontortions will seem normal. Results tomorrow, thanks everyone for the assistance. Kee Nethery -- http://mail.python.org/mailman/listinfo/python-list

ElementTree.XML(string XML) and ElementTree.fromstring(string XML) not working

2009-06-25 Thread Kee Nethery
ta['theXml'].value theXmlDataTree = et .parse (makeThisUnicodeStringLookLikeAFileSoParseWillDealWithIt(theXmlData)) Thanks in advance, Kee Nethery -- http://mail.python.org/mailman/listinfo/python-list