Re: [Tutor] miniwiki 1.3.0 beta now available

2007-03-03 Thread Kirk Bailey
Anyone who had trouble downloading the file, try again, there was a problem in the server which is now fixed. Kirk Bailey wrote: > May The Gods have mercy on my soul. > > MiniWiki is now offered for downloading. 1.3.0 is not in presentable > condition for them what would like to kick it around

Re: [Tutor] geeks like us and the rest of THEM

2007-03-03 Thread Kirk Bailey
Andrei wrote: > >> That's part of it. a good installer is another, and I am loo]king at a >> couple. A solid and drool-proof server is the remaining leg of the >> tripod. So far, none of the servers I have seen are satisfactory on all >> scores- simplicity to install, reliability, economy of

[Tutor] beautifulsoup - getting an error when NavigableString object is returned

2007-03-03 Thread Clay Wiedemann
I wanted to strip the quotes from IMDB quote pages, just to start learning python. Quotes are not nested, so I got the anchor links that precede them. I thought I could walk down until I hit an HR tag, meanwhile grabbing people and quotes via hits on and . But once I tried to walk down from my hit

Re: [Tutor] httpd in your laptop?!? serve web pages and wikis in your notebook?

2007-03-03 Thread R. Alan Monroe
> "Luke Paireepinart" <[EMAIL PROTECTED]> wrote >> >>> forth ... while very good for small programs >>> to imbed into controller cpu's to bury inside some machine, > It's a relatively little known fact that Sun use Forth as the > monitor/bootloader in their servers. When you do a shutdown > on a

Re: [Tutor] using tarfile on strings or filelike objects

2007-03-03 Thread Kent Johnson
Barton David wrote: > I like that I can access the contents of a zip archive that's stored in > memory (rather than on disk) by packing the archive contents into a > StringIO or cStringIO object and feeding that to ZipFile... > > i.e. > > filelike=cStringIO.StringIO(archive_as_string) > zf=zi

Re: [Tutor] Lamdas and locality

2007-03-03 Thread Kent Johnson
Michael Meier wrote: > Hello > > I ran the following code in python: > ls = [(lambda op: op + i) for i in [1,2,3]] ls > [ at 0xb7de4cdc>, at 0xb7de4d14>, > at 0xb7de4d4c>] for l in ls: > ... print l(5) > ... > 8 > 8 > 8 > > > I am quite surprised of the result. I'

[Tutor] Lamdas and locality

2007-03-03 Thread Michael Meier
Hello I ran the following code in python: >>> ls = [(lambda op: op + i) for i in [1,2,3]] >>> ls [ at 0xb7de4cdc>, at 0xb7de4d14>, at 0xb7de4d4c>] >>> for l in ls: ... print l(5) ... 8 8 8 >>> I am quite surprised of the result. I'm generating three lamdas. What I want to do is that

Re: [Tutor] Yet another list comprehension question

2007-03-03 Thread Kent Johnson
Andrei wrote: >>> Alternatively, you could put the results as keys in a dictionary, >>> then request >>> mydict.keys() to get a list of unique outcomes. >> I thought of that too, but couldn't think how to do it in a list >> comprehension. It seemed like it should be possible but I >> couldn't thin

Re: [Tutor] Yet another list comprehension question

2007-03-03 Thread Andrei
>> Alternatively, you could put the results as keys in a dictionary, >> then request >> mydict.keys() to get a list of unique outcomes. > > I thought of that too, but couldn't think how to do it in a list > comprehension. It seemed like it should be possible but I > couldn't think of how - and di

Re: [Tutor] trouble understanding the python environment in OSX

2007-03-03 Thread Kent Johnson
Clay Wiedemann wrote: > I am running the latest OSX (10.4.8) and know a little about moving > about in the terminal. But the world of paths, etc. has me a little > confused. And now it is getting in my way. I was wondering if I could > get a little help with some things. > > - Can anyone point me

Re: [Tutor] trouble understanding the python environment in OSX

2007-03-03 Thread Alan Gauld
"Clay Wiedemann" <[EMAIL PROTECTED]> wrote > I am not only new to Python, but new to programming in an > environment > like this, where knowing a little of how the underpinning work is > essential.* Actually I very rarely need to do anything with the environment. Most of my iBook Python program

[Tutor] trouble understanding the python environment in OSX

2007-03-03 Thread Clay Wiedemann
Hi, I am not only new to Python, but new to programming in an environment like this, where knowing a little of how the underpinning work is essential.* I am running the latest OSX (10.4.8) and know a little about moving about in the terminal. But the world of paths, etc. has me a little confused.

Re: [Tutor] Yet another list comprehension question

2007-03-03 Thread Kent Johnson
Alan Gauld wrote: > "Smith, Jeff" <[EMAIL PROTECTED]> wrote > >> In other words, applying somefun to the results of the iterator >> return >> duplicates but I want the constructed list to contain none. > >> l = [somefun(i) for i some-iterator if somefun(i) not in l] >> >> doesn't work (not that

Re: [Tutor] dictionaries and memory handling

2007-03-03 Thread Andrei
> But most of my dictionaries are nested, and since both keys and values > in the dbm 'dictionaries' have to be strings, I can't immediately see > how I could get it to work. > > A bit more detail: I deal with conditional probabilities, with up to 4 > parameters. These parameters are numbers or

Re: [Tutor] geeks like us and the rest of THEM

2007-03-03 Thread Andrei
> That's part of it. a good installer is another, and I am loo]king at a > couple. A solid and drool-proof server is the remaining leg of the > tripod. So far, none of the servers I have seen are satisfactory on all > scores- simplicity to install, reliability, economy of cost, (free or > unl

Re: [Tutor] howto call DOM with python

2007-03-03 Thread Alan Gauld
"Alan Gauld" <[EMAIL PROTECTED]> wrote > You will be better learing the minimum of > JavaScript IMHO. I meant to add that you can make JavaScript more Pythonic, if thats an issue, by using mochikit. http://mochikit.com/ Mochikit provides JavaScript functions that replicate many Python idiom