[Tutor] XML parsing when elements contain foreign characters

2014-01-09 Thread Garry Bettle
Howdy all, Have you hear the news? Happy New Year! Hope someone can help. I know this is a tutor list so please feel free to send me somewhere else. I'm trying to parse some XML and I'm struggling to reference elements that contain foreign characters. Code so far: # -*- coding: utf-8 -*- from

[Tutor] Question regarding xml.dom.minidom: How do you send an unsignedByte in an wsdl request

2011-07-22 Thread Garry Bettle
Howdy all, Hope this message finds everyone well - roll on the weekend! I'm trying some calls to an wsdl API I've subscribed to. But I'm struggling to know what they want when sending an unsignedByte in a request. I'm using xml.dom.minidom so to start with I have: from xml.dom.minidom import Do

Re: [Tutor] Dictionary Question

2010-12-22 Thread Garry Bettle
On Wed, 22 Dec 2010 23:31:39 +1100, Steven D'Aprano wrote: > In this case, you need to sum the number of races for all the fixtures: > > num_races = sum(len(racetimes) for racetimes in FixtureDict.values()) Many thanks Steven for your explanation and final golden nugget of code. On Wed, 22 Dec 20

[Tutor] Dictionary Question

2010-12-22 Thread Garry Bettle
Howdy all, Hope this message finds everyone well. I have dictionary of keys and a string of values. i.e. 8 Fixtures: Swin1828 1844 1901 1916 1932 1948 2004 2019 2036 2052 2107 2122 HGrn1148 1204 1218 1232 1247 1304 1319 1333 1351 Newc1142 1157 1212 1227 1242 1258 1312 1327 1344 140

Re: [Tutor] Help with a Dictionary

2010-01-11 Thread Garry Bettle
Many thanks to Alan Gauld, Gerard Flanagan, Lie Ryan and spir for your replies. All systems are go! Cheers, Garry ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Help with a Dictionary

2010-01-07 Thread Garry Bettle
On Thu, Jan 7, 2010 at 15:26, Garry Bettle wrote: > > Howdy all, > > I hope this message finds you all well. > > I have a list that I output in the following order: > > 2010-01-07 1103 Sund A7 450m > 2010-01-07 Sheff A7 500m > 2010-01-07 1119 Sund A6 450m &

[Tutor] Help with a Dictionary

2010-01-07 Thread Garry Bettle
Howdy all, I hope this message finds you all well. I have a list that I output in the following order: 2010-01-07 1103 Sund A7 450m 2010-01-07 Sheff A7 500m 2010-01-07 1119 Sund A6 450m 2010-01-07 1128 Sheff A6 500m 2010-01-07 1134 Sund A5 450m 2010-01-07 1142 Sheff A7 500m 2010-01-07 1148

Re: [Tutor] Trouble with a Recipe ...

2009-08-25 Thread Garry Bettle
Cc" and "Bcc" values must be > *lists*'. > > That means instead of "To":  "garry.bet...@gmail.com", you need "To": > ["garry.bet...@gmail.com"] i.e. a list containing the destination address. > That's so that you could

[Tutor] Trouble with a Recipe ...

2009-08-25 Thread Garry Bettle
Hi, Hope this email finds everyone well - roll on the weekend. I'm trying to run http://code.activestate.com/recipes/576824/ I'm in IDLE and I try: >>> email_it_via_gmail( {"To": "garry.bet...@gmail.com", "Subject": "Testing", >>> "From": "garry.bet...@gmail.com"}, text="Testing") but I get t

[Tutor] Normal Distribution

2009-08-14 Thread Garry Bettle
Sorry! Now with an appropriate subject line... G. Howdy all, Hope this email finds you all well - roll on the weekend. I've been tasked with replicating an Excel spreadsheet. The spreadsheet contains cells that use Excels' NORMDIST() function. I have all 3 variables required - value, mean and

Re: [Tutor] Tutor Digest, Vol 66, Issue 38

2009-08-14 Thread Garry Bettle
Howdy all, Hope this email finds you all well - roll on the weekend. I've been tasked with replicating an Excel spreadsheet. The spreadsheet contains cells that use Excels' NORMDIST() function. I have all 3 variables required - value, mean and standard deviation - but does anyone already have e

Re: [Tutor] Quick question regarding Parsing a Delimited string

2009-07-08 Thread Garry Bettle
On Wed, Jul 8, 2009 at 21:37, Kent Johnson wrote: > On Wed, Jul 8, 2009 at 1:22 PM, Rich Lovely wrote: > >> If you really want to speed up the search, you could turn the list of lists >> into a dict, using the first value in each sublist as a key: >> >> dct = dict((i[0], i[1:]) for i in lst) >> >>

[Tutor] Quick question regarding Parsing a Delimited string

2009-07-08 Thread Garry Bettle
Hi, I've been programming for over 20 yrs, but only the last few in python and then only in dribs and drabs. I'm having a difficult time parsing a delimited string. e.g. 100657641~GBP~ACTIVE~0~1~~true~5.0~1247065352508~: 3818854~0~24104.08~4.5~~22.1~false|4.4~241.67~L~1~4.3~936.0~L~2~4.2~210.54

Re: [Tutor] python parser

2008-12-22 Thread Garry Bettle
On Mon, 22 Dec 2008 09:39:37 -0800, johnf wrote: > Well I'm attempting to convert VFP and MsSQL (stored procedures and triggers) > to Python and Postgres (functions and triggers). Actually, python is very > close to VFP and I would convert very well. MsSQL is another question. Hi John, I hope t

[Tutor] Pycron - Does anyone have experience with this?

2008-01-16 Thread Garry Bettle
Howdy all, Hope this finds everyone well - roll on the weekend. I've been using pycron for months now with no trouble at all. It's a great scheduling program. I'm now trying to schedule a file copy from a network share. However, Pycron chokes, as it requires the share to fully qualified. Inst