Re: Help with some python homework...

2014-02-02 Thread Larry Hudson
On 02/02/2014 05:12 PM, David Hutto wrote: A little OT, but these might peak your interest for this: Also a little OT, but the word you're looking for is spelled pique. ;-) (Although, it IS pronounced 'peak'.) -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: Python prime numbers

2014-02-01 Thread Larry Martell
On Saturday, February 1, 2014, Panagiotis Anastasiou wrote: > Hi i'm new in programming and in python and i have an assignment that i > cant complete. I have to Write a Python program to compute and print the > first 200 prime numbers. The output must be formatted with a title and the > prime num

Re: pytz question: GMT vs. UTC

2014-01-30 Thread Larry Martell
On Thu, Jan 30, 2014 at 10:23 AM, Grant Edwards wrote: > On 2014-01-30, Christian Heimes wrote: >> On 30.01.2014 04:27, Chris Angelico wrote: >>> On Thu, Jan 30, 2014 at 1:40 PM, MRAB wrote: > How cruel... I suspect the smack at 0degC is much more painful > than one > at room

[RELEASED] Python 3.4.0b3

2014-01-26 Thread Larry Hastings
he final release is projected for mid-March 2014. To download Python 3.4.0b3 visit: http://www.python.org/download/releases/3.4.0/ Please consider trying Python 3.4.0b3 with your code and reporting any new issues you notice to: http://bugs.python.org/ Enjoy! -- Larry Hastings, Rel

Re: re Questions

2014-01-26 Thread Larry Martell
On Sun, Jan 26, 2014 at 9:59 AM, Blake Adams wrote: > Im pretty new to Python and understand most of the basics of Python re but am > stumped by a unexpected matching dynamics. > > If I want to set up a match replicating the '\w' pattern I would assume that > would be done with '[A-z0-9_]'. How

Re: Case insensitive exists()?

2014-01-23 Thread Larry Martell
On Wed, Jan 22, 2014 at 9:29 PM, Chris Angelico wrote: > On Thu, Jan 23, 2014 at 3:24 PM, Larry Martell > wrote: >> I am writing something that is part of a django app, that based on >> some web entry from the user, I run a query, get back a list of files >> and hav

Re: Case insensitive exists()?

2014-01-22 Thread Larry Martell
On Wed, Jan 22, 2014 at 6:27 PM, MRAB wrote: > On 2014-01-23 00:58, Larry Martell wrote: >> >> I have the need to check for a files existence against a string, but I >> need to do case-insensitively. I cannot efficiently get the name of >> every file in the dir and

Re: Case insensitive exists()?

2014-01-22 Thread Larry Martell
On Wed, Jan 22, 2014 at 6:27 PM, Roy Smith wrote: > In article , > Larry Martell wrote: > >> The issue is that I run a database query and get back rows, each with >> a file path (each in a different dir). And I have to check to see if >> that file exists. Each i

Re: Case insensitive exists()?

2014-01-22 Thread Larry Martell
On Wed, Jan 22, 2014 at 6:08 PM, Roy Smith wrote: > In article , > Larry Martell wrote: > >> I have the need to check for a files existence against a string, but I >> need to do case-insensitively. I cannot efficiently get the name of >> every file in the dir and

Case insensitive exists()?

2014-01-22 Thread Larry Martell
I have the need to check for a files existence against a string, but I need to do case-insensitively. I cannot efficiently get the name of every file in the dir and compare each with my string using lower(), as I have 100's of strings to check for, each in a different dir, and each dir can have 100

Re: No overflow in variables?

2014-01-22 Thread Larry Martell
On Wed, Jan 22, 2014 at 11:09 AM, Philip Red wrote: > Hi everyone. First of all sorry if my english is not good. > I have a question about something in Python I can not explain: > in every programming language I know (e.g. C#) if you exceed the max-value of > a certain type (e.g. a long-integer)

Re: Early retirement project?

2014-01-22 Thread Larry Martell
On Wed, Jan 22, 2014 at 1:18 AM, wrote: > In fact, Python just becomes the last tool I (would) > recommend, especially for non-ascii users. That's right - only Americans should use Python! -- https://mail.python.org/mailman/listinfo/python-list

Re: Early retirement project?

2014-01-21 Thread Larry Martell
On Tue, Jan 21, 2014 at 1:30 AM, Devin Jeanpierre wrote: > Congrats on the early retirement! It takes guts to decide to do that. :) I thought it took money. -- https://mail.python.org/mailman/listinfo/python-list

