Re: More on Urllib, and Urllib2

2008-06-28 Thread CracKPod
On 28 Jun., 01:42, Alex Bryan <[EMAIL PROTECTED]> wrote: > Okay, so I am having issues figuring anything out about this and have   > read the "missing manual" about it so please don't send me that link   > again. To put it simply I want to be able to input a word and get the   > definition from dic

EARN 10000$ IN EVERY MONTH ONLY DOING ONLINE JOB.

2008-06-28 Thread chinu
GET + 1000$$$ @ MANY CASH OFFERS & ENJOY! Open the Site & Click the Banners = Easy forex + Get Web Hosting-Free Domains-Dating sites etc. site name: http://earnincomeblogspotcom.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

2D online multiplayer framework?

2008-06-28 Thread George Oliver
I'm looking for a framework to support a 2D online real-time multiplayer game (rugby league football with a lo-fi pixel look). The GameProgramming page at the Python wiki had some suggestions but so far nothing looks that promising, does anyone have some recommendations? It would be ideal to play

EARN $$$ IN EVERY MONTH.

2008-06-28 Thread chinu
GET + 1000$$$ @ MANY CASH OFFERS & ENJOY! Open the Site & Click the Banners = Easy forex + Get Web Hosting- Free Domains-Ring Tones-Freelance Jobs-Games-Surveys-Blogs-Dating sites- Surffing and hyips - E-Mail Marketing with or without Investment etc., http://srinubuisiness.blogspot.com/ --

acteress images and movies

2008-06-28 Thread rose
acteress images and movies you want download the latest songs and movie pictures! in the next film nametha play a role of queen!! want more comments! click it! http://trichysathya.blogspot.com *** -- http://mail

acteress images and movies

2008-06-28 Thread rose
acteress images and movies you want download the latest songs and movie pictures! in the next film nametha play a role of queen!! want more comments! click it! http://trichysathya.blogspot.com *** -- http://mail

Money In Us $ No Investment Except Minimum Time Daily!!!

2008-06-28 Thread [EMAIL PROTECTED]
Worth Clicking If You Mean Time = Money In Us $ No Investment Except Minimum Time Daily! You Will Reveal A Great Home Business Opportunity By Opening The Below Link. http://www.govindswamy-govindaswamy.blogspot.com You Will Be Paid 2 US DOLLARS For Each Member Joining Under You (Provided they

Re: problem compiling extensions with mingw

2008-06-28 Thread eliben
On Jun 28, 8:20 am, John Machin <[EMAIL PROTECTED]> wrote: > On Jun 28, 3:41 pm, eliben <[EMAIL PROTECTED]> wrote: > > > > > On Jun 27, 3:10 pm, eliben <[EMAIL PROTECTED]> wrote: > > > > Hello, > > > I'm trying to compile the minimal example > > > fromhttp://en.wikibooks.org/wiki/Python_Programmin

Re: Mako vs. Cheetah?

2008-06-28 Thread mario
A small and ultra-lightweight system, with all the power of any fully featured text-based templating system (such as mako or cheetah) and then some (no constraints on template file names or formats, restricted execution, automatic XSS protection, ...) that can be used in a web context or standalone

Re: Using just the Mako part of Pylons?

2008-06-28 Thread mario
You would need a controller of some sort to connect the web request/ response with your template handling. This is the key task of the web application layer. This is also the area that WSGI atttemps to standardize in so far as making the basic objects framework independent. You can thus supply a ge

Re: C++ or Python

2008-06-28 Thread Nick Craig-Wood
Kurda Yon <[EMAIL PROTECTED]> wrote: > I would like to know what are advantages of Python in comparison with C > ++? In which cases and why Python can be a better tool than C++? Python is a lot more fun than C++ ;-) Anyway no need to use one or the other... I've done projects where we've embedd

Re: matplotlib pylab plot() BadWindow error

2008-06-28 Thread three3q
Hi, > I have been warned not to use the show() command in interactive mode. I can't find the error but had better luck with interactivePython ipython which shippes with a pylab-friendly option. dan -- http://mail.python.org/mailman/listinfo/python-list

complex numbers should respect the "I" representation

2008-06-28 Thread [EMAIL PROTECTED]
hi I think complex numbers should respect the "i" or "I" representation, instead of "j". No reason being cute and using a different character instead of the traditional representation? At least have the decency of supporting the orginal representation? Programmers use j as frequently as i as index

Re: complex numbers should respect the "I" representation

