[Tutor] Does try-except "lock out scope" or similar?

2011-03-07 Thread Benjamin Serrato
t defined" complaint or similar. So, how do I run time.strptime() without locking myself out. And, what is the pretty way to do all of this, because a couple hours later it looks pretty ugly. I mean it turns out I'm rewriting the file anyway so no need to delete the row. http://pastebi

[Tutor] Schema change in ElementTree

2010-08-15 Thread Benjamin Serrato
dn't see anything outright I needed to redefine the schema before writing to disk. Also, is it possible to define the order of the schema attributes? dpaste of the code for the curious: http://dpaste.de/Eebo/ Benjamin Serrato 682.472.8650 ___ Tut

Re: [Tutor] Tutor Digest, Vol 64, Issue 80

2009-06-16 Thread Benjamin Serrato
Wayne already explained slicing but I would like to point out the digit after the second colon changes the default step of the slice. Usually it defaults to 1, here because no values were given it takes the entire string and steps backward. You could set it to 2. First digit, beginning of slice,

[Tutor] Formatting zip module arguments correctly

2009-04-05 Thread Benjamin Serrato
mport time import zipfile source = r'C:\Documents and Settings\Benjamin Serrato\My Documents\python\backup_list' target_dir = r'C:\Documents and Settings\Benjamin Serrato\My Documents\python\backup_dir' today = target_dir + os.sep + time.strftime('%Y%m%d') now

Re: [Tutor] Tutor Digest, Vol 59, Issue 90

2009-01-19 Thread Benjamin Serrato
I would like to add that 'A Byte of Python has been updated for python3.0 print statements are corrected and Swaroop looks to be still working on it. It's a wiki now, so the text can be edited if you find a better explanation and would like to add to it. I like Swaroop's style though. B Serrato

Re: [Tutor] Add all natural numbers that are multiples of 3 and 5

2009-01-03 Thread Benjamin Serrato
against that list for a multiple before adding a new multiple. But, I don't know how to work with lists so I'll be back in a day or two. On Sat, Jan 3, 2009 at 6:43 PM, Andre Engels wrote: > > On Sun, Jan 4, 2009 at 1:06 AM, Benjamin Serrato > wrote: > > Hello, > &

[Tutor] Add all natural numbers that are multiples of 3 and 5

2009-01-03 Thread Benjamin Serrato
Hello, I'm trying to correctly solve the first projecteuler.net problem. The question is as so: Find the sum of all the multiples of 3 or 5 below 1000. I wrote the following program, but the number found is incorrect. I created a function that adds multiples of a given number to a global variable

[Tutor] Firefox Bookmarks

2008-08-14 Thread Benjamin Serrato
I was trying to learn python a few months back but was distracted. I was up to OO programming. I don't like the way bookmarks work in Firefox so, I would like to take the bookmark file in Firefox 3 and build a markup file from it that shows all of the bookmarked files under their headers with the