Re: python-daemon for Python v3

2014-01-19 Thread Larry Martell
On Sun, Jan 19, 2014 at 9:57 PM, Asaf Las wrote: > On Sunday, January 19, 2014 9:30:21 PM UTC+2, larry@gmail.com wrote: >> On Sun, Jan 19, 2014 at 3:30 AM, Asaf Las wrote: >> I use this technique for demonizing: >> http://www.jejik.com/articles/2007/02/a_simple_unix_l

Re: question about input() and/or raw_input()

2014-01-19 Thread Larry Martell
On Sun, Jan 19, 2014 at 1:12 PM, Gene Heskett wrote: > On Sunday 19 January 2014 15:11:52 Larry Martell did opine: > >> On Sun, Jan 19, 2014 at 12:17 PM, Mark Lawrence > wrote: >> > On 19/01/2014 18:15, Grant Edwards wrote: >> >> On 2014-01-19, Mark Lawrence

Re: python-daemon for Python v3

2014-01-19 Thread Larry Martell
On Sun, Jan 19, 2014 at 3:30 AM, Asaf Las wrote: > Hi Community > > Is there ported to Python v3 python-daemon package? > > https://pypi.python.org/pypi/python-daemon/ > > i am afraid it is not as simple as correction of relative path input > feature and except clauses in mentioned package. I use

Re: question about input() and/or raw_input()

2014-01-19 Thread Larry Martell
On Sun, Jan 19, 2014 at 12:17 PM, Mark Lawrence wrote: > On 19/01/2014 18:15, Grant Edwards wrote: >> >> On 2014-01-19, Mark Lawrence wrote: >>> Actually, to go off at a tangent, I'm just getting into GUIs via >>> wxPython. I've discovered there are distinct advantages having to >>> write endles

Re: Fwd: What's correct Python syntax?

2014-01-14 Thread Larry Hudson
ted list of data items IS a tuple, even without the usual enclosing parenthesis. That is your error here -- [2,3] is the same as [(2,3)], which is a tuple. -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: dictionary with tuples