2008-06-28 Thread Ant
On Jun 28, 1:48 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I think complex numbers should respect the "i" or "I" representation, > instead of "j". > No reason being cute and using a different character instead of the > traditional representation? At least have the decency of supporting >

Re: 2D online multiplayer framework?

2008-06-28 Thread Cédric Lucantis
Le Saturday 28 June 2008 09:49:42 George Oliver, vous avez écrit : > I'm looking for a framework to support a 2D online real-time > multiplayer game (rugby league football with a lo-fi pixel look). The > GameProgramming page at the Python wiki had some suggestions but so > far nothing looks that pr

Re: Query regarding PythonQt

2008-06-28 Thread Shankar Narayana
Hi, Can somebody please help me with the issue of ".pyc" creating problems when we rerun the application, written using PythonQt ? The description of the problem is given below. Regards, Shankar On Fri, Jun 27, 2008 at 2:41 PM, Shankar Narayana <[EMAIL PROTECTED]> wrote: > Hi, > I am newbie t

Re: complex numbers should respect the "I" representation

2008-06-28 Thread Mark Dickinson
On Jun 28, 1:48 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > hi > > I think complex numbers should respect the "i" or "I" representation, > instead of "j". > No reason being cute and using a different character instead of the > traditional representation? At least have the decency of suppor

ANN: Leo 4.5 b1 released

2008-06-28 Thread Edward K Ream
Leo 4.5 beta 1 is now available at: http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106 Leo is a text editor, data organizer, project manager and much more. See: http://webpages.charter.net/edreamleo/intro.html The highlights of Leo 4.5: -- - A majo

Re: where is the error?

2008-06-28 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: ... And my problem was that the commands worked on windows but not on linux. By the way, shouldn't you be using numpy? I thought numarray was going away by mid-2008 i.e. now. I know, but i'm not sure that it's the problem. It's your job to get certain of some things,

Re: C++ or Python

2008-06-28 Thread Victor Noagbodji
Kurda Yon <[EMAIL PROTECTED]> wrote: > I would like to know what are advantages of Python in comparison with C > ++? In which cases and why Python can be a better tool than C++? I have used both in small projects and I think Python wins by far. First of all, you don't have the hassle of compilin

Pygame and Tkinter

2008-06-28 Thread Nick Dumas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm doing a project with Pygame, a Snake game, and I've just taken a look at Tkinter and I really like how easy it is to build a GUI with it. The thing is that I don't know how I would use Tkinter and Pygame in conjunction. They seem to have some overl

Re: 2D online multiplayer framework?

2008-06-28 Thread Gary Herron
George Oliver wrote: I'm looking for a framework to support a 2D online real-time multiplayer game (rugby league football with a lo-fi pixel look). The GameProgramming page at the Python wiki had some suggestions but so far nothing looks that promising, does anyone have some recommendations? It

Re: what is meaning of "@" in pyhon program.

2008-06-28 Thread Aahz
In article <[EMAIL PROTECTED]>, Damon Getsman <[EMAIL PROTECTED]> wrote: > >Okay, maybe I just didn't understand the websites that were given as >examples as to 'decoration'. I first came across the unusual '@' when >I was browsing through some extreme beginner's information on os.x >method descr

Re: surprising behaviour of os.environ.clear

2008-06-28 Thread Joe P. Cool
On 28 Jun., 08:54, [EMAIL PROTECTED] wrote: > For one thing, the expression 'os.environ.keys' will yield a method > object (not a list, as you're probably expecting), but iterating over > a method as you did should produce an exception. If you want to get > the list of environment vars, you have to

Re: 2D online multiplayer framework?

2008-06-28 Thread George Oliver
On Jun 28, 9:04 am, Gary Herron <[EMAIL PROTECTED]> wrote: > > Pyglet is my favorite: http://www.pyglet.org/ > > Twisted might be fine for the "online multiplayer" parts, but really if > you want a 2D/3D real-time game, start with a game framework. > > Gary Herron Thanks Cédric and Gary for the s

Re: Do I need "self" and "other"?

2008-06-28 Thread Peter Pearson
On Fri, 27 Jun 2008 20:19:00 -0400, Nick Dumas <[EMAIL PROTECTED]> wrote: [snip] > > Example: > > class Foo(): > self.x = 5 Have you tried what you're posting? Python 2.4.3 (#2, Oct 6 2006, 07:52:30) [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 Type "help", "copyright", "credits" or "lic

Beginner's Python development questions

2008-06-28 Thread Łukasz Dąbek
Hello! I'm newcomer to Python development and I have some questions (I didn't found answers for these): 1. Some bugs at bugs.python.org are assigned but it didn't changed for many months (example: http://bugs.python.org/issue1692335). Is that bugs closed (maybe somebody forgot to close it on w