2014-01-14 Thread Larry Martell
On Tue, Jan 14, 2014 at 2:10 PM, Igor Korot wrote: > Hi, ALL, > C:\Documents and Settings\Igor.FORDANWORK\Desktop\winpdb>python > Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit > (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. dict

Re: efficient way to process data

2014-01-14 Thread Larry Martell
On Tue, Jan 14, 2014 at 7:26 AM, Chris Angelico wrote: > On Wed, Jan 15, 2014 at 1:18 AM, Larry Martell > wrote: >> if you're interested in what the application is, this is data >> collected with an electron microscope from semiconductor wafers as >> they are being

Re: efficient way to process data

2014-01-14 Thread Larry Martell
On Mon, Jan 13, 2014 at 11:32 AM, Chris Angelico wrote: > On Tue, Jan 14, 2014 at 5:27 AM, Larry Martell > wrote: >> Thanks. Unfortunately this has been made a low priority task and I've >> been put on to something else (I hate when they do that). > > Ugh, I k

Re: efficient way to process data

2014-01-13 Thread Larry Martell
On Mon, Jan 13, 2014 at 1:32 PM, Chris Angelico wrote: > On Tue, Jan 14, 2014 at 5:27 AM, Larry Martell > wrote: >> Thanks. Unfortunately this has been made a low priority task and I've >> been put on to something else (I hate when they do that). > > Ugh, I k

Re: efficient way to process data

2014-01-13 Thread Larry Martell
On Mon, Jan 13, 2014 at 1:09 AM, Chris Angelico wrote: > On Mon, Jan 13, 2014 at 2:35 PM, Larry Martell > wrote: >> Thanks for the reply. I'm going to take a stab at removing the group >> by and doing it all in python. It doesn't look too hard, but I don't >

Re: efficient way to process data

2014-01-12 Thread Larry Martell
On Sun, Jan 12, 2014 at 6:27 PM, Chris Angelico wrote: > On Mon, Jan 13, 2014 at 6:23 AM, Larry Martell > wrote: >> I have an python app that queries a MySQL DB. The query has this form: >> >> SELECT a, b, c, d, AVG(e), STD(e), CONCAT(x, ',', y) as f >>

Re: efficient way to process data

2014-01-12 Thread Larry Martell
On Sun, Jan 12, 2014 at 5:43 PM, Dennis Lee Bieber wrote: > On Sun, 12 Jan 2014 14:23:17 -0500, Larry Martell > declaimed the following: > >>I have an python app that queries a MySQL DB. The query has this form: >> >>SELECT a, b, c, d, AVG(e), STD(e), CONCAT(x, ',

Re: efficient way to process data

2014-01-12 Thread Larry Martell
On Sun, Jan 12, 2014 at 5:18 PM, Chris Angelico wrote: > On Mon, Jan 13, 2014 at 6:53 AM, Petite Abeille > wrote: >> On Jan 12, 2014, at 8:23 PM, Larry Martell wrote: >> >>> AFAIK, there is no way to do this in SQL. >> >> Sounds like a job for window f

Re: efficient way to process data

2014-01-12 Thread Larry Martell
On Sun, Jan 12, 2014 at 2:53 PM, Petite Abeille wrote: > > On Jan 12, 2014, at 8:23 PM, Larry Martell wrote: > >> AFAIK, there is no way to do this in SQL. > > Sounds like a job for window functions (aka analytic functions) [1][2]. > > [1] http://www.postgresql.o

efficient way to process data

2014-01-12 Thread Larry Martell
ave to process if I remove the grouping and I think that will end up being very slow. Anyone have any ideas how I can efficiently do this? Thanks! -larry -- https://mail.python.org/mailman/listinfo/python-list

[RELEASED] Python 3.4.0b2

2014-01-05 Thread Larry Hastings
inal release is projected for late February 2014. To download Python 3.4.0b2 visit: http://www.python.org/download/releases/3.4.0/ Please consider trying Python 3.4.0b2 with your code and reporting any new issues you notice to: http://bugs.python.org/ Enjoy! -- Larry Hastings, Rel

Re: Strange behaviour with a for loop.

2014-01-04 Thread Larry Hudson
ich removes trailing whitespace, and strip() which removes whitespace from both ends. All of these are very useful functions. -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: Strange behaviour with a for loop.

2014-01-04 Thread Larry Hudson
s.argv[1:] which gives you a list of filenames (which is what you want). In your second version you have: filenames = sys.argv[1] which is ONE item -- a string, not a list. You left out the colon. -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

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") >

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: >> >> >> >>

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]) >> wou

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[

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: >

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! -

Re: About some problem

2014-01-02 Thread Larry Hudson
that. Many people summarize or paraphrase error messages, which is not as helpful.) -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: Python in the news

2013-12-27 Thread Larry Martell
John D. MacDonald fan? On Friday, December 27, 2013, Travis McGee wrote: > From Twitter: > > RT @cjbrummitt Python kills security guard at Sanur Hyatt, Bali (Ind). > bit.ly/1fLCWvn < bad coding has CONSEQUENCES, ppl! > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.p

Re: Variables in a loop, Newby question

2013-12-25 Thread Larry Hudson
to use != instead. Although, as was also pointed out, in this particular case you want < (less than) rather than unequal. -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: Deamonify my python script on Android

2013-12-23 Thread Larry Martell
On Sun, Dec 22, 2013 at 10:22 PM, Kevin Peterson wrote: > Hi, > > I want to daemonify my python script on Android device. That is, it should be > automatically invoked on boot up. > > Appreciate your help. I don't know anything about Android programming, but for Linux i followed the advice on t

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

2013-12-17 Thread Larry Martell
On Tue, Dec 17, 2013 at 11:59 AM, Grant Edwards wrote: > On 2013-12-17, Wolfgang Keller wrote: > >>> I was also taught C as an undergrad but having already learned Java, C >>> and C++ before arriving at University I found the C course very easy >>> so my own experience is not representative. Many

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

2013-12-17 Thread Larry Martell
On Tue, Dec 17, 2013 at 10:35 AM, Mark Lawrence wrote: > I was in charge of the team at work that had to make all code Y2K compliant. > I discovered the one bug that to my knowledge slipped through the net. Four > years later back at the same place on contract I fixed the fix!!! >From around 199

Re: Question RE urllib

2013-12-17 Thread Larry Martell
programming at lower levels. > > Are you sure the report of "down" isn't simply a time out due to the > server being busier than you expect when you hit it? > > -Bill > > After adding the line suggested by Larry, I was able to determine that the > URLs reportin

Re: Question RE urllib

2013-12-16 Thread Larry Martell
On Mon, Dec 16, 2013 at 2:55 PM, Jeff James wrote: > Sorry to be a pain here, guys, as I'm also a newbie at this as well. > > Where, exactly in the script would I place the " print str(e) " ? The line after the print site + " is down" line. > > Thanks > > Original message : > >> I'm not really

Re: Question Re urllib (Jeff James)

2013-12-16 Thread Larry Martell
On Monday, December 16, 2013, Jeff James wrote: > I'm not really receiving an "exception" other than those three sites, out > of the 30 or so I have listed, are the only sites which show "is down" at > the end of that line specifying the site. > > > Where " # " has been substituted for our domain

Re: Question RE urllib

2013-12-16 Thread Larry Martell
On Mon, Dec 16, 2013 at 6:40 AM, Jeff James wrote: > So I'm using the following script to check our sites to make sure they are > all up and some of them are reporting they are "down" when, in fact, they > are actually up. These sites do not require a logon in order for the home > page to come u

Re: Launching Helium: A Selenium wrapper that makes web automation 50% easier

2013-12-16 Thread Larry Martell
On Mon, Dec 16, 2013 at 5:17 AM, Michael Herrmann wrote: > Hi everyone, > > I'm working for a startup called BugFree Software and would like to announce > that today we're launching our second product! > > Helium is a library that wraps around Selenium to simplify web automation. It > does away

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

2013-12-12 Thread Larry Martell
On Thu, Dec 12, 2013 at 11:51 AM, bob gailer wrote: > On 12/11/2013 9:07 PM, Larry Martell wrote: > >> Nope. Long before that I was working on computers that didn't boot when >> you powered them up, You had to manually key in a bootstrap program from the >> front

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

2013-12-11 Thread Larry Martell
On Wed, Dec 11, 2013 at 8:42 PM, Roy Smith wrote: > In article , > rusi wrote: > >> Kernighan and Ritchie set an important "first" in our field by making >> "Hello World" their first program. > > Yup. > >> People tend to under-estimate the importance of this: >> Many assumptions need to be verif

Re: Script Request

2013-12-11 Thread Larry Martell
On Wed, Dec 11, 2013 at 6:53 AM, Jeff James wrote: > Looking for a script which will check connectivity of any or all of our > company URL's first thing in the morning to make sure none or our sites are > down. Any suggestions ? Thank You import urllib sites = ["http://www.amazon.com/";, "

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

2013-12-11 Thread Larry Martell
On Tue, Dec 10, 2013 at 9:16 PM, Denis McMahon wrote: > On Tue, 10 Dec 2013 20:35:47 -0500, Dennis Lee Bieber wrote: > >> On Tue, 10 Dec 2013 18:25:48 +1300, Gregory Ewing >> declaimed the following: > >>>That's like saying that when teaching woodwork we shouldn't let people >>>use hammers, we sh

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

2013-12-09 Thread Larry Martell
On Mon, Dec 9, 2013 at 8:24 AM, Gene Heskett wrote: > On Monday 09 December 2013 07:51:12 Oscar Benjamin did opine: > >> Hi all, >> >> I work in a University Engineering faculty teaching, among other >> things, programming. In our last meeting about improving our teaching >> syllabus and delivery

Re: parsing nested unbounded XML fields with ElementTree

2013-11-27 Thread Larry Martell
On Tue, Nov 26, 2013 at 8:20 AM, Stefan Behnel wrote: > Larry Martell, 26.11.2013 13:23: >> On Tue, Nov 26, 2013 at 2:38 AM, Stefan Behnel wrote: >>> larry.martell...@gmail.com, 25.11.2013 23:22: >>>> I have an XML file that has an element called "Node". Th

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

2013-11-27 Thread Larry Martell
On Wed, Nov 27, 2013 at 5:31 AM, Paul Rudin wrote: > rusi writes: > >> Propositionally: All languages are equal -- Turing complete > > As an aside, not all languages are Turing complete. For example Charity > is a language with the property that programs are guaranteed to > terminate. > >

Re: parsing nested unbounded XML fields with ElementTree

2013-11-26 Thread Larry Martell
append() at the beginning of the function > and pop() at the end, i.e. a stack. That list will then always give you the > current path from the root node. Thanks for the reply. How can I remove getiterator()? Then I won't be traversing the nodes of the tree. I can't iterate over tree.

Re: parsing nested unbounded XML fields with ElementTree

2013-11-26 Thread Larry Martell
On Tue, Nov 26, 2013 at 5:41 AM, Alister wrote: > > On Mon, 25 Nov 2013 18:25:55 -0500, Larry Martell wrote: > > > On Mon, Nov 25, 2013 at 6:19 PM, Chris Angelico > > wrote: > > > >> On Tue, Nov 26, 2013 at 9:45 AM, Larry Martell > >> > >>

Re: Excute script only from another file

2013-11-26 Thread Larry Hudson
t was an editor called Mince (Mince Is Not Complete EMACS). -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: parsing nested unbounded XML fields with ElementTree

2013-11-25 Thread Larry Martell
On Mon, Nov 25, 2013 at 6:19 PM, Chris Angelico wrote: > On Tue, Nov 26, 2013 at 9:45 AM, Larry Martell > wrote: > > On Monday, November 25, 2013 5:30:44 PM UTC-5, Chris Angelico wrote: > > > >> First off, please clarify: Are there five corresponding tags > >

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

2013-11-25 Thread Larry Martell
On Mon, Nov 25, 2013 at 6:12 PM, Gregory Ewing wrote: > Ned Batchelder wrote: > >> Let's please avoid veering off into rants about language >> > > and philosophy now. > > Philosophy is totally on topic for this group: > > http://www.youtube.com/watch?v=-2gJamguN04 > > A classic! I hadn't seen that

Re: parsing nested unbounded XML fields with ElementTree

2013-11-25 Thread Larry Martell
On Monday, November 25, 2013 5:30:44 PM UTC-5, Chris Angelico wrote: > On Tue, Nov 26, 2013 at 9:22 AM, larry.mart...@gmail.com > > wrote: > > > I have an XML file that has an element called "Node". These can be nested > > to any depth and the depth of the nesting is not known to me. I need to

Re: [RELEASED] Python 3.4.0b1

2013-11-24 Thread Larry Hastings
On 11/24/2013 02:00 PM, Larry Hastings wrote: Python 3.4 includes a range of improvements of the 3.x series, including hundreds of small improvements and bug fixes. Major new features and changes in the 3.4 release series include: Whoops, sorry, I missed a couple of PEPs there: * PEP 428, a

[RELEASED] Python 3.4.0b1

2013-11-24 Thread Larry Hastings
e", meaning that no new features will be added. The final release is projected for late February 2014. To download Python 3.4.0b1 visit: http://www.python.org/download/releases/3.4.0/ Please consider trying Python 3.4.0b1 with your code and reporting any new issues you notice to:

Re: Setting longer default decimal precision

2013-11-20 Thread Larry Hudson
, it WAS meant for the group :/! I don't know if this applies to you or not but... I'm using Thunderbird with the News Group (not the News List) and it has two buttons, Reply and Followup. Reply sends e-mail, Followup sends to the group. Very easy to use the wrong one (and

Re: parsing RSS XML feed for item value

2013-11-20 Thread Larry Wilson
Thank you folks, now I know what I don't know and have a solution. -- https://mail.python.org/mailman/listinfo/python-list

Re: parsing RSS XML feed for item value

2013-11-20 Thread Larry Wilson
>>> feed.entries[0].w_current {'temperature': u'20.3', 'dewpoint': u'18.6', 'windgusts': u'29.6', 'rain': u'0.6', 'humidity': u'90', 'pressure': u'0.0', 'windspeed': u'22.2', 'winddirection': u'SSW'} >>> in the above I get the subitem as shown. How do I extract the label, values pairs? -- http

parsing RSS XML feed for item value

2013-11-19 Thread Larry Wilson
Wanting to parse out the the temperature value in the "http://rss.weather.com.au/nsw/newcastle"; === http://rss.weather.com.au/w.dtd";> Weather.com.au - Newcastle Weather http://www.weather.com.au/nsw/newcast

Re: Automation

2013-11-15 Thread Larry Hudson
mouth.) There are similar mis-usages, of course, but those three seem to be the most common. Now, I'm a 76-year-old curmudgeon and maybe overly sensitive, but I felt a need to vent a bit. -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: To whoever hacked into my Database

2013-11-08 Thread Larry Hudson
ot be surprised if he doesn't report it as income. Pure speculation, of course. -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: How to add a current string into an already existing list

2013-11-05 Thread Larry Hudson
On 11/05/2013 02:07 AM, Antoon Pardon wrote: And now you have depraved Nikos of the opportunity to really learn something. ... I know you meant "deprived", but "depraved Nikos" sounds like a good description to me. ;-) -=- Larry -=- -- https://mail.python.org/mai

[RELEASED] Python 3.4.0a4

2013-10-20 Thread Larry Hastings
ule test suite fails on some platforms. * I/O conducted by the "asyncio" module may, rarely, erroneously time out. The timeout takes one hour. Please consider trying Python 3.4.0a4 with your code and reporting any new issues you notice to: http://bugs.python.org/ Enjoy! -- La

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Larry Hudson
On 09/29/2013 09:19 AM, Νίκος wrote: Στις 29/9/2013 7:14 μμ, ο/η Joel Goldstick έγραψε: asked and answered. Move on shut up. you are nothign but annoyance here. Thanks for the laugh. Absolutely the most hilarious thing you've ever posted!!! :-) (Ever hear about the pot and the kettle?)

[RELEASED] Python 3.4.0a3

2013-09-29 Thread Larry Hastings
s you notice to: http://bugs.python.org/ Enjoy! -- Larry Hastings, Release Manager larry at hastings.org (on behalf of the entire python-dev team and 3.4's contributors) -- https://mail.python.org/mailman/listinfo/python-list

Re: building an online judge to evaluate Python programs

2013-09-23 Thread Larry Hudson
inite, the universe and human stupidity. And I'm not sure about the universe." -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: [RELEASED] Python 3.4.0a2

2013-09-09 Thread Larry Hastings
On 09/09/2013 09:30 PM, Antoine Pitrou wrote: Le Mon, 9 Sep 2013 08:16:06 -0400, Brett Cannon a écrit : Those last two PEPs are still in draft form and not accepted nor have any committed code yet. Unless Larry enthusiastically sneaked them into the release. Whoops. Nope, I'm not

[RELEASED] Python 3.4.0a2

2013-09-09 Thread Larry Hastings
isit: http://www.python.org/download/releases/3.4.0/ Please consider trying Python 3.4.0a2 with your code and reporting any issues you notice to: http://bugs.python.org/ Enjoy! -- Larry Hastings, Release Manager larry at hastings.org (on behalf of the entire python-dev team and 3.4's co

Rock, Paper, Scissors game

2013-08-16 Thread Larry Hudson
puter selects human = get_rps() # Human selects if human == 'q': break print('You have {}, I have {}. '.format( things[human], things[computer]), end='') res, scr = get_result(human, computer) scores[scr] += 1# Count win/lose/draw print(res) # And show results # Show final scores print('\nTotal scores:') print('\tYou won {} games'.format(scores[WIN])) print('\tComputer won {} games'.format(scores[LOSE])) print('\tThere were {} tie games'.format(scores[DRAW])) print('\nThanks for playing with me. Bye now.') ==== -=- Larry -=- -- http://mail.python.org/mailman/listinfo/python-list

Re: new to While statements

2013-08-07 Thread Larry Hudson
al comment... Add one or two spaces to the end of your prompt string, (I like to use two). No biggie, but it just looks nicer if the answer doesn't butt up directly against the end of the prompt. -=- Larry -=- -- http://mail.python.org/mailman/listinfo/python-list

Re: beginner question (True False help)

2013-08-07 Thread Larry Hudson
ion (which I would prefer) is to do away with batman altogether (maybe the Penguin got 'im??) ;-) Use the True/False version of repeat() and change the while loop to: while True: thingy() if not repeat(): break And finally unindent your final print() line. The way you

Contact information for Jim Hugunin?

2013-07-24 Thread Larry Hastings
Does anybody have an email address (or anything, really) for Jim Hugunin? He left Google in May and appears to have dropped off the face of the internet. Please email me privately. I swear I will use the information only for good and never for evil, //arry/ -- http://mail.python.org/mai

Re: newbie EOL while scanning string literal

2013-06-25 Thread Larry Hudson
is on the python.org site itself. Try: http://docs.python.org/3/tutorial/index.html That should give you a good start. BTW, EOL means end-of-line. Similarly, EOF is end-of-file. -=- Larry -=- -- http://mail.python.org/mailman/listinfo/python-list

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Larry Hudson
On 06/17/2013 08:50 AM, Simpleton wrote: On 17/6/2013 2:58 μμ, Michael Torrie wrote: a = 5 b = a a <---> memory address b <---> memory address I like to think a and b as references to the same memory address Not quite: a and b _are_ memory addresses, At the same time, a and b are references

Re: Fatal Python error: Py_Initialize: can't initialize sys standard streams

2013-06-15 Thread Larry Hudson
mily.org/html/modules/newbb/viewtopic.php%3Ftopic_id%3D36497&prev=/search%3Fq%3Dinkscape%2BCodecRegistryError (Sorry for the ugly url, it's a Google translation of a french language page) Somewhat OT, but have you ever looked at tinyurl.com? Very useful for this sort of thing.

Re: A certainl part of an if() structure never gets executed.

2013-06-14 Thread Larry Hudson
On 06/14/2013 09:56 AM, Nick the Gr33k wrote: On 14/6/2013 7:31 μμ, Steven D'Aprano wrote: On Fri, 14 Jun 2013 16:07:56 +0300, Nick the Gr33k wrote: Returning True is the same thing as returning a variable's truthy value? NO! 'True' and 'False' are the two values of the boolean type. The

Re: Encoding questions (continuation)

2013-06-12 Thread Larry Hudson
On 06/12/2013 01:20 AM, Larry Hudson wrote: On 06/11/2013 01:09 PM, Νικόλαος Κούρας wrote: Τη Τρίτη, 11 Ιουνίου 2013 10:52:02 π.μ. UTC+3, ο χρήστης Larry Hudson έγραψε: On 06/10/2013 06:56 AM, Νικόλαος Κούρας wrote: I forgot to specify I'm talking about using Thunderbird Newsgroups, no

Re: Encoding questions (continuation)

2013-06-12 Thread Larry Hudson
On 06/11/2013 01:09 PM, Νικόλαος Κούρας wrote: Τη Τρίτη, 11 Ιουνίου 2013 10:52:02 π.μ. UTC+3, ο χρήστης Larry Hudson έγραψε: On 06/10/2013 06:56 AM, Νικόλαος Κούρας wrote: i think your suggestions works only if you have a mail handy in TB and you hit follow-up what if you dont have the mail

Re: PyGame tutorial?

2013-06-12 Thread Larry Hudson
"Making Games with Python & Pygame" You can buy the dead-tree version, Or you can read it on-line for free, Or download the pdf or ebook versions for free. -=- Larry -=- -- http://mail.python.org/mailman/listinfo/python-list

Re: Sorting a set works, sorting a dictionary fails ?

2013-06-11 Thread Larry Hudson
On 06/10/2013 01:29 AM, Νικόλαος Κούρας wrote: Trying this: months = { 'Ιανουάριος':1, 'Φεβρουάριος':2, 'Μάρτιος':3, 'Απρίλιος':4, 'Μάϊος':5, 'Ιούνιος':6, \ 'Ιούλιος':7, 'Αύγουστος':8, 'Σεπτέμβριος':9, 'Οκτώβριος':10, 'Νοέμβριος':11, 'Δεκέμβριος':12 } for key in sorted( months.valu

Re: Encoding questions (continuation)

2013-06-11 Thread Larry Hudson
On 06/10/2013 06:56 AM, Νικόλαος Κούρας wrote: ps. i tried to post a reply to the thread i opend via thunderbird mail client, but not as a reply to somne other reply but as new mail send to python list. because of that a new thread will be opened. How can i tell thunderbird to reply to the orig

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-11 Thread Larry Hudson
On 06/10/2013 01:11 AM, Νικόλαος Κούρας wrote: Τη Δευτέρα, 10 Ιουνίου 2013 10:51:34 π.μ. UTC+3, ο χρήστης Larry Hudson έγραψε: I mean utf-8 could use 1 byte for storing the 1st 256 characters. I meant up to 256, not above 256. 0 - 127, yes. 128 - 255 -> one byte of a multibyte code.

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-10 Thread Larry Hudson
On 06/09/2013 03:37 AM, Νικόλαος Κούρας wrote: I mean utf-8 could use 1 byte for storing the 1st 256 characters. I meant up to 256, not above 256. NO!! 0 - 127, yes. 128 - 255 -> one byte of a multibyte code. That's why the decode fails, it sees it as incomplete data so it can't do anythi

Re: Python Game Development?

2013-06-07 Thread Larry Hudson
n the Raspberry Pi.) -=- Larry -=- -- http://mail.python.org/mailman/listinfo/python-list

Re: lstrip problem - beginner question

2013-06-04 Thread Larry Hudson
in your second example it (correctly) removes everything and gives you an empty string as the result. One possible alternative is to use slicing: h02 = '>contig-100_0' h03 = '>contig-100_' result = h02[len(h03):] Or some similar variation, possibly adding a startswit

Re: Beginner question

2013-06-04 Thread Larry Hudson
return print('He stabs you') BTW, ignore the response from Carlos. I can see from the print() functions in your original that you're using Python 3. His answer is only valid for Python 2. -=- Larry -=- -- http://mail.python.org/mailman/listinfo/python-list

Re: Prepending string "@" to usernames

2013-05-24 Thread Larry Hudson
n your for loop, you want the print _inside_ the loop not outside. IOW, indent the print line. The way you have it written it will only print the _last_ string. -=- Larry -=- -- http://mail.python.org/mailman/listinfo/python-list

Re: Question re: objects and square grids

2013-05-15 Thread Larry Hudson
for non-graphic games, and may be the better to start with. Don't try to get too advanced too fast -- you'll only get frustrated and discouraged. But definitely do keep at it -- it's well worth the effort. -=- Larry -=- -- http://mail.python.org/mailman/listinfo/python-list

Re: a couple of things I don't understand wrt lists

2013-04-16 Thread Larry Hudson
rning Python, I think you'll like it. (*)A special function for this isn't necessary in Python, it's already built in the the new-style string formatting. Try this statement: '{:,}'.format(100) (That's a colon and comma inside the curly braces.) -=- Larry -=- -- http://mail.python.org/mailman/listinfo/python-list

Re: While loop help

2013-04-10 Thread Larry Hudson
On 04/09/2013 11:44 PM, Larry Hudson wrote: On 04/09/2013 09:49 AM, thomasancill...@gmail.com wrote: So what would be the proper way to perform a loop of this program. I still can't quite figure out the best way to do it. My suggestion... (pseudocode) # Print a heading/introduction

Re: While loop help

2013-04-09 Thread Larry Hudson
ng. I hope this jump-starts your thinking. Keep at it, it's worth the effort. -=- Larry -=- -- http://mail.python.org/mailman/listinfo/python-list

Re: I hate you all

2013-04-06 Thread Larry Hudson
delimit code blocks, like the python syntax does. And in actual practice, that has been shown to be a Good Thing. Thank you, Timothy Madden -=- Larry -=- [1]. I just turned 76 and definitely tend to be a curmudgeon, so sorry if I sound too insulting, but it is the way I feel. -- http:

<    2   3   4   5   6   7   8   9   10   11   >