Re: Python and Flaming Thunder

2008-06-28 Thread Dave Parker
On Jun 7, 10:24 am, Sam Denton <[EMAIL PROTECTED]> wrote: > I've long believed that '=' should be banned from programming languages. > Use '==' for equality tests, and ':=' for assignments. That's an interesting suggestion that I don't recall hearing anyone else ever mention. On Jun 7, 10:24 am

Re: Do I need "self" and "other"?

2008-06-28 Thread Gabriel Rossetti
Kurda Yon wrote: Hi, I found one example which defines the addition of two vectors as a method of a class. It looks like that: class Vector: def __add__(self, other): data = [] for j in range(len(self.data)): data.append(self.data[j] + other.data[j]) return Vector(data) In

Re: Do I need "self" and "other"?

2008-06-28 Thread Nick Dumas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peter Pearson wrote: > On Fri, 27 Jun 2008 20:19:00 -0400, Nick Dumas <[EMAIL PROTECTED]> wrote: > [snip] >> Example: >> >> class Foo(): >> self.x = 5 > > > Have you tried what you're posting? > > Python 2.4.3 (#2, Oct 6 2006, 07:52:30) > [GCC

Re: Beginner's Python development questions

2008-06-28 Thread Victor Noagbodji
From: "Łukasz Dąbek" <[EMAIL PROTECTED]> >Hello! >I'm newcomer to Python development and I have some questions (I didn't >found answers for these): Hi welcome. >1. Some bugs at bugs.python.org are assigned but it didn't changed >for many months (example: http://bugs.python.org/issue1692335). Is >

Re: [Employment] New TurboGears Job in Eugene, OR

2008-06-28 Thread Aahz
In article <[EMAIL PROTECTED]>, Paul McNett <[EMAIL PROTECTED]> wrote: >Silas Snider wrote: >> >> Full-time academic year position >> Salary range: $2819 - $4404 per month ( $16.26 - $25.41 per hour) >> >> The following knowledge, skills and experience are necessary for this >> position: >> >> Ex

Re: what is meaning of "@" in pyhon program.

2008-06-28 Thread Thierry
> ie: > @if os.exists(foo): >    etc >    etc > > and > > @for blah: >    etc >    etc > This sounds more like PHP code, where a @ prefixing a function means that even if there are errors or warnings, you don't want to see them. -- http://mail.python.org/mailman/listinfo/python-list

pixel colour on screen

2008-06-28 Thread cjstuttle
Could anyone help me, I'm a python noob and need some help. im trying to find some code that will, given a screen co-ordinate, will give me the colour of that pixel in RGB. i have found a lot about getting the pixel colour from a picture file with a given co-ordinate, but is it possible to do it fr

Re: Beginner's Python development questions

2008-06-28 Thread Łukasz Dąbek
Thanks for reply. From: "Victor Noagbodji" <[EMAIL PROTECTED]>: > But it makes no sense to start learning Python 3 at this moment. You can > code scripts in Python 2.5 that will not break; you just have to avoid things > that will be deprecated I have been coding in Python for about 1 year :) (I

Re: Beginner's Python development questions

2008-06-28 Thread Łukasz Dąbek
Thanks for reply. From: "Victor Noagbodji" <[EMAIL PROTECTED]>: > But it makes no sense to start learning Python 3 at this moment. You can > code scripts in Python 2.5 that will not break; you just have to avoid things > that will be deprecated I have been coding in Python for about 1 year :) (I

how to upgrade python on centOS 5.2

2008-06-28 Thread weixiao.fan
CentOS5.2 installed python2.4 by default, but google app engine need 2.5+ version. I download the tar package from python.org then run ./ configure,make,make install and some other work. but I can't use it in gae with exceptions like can't use import time ... Is there a detailed guide on how to upg

Re: list previous or following list elements

2008-06-28 Thread Zentrader
To be completely correct, you should allow for the possibility that the word found is the last word in the list for j, word in enumerate(words): if (word.startswith("b")) and (j+1 < len(words)): print words[j+1] break -- http://mail.python.org/mailman/listinfo/python-list

tictactoe (reprise)

2008-06-28 Thread Sean McIlroy
""" AUTHOR: Sean McIlroy LANGUAGE: Python 2.5 OVERVIEW: instances of "tictactoeplayer" play optimal tictactoe SPECIALIZED TYPES: player={ex,oh}; empty={blank}; cell=player+empty; board=[cell] TYPE RELATIONS: bool(c)==True for any c in cell """ ex, oh, blank = 'X', '0', ' ' linear = [[0,1,2],[3,4,

[ANN] Update on Python-based Second Life client library (pyogp)

2008-06-28 Thread Lawson English
Pyogp is the Python-based library being developed by Linden Lab, makers of Second Life, and the programming community of the users of Second Life under the auspices of the SL Architecture Working Group, in order to test and implement open protocols designed to allow anyone to create their own

Re: surprising behaviour of os.environ.clear

2008-06-28 Thread Joe P. Cool
On 28 Jun., 04:05, Benjamin <[EMAIL PROTECTED]> wrote: > On Jun 27, 4:05 pm, "Joe P. Cool" <[EMAIL PROTECTED]> wrote: > This is because of how os.environ is implement with a UserDict > subclass. You should report this at bugs.python.org. issue 3227: os.environ.clear has no effect on child process

Re: surprising behaviour of os.environ.clear

2008-06-28 Thread Joe P. Cool
On 28 Jun., 23:06, "Joe P. Cool" <[EMAIL PROTECTED]> wrote: > On 28 Jun., 04:05, Benjamin <[EMAIL PROTECTED]> wrote: > > > On Jun 27, 4:05 pm, "Joe P. Cool" <[EMAIL PROTECTED]> wrote: > > This is because of how os.environ is implement with a UserDict > > subclass. You should report this at bugs.pyt

Is there a sampling profiler for Python?

2008-06-28 Thread Matei Zaharia
I'm looking for a sampling profiler which I can attach to a running Python process without modifying the source code or affecting performance. So far I've only seen references to instrumentation-based profilers. Is any sampling-based tool available? -- http://mail.python.org/mailman/listinfo/python

pxssh submit su commands = very very slow

2008-06-28 Thread gert
This works but after the su command you have to wait like 2 minutes before each command gets executed ? What did i do wrong ? import pxssh try: s = pxssh.pxssh() s.login ('127.0.0.1', 'gert', '123') s.sendline ('uptime') s.prompt() print

Re: Pygame, how to show window without loop? no loop=popupand close...

2008-06-28 Thread defn noob
On 28 Juni, 08:32, Carl Banks <[EMAIL PROTECTED]> wrote: > On Jun 27, 10:58 pm, defn noob <[EMAIL PROTECTED]> wrote: > > > right. im an idiot anyway. i can just draw the lines before entering > > the loop, problem solved... > > Do not do that; it'll create a busy loop and use 100% of CPU. Use > py

Testing for Null?

2008-06-28 Thread Alex Bryan
I am having a problem with a list value that is empty. I have a list of definitions called mainList. the 5th value in the list doesn't have anything in it. In this case, the values are definitions; also, in this case just the word cheese is defined. Here is my output to the console: 5. a sprawl

Re: Pygame, how to show window without loop? no loop=popupand close...

2008-06-28 Thread Carl Banks
On Jun 28, 6:49 pm, defn noob <[EMAIL PROTECTED]> wrote: > On 28 Juni, 08:32, Carl Banks <[EMAIL PROTECTED]> wrote: > > > On Jun 27, 10:58 pm, defn noob <[EMAIL PROTECTED]> wrote: > > > > right. im an idiot anyway. i can just draw the lines before entering > > > the loop, problem solved... > > > Do

Re: pxssh submit su commands = very very slow

2008-06-28 Thread Neil Hodgson
gert: This works but after the su command you have to wait like 2 minutes before each command gets executed ? s.sendline ('su') s.expect('Password:') A common idiom seems to be to omit the start of the expected reply since it may not be grabbed quickly enough. Then t

Re: pxssh submit su commands = very very slow

2008-06-28 Thread gert
On Jun 29, 1:19 am, Neil Hodgson <[EMAIL PROTECTED]> wrote: > gert: > > > This works but after the su command you have to wait like 2 minutes > > before each command gets executed ? > >             s.sendline ('su') > >             s.expect('Password:') > >     A common idiom seems to be to omit th

Re: pxssh submit su commands = very very slow

2008-06-28 Thread gert
On Jun 29, 1:44 am, gert <[EMAIL PROTECTED]> wrote: > On Jun 29, 1:19 am, Neil Hodgson <[EMAIL PROTECTED]> > wrote: > > > gert: > > > > This works but after the su command you have to wait like 2 minutes > > > before each command gets executed ? > > >             s.sendline ('su') > > >            

Re: Testing for Null?

2008-06-28 Thread Terry Reedy
Alex Bryan wrote: I am having a problem with a list value that is empty. I have a list of definitions called mainList. the 5th value in the list doesn't have anything in it. In this case, the values are definitions; also, in this case just the word cheese is defined. Here is my output to the

Re: pxssh submit su commands = very very slow

2008-06-28 Thread Grant Edwards
On 2008-06-28, Neil Hodgson <[EMAIL PROTECTED]> wrote: > gert: >> This works but after the su command you have to wait like 2 minutes >> before each command gets executed ? >> s.sendline ('su') >> s.expect('Password:') > > A common idiom seems to be to omit the start of

Re: Testing for Null?

2008-06-28 Thread c0mrade
Try something like this... list = ['lkdfjsldk', None, '', '0', 'slfkjsdlfj', 'lsdgjdlfg', False, True] for n, it in enumerate(list): if not it: print 'Error on this definition' else: print '%d. %s' % (n+1, it) Results: 1. lkdfjsldk Error on this definition Error on this definition 4. 0 5

HTML Parsing

2008-06-28 Thread disappearedng
Hi everyone I am trying to build my own web crawler for an experiement and I don't know how to access HTTP protocol with python. Also, Are there any Opensource Parsing engine for HTML documents available in Python too? That would be great. -- http://mail.python.org/mailman/listinfo/python-list

Re: pxssh submit su commands = very very slow

2008-06-28 Thread gert
this does the same except 100 times faster ? I don't understand the logic about the prompt, its not the same as the output from the bash shell ? [EMAIL PROTECTED]:~# cat ssh2.py import pexpect import sys child = pexpect.spawn("ssh [EMAIL PROTECTED]") #child.logfile = sys.stdout i = child.expect

Re: C++ or Python

2008-06-28 Thread c0mrade
Kurda Yon wrote: > > I would like to know what are advantages of Python in comparison with C > ++? In which cases and why Python can be a better tool than C++? > Uh, code a trivial program in each language and you'll have a perfectly good idea. -- View this message in context: http://www.na

Re: surprising behaviour of os.environ.clear

2008-06-28 Thread Benjamin
On Jun 28, 1:23 am, Tim Roberts <[EMAIL PROTECTED]> wrote: > Benjamin <[EMAIL PROTECTED]> wrote: > > >This is because of how os.environ is implement with a UserDict > >subclass. > > Why?  I mean, I can see that it happens, but I don't understand why being a > UserDict causes this. The contents of

Re: HTML Parsing

2008-06-28 Thread Dan Stromberg
On Sat, 28 Jun 2008 19:03:39 -0700, disappearedng wrote: > Hi everyone > I am trying to build my own web crawler for an experiement and I don't > know how to access HTTP protocol with python. > > Also, Are there any Opensource Parsing engine for HTML documents > available in Python too? That woul

Re: HTML Parsing

2008-06-28 Thread Benjamin
On Jun 28, 9:03 pm, [EMAIL PROTECTED] wrote: > Hi everyone > I am trying to build my own web crawler for an experiement and I don't > know how to access HTTP protocol with python. Look at the httplib module. > > Also, Are there any Opensource Parsing engine for HTML documents > available in Pytho

Re: pxssh submit su commands = very very slow

2008-06-28 Thread Dan Stromberg
On Sat, 28 Jun 2008 19:08:59 -0700, gert wrote: > this does the same except 100 times faster ? > > I don't understand the logic about the prompt, its not the same as the > output from the bash shell ? > > [EMAIL PROTECTED]:~# cat ssh2.py > import pexpect > import sys > > child = pexpect.spawn("

Re: complex numbers should respect the "I" representation

2008-06-28 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > hi > > I think complex numbers should respect the "i" or "I" representation, > instead of "j". > No reason being cute and using a different character instead of the > traditional representation? Ask any electrical

Re: Mako vs. Cheetah?

2008-06-28 Thread John Salerno
Tim Roberts wrote: "John Salerno" <[EMAIL PROTECTED]> wrote: Is it correct to say that Mako allows you to embed Python code within HTML, whereas Cheetah requires a certain amount of "tweaking" of Python code so that it isn't really code you could just run independently in the interpreter? I'

Re: How do web templates separate content and logic?

2008-06-28 Thread John Salerno
[EMAIL PROTECTED] wrote: For which definitions of "content" and "logic" ??? The point of mvc is to keep domain logic separated from presentation logic, not to remove logic from presentation (which just couldn't work). Templating systems are for presentation logic. Whether they work by embedding

Re: HTML Parsing

2008-06-28 Thread Victor Noagbodji
> Hi everyone Hello > I am trying to build my own web crawler for an experiement and I don't > know how to access HTTP protocol with python. urllib2: http://docs.python.org/lib/module-urllib2.html > Also, Are there any Opensource Parsing engine for HTML documents > available in Python too? That w

Re: frame grabber hardware

2008-06-28 Thread Dan Stromberg
On Fri, 27 Jun 2008 15:22:29 -0700, rubbishemail wrote: > Hello, > > > can anybody recommend a simple USB or PCI framegrabber with video input > that runs under xp and has a python driver available? I just want to get > the image into a file, no special requirements. > > Thank you > > Daniel

Re: C++ or Python

2008-06-28 Thread Dan Stromberg
On Fri, 27 Jun 2008 15:22:26 -0700, Kurda Yon wrote: > I would like to know what are advantages of Python in comparison with C > ++? In which cases and why Python can be a better tool than C++? > > Thank you! Python's automatic tracebacks on errors facilitate debugging very nicely. Python doesn

Market simulations with Python

2008-06-28 Thread xamdam
I am interested in market simulation with Python, simulating buyers and sellers arriving with goods at random times. I looked at SimPy, it's pretty nice, but all the examples are around congestion problems. Should I a) dig deeper b) write something from scratch c) look at another library? thanks,

Why is recursion so slow?

2008-06-28 Thread slix
Recursion is awesome for writing some functions, like searching trees etc but wow how can it be THAT much slower for computing fibonacci- numbers? is the recursive definition counting fib 1 to fib x-1 for every x? is that what lazy evaluation in functional languages avoids thus making recursive ve

help debugging noob code - converting binary data to images...

2008-06-28 Thread larry
Ok I'm a Python noob, been doing OK so far, working on a data conversion program and want to create some character image files from an 8-bit ROM file. Creating the image I've got down, I open the file and use TK to draw the images... but 1) It does not seem to end (running in IDLE), I have to ki

Re: Market simulations with Python

2008-06-28 Thread Alan Isaac
xamdam wrote: I am interested in market simulation with Python, simulating buyers and sellers arriving with goods at random times. I looked at SimPy, it's pretty nice, but all the examples are around congestion problems. Should I a) dig deeper b) write something from scratch c) look at another li

Re: Re: Testing for Null?

2008-06-28 Thread Alex Bryan
Ya, I tried your code, it still did the same thing :[. I mean it worked like before. Some extra info about it, I am using BeautifulSoup to get definitions of words and well, the problem is it doesn't get links or anything in bold or italics. So the think #6 actually was, was italics. So I am still

Re: Why is recursion so slow?

2008-06-28 Thread Luis Zarrabeitia
Quoting slix <[EMAIL PROTECTED]>: > Recursion is awesome for writing some functions, like searching trees > etc but wow how can it be THAT much slower for computing fibonacci- > numbers? The problem is not with 'recursion' itself, but with the algorithm: > def fibr(nbr): > if nbr > 1: >

Re: Why is recursion so slow?

2008-06-28 Thread Terry Reedy
slix wrote: Recursion is awesome for writing some functions, like searching trees etc but wow how can it be THAT much slower for computing fibonacci- numbers? The comparison below has nothing to do with recursion versus iteration. (It is a common myth.) You (as have others) are comparing an

Re: HTML Parsing

2008-06-28 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > I am trying to build my own web crawler for an experiement and I don't > know how to access HTTP protocol with python. > > Also, Are there any Opensource Parsing engine for HTML documents > available in Python too? That would be great. Try lxml.html. It parses broken HTM

Re: What happened to _tkinter.so?

2008-06-28 Thread akineko
Hello, I spent time today to investigate this. If you install Python with Tkinter from source, _tkinter is built into the Python executable and _tkinter.so is not generated *unless* "shared" option is specified. I found this by running python with '-v' option: % python -v ... >>> from Tkinter imp

Re: lxml and links

2008-06-28 Thread Ampedesign
On Jun 27, 10:00 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Ampedesign wrote: > > I'm trying to extract all the links on a page with lxml. Ideally, I > > would like it to return me a list of hrefs of each link on the page, > > in a list. > > > How would I go about doing this? > > Read the manua