html DOM

2008-03-29 Thread Sam the Cat
Is there a package that would allow me the same or similar functionality for modifying html code via the DOM model as I have in JavaScript ? I'd like to parse an html file, then modify it and save the result. I am not trying to do this online, rather I would like to do this on a batch of files

Re: html DOM

2008-03-29 Thread Michael Wieher
Was this not of any use? http://www.boddie.org.uk/python/HTML.html I think, since HTML is a sub-set of XML, any XML parser could be adapted to do this... I doubt there's an HTML-specific version, but I would imagine you could wrap any XML parser, or really, create your own that derives from the X

Where can I find :

2008-03-29 Thread pythonnubie
Hi All : Does anyone know where I can find either a book or a website that explains beginning python by actually building a project line by line and explaining it indepth . I am primarily interested in understading flowcontrol as well as syntax . If it was related to netwoprking th

Re: Passing function objects to timeit

2008-03-29 Thread Steven D'Aprano
On Sat, 29 Mar 2008 21:12:33 -0300, Gabriel Genellina wrote: > Or maybe: > > def main(): >global func >func = factory() >return timeit.Timer('func()', 'from __main__ import func').timeit() Alas, this does not work, because all the Timer instances share the same state. import time

Re: Passing function objects to timeit

2008-03-29 Thread Gabriel Genellina
En Sat, 29 Mar 2008 23:23:07 -0300, Steven D'Aprano <[EMAIL PROTECTED]> escribió: > The general problem is that I wish to time an arbitrary function with > arbitrary arguments. The function and arguments are provided to me as > Python objects, but timeit requires strings. Converting the objects

Re: Where can I find :

2008-03-29 Thread Gabriel Genellina
En Sun, 30 Mar 2008 00:15:59 -0300, pythonnubie <[EMAIL PROTECTED]> escribió: > Does anyone know where I can find either a book or a website that > explains beginning python by actually building a project line by > line and explaining it indepth . I am primarily interested in > unders

Re: Installing simplejson issues

2008-03-29 Thread blwatson
On Mar 29, 6:42 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sat, 29 Mar 2008 20:54:36 -0300, <[EMAIL PROTECTED]> escribió: > > > I tried to add the directory "//simplejson" to my sys.path > > in the interpreter, hoping that the call to import simplejson would > > work if the dir was the

Re: Installing simplejson issues

2008-03-29 Thread Gabriel Genellina
En Sun, 30 Mar 2008 00:39:58 -0300, <[EMAIL PROTECTED]> escribió: > First, thanks for the help. You have solved one problem but created a > new one. Isn't that always how it works? Ouch - yes, sometimes :( > So I copied over the dir, and now I get this error when trying to > import simplejson:

Using QSystemTrayIcon with PyQt

2008-03-29 Thread Alex Teiche
Hello, I am pretty new to Python, and have never learned C++. I am trying to implement the following thing into my python application: http://doc.trolltech.com/4.3/qsystemtrayicon.html Through PyQt. I have been using PyQt for awhile and I know how do use it, but I could not get this specific t

Re: Passing function objects to timeit

2008-03-29 Thread Gabriel Genellina
En Sun, 30 Mar 2008 00:20:34 -0300, Steven D'Aprano <[EMAIL PROTECTED]> escribió: > On Sat, 29 Mar 2008 21:12:33 -0300, Gabriel Genellina wrote: > >> def main(): >>global func >>func = factory() >>return timeit.Timer('func()', 'from __main__ import func').timeit() > > Alas, this does

Re: Passing function objects to timeit

2008-03-29 Thread Steven D'Aprano
On Sun, 30 Mar 2008 00:27:45 -0300, Gabriel Genellina wrote: > En Sat, 29 Mar 2008 23:23:07 -0300, Steven D'Aprano > <[EMAIL PROTECTED]> escribió: > >> The general problem is that I wish to time an arbitrary function with >> arbitrary arguments. The function and arguments are provided to me as >>

Re: Help me on function definition

2008-03-29 Thread hdante
On Mar 28, 10:47 pm, "aeneng" <[EMAIL PROTECTED]> wrote: > Hello everyone, Hi, Always avoid reinventing the wheel: from Numeric import array, cross_product a = array([1, 2, 3]) b = array([4, 5, 6]) print cross_product(a, b) See: http://numpy.scipy.org/ http://www.scipy.org/ (hint: consid

Re: Installing simplejson issues

2008-03-29 Thread blwatson
Rock and roll baby!!! Thanks so much. It took some doing, but many thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: html DOM

2008-03-29 Thread Gabriel Genellina
En Sun, 30 Mar 2008 00:19:08 -0300, Michael Wieher <[EMAIL PROTECTED]> escribió: > Was this not of any use? > > http://www.boddie.org.uk/python/HTML.html > > I think, since HTML is a sub-set of XML, any XML parser could be adapted > to > do this... That's not true. A perfectly valid HTML docu

Re: problem with logic in reading a binary file

2008-03-29 Thread hdante
On Mar 29, 3:44 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello, > > I am having trouble writing the code to read a binary string. I would > like to extract the values for use in a calculation. > > Any help would be great. I'm too lazy to debug your binary string, but I suggest that y

Re: Why prefer != over <> for Python 3.0?

2008-03-29 Thread hdante
On Mar 29, 7:55 am, [EMAIL PROTECTED] wrote: > I don't know if this is the right place to discuss the death of <> in > Python 3.0, or if there have been any meaningful discussions posted > before (hard to search google with '<>' keyword), but why would anyone > prefer the comparison operator != ove

Re: html DOM

2008-03-29 Thread David
On Sun, Mar 30, 2008 at 1:09 AM, Sam the Cat <[EMAIL PROTECTED]> wrote: > Is there a package that would allow me the same or similar functionality for > modifying html code via the DOM model as I have in JavaScript ? I'd like to > parse an html file, then modify it and save the result. I am not

Re: Why prefer != over <> for Python 3.0?

2008-03-29 Thread Carl Banks
On Mar 29, 9:23 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sat, 29 Mar 2008 12:49:05 -0700, Carl Banks wrote: > >> Please set it straight in 3.0, and if not, convince me with a good > >> reason of doing so, so that I can live with it and don't have to spend > >> the rest

Re: Can anyone help me?

2008-03-29 Thread David
> > What is the collision of spheres? Is it the melding of a sphere of > influence and cosmic sphere? What does it mean to say that such a > collision "doesn't work"? The sphere is the optimal solid for storing > the maximum volume in the minimum area. A sphere can retain the most > heat,

Re: Problem with python

2008-03-29 Thread castironpi
On Mar 29, 5:33 pm, Scott David Daniels <[EMAIL PROTECTED]> wrote: > Lie wrote: > > On Mar 30, 2:57 am, [EMAIL PROTECTED] wrote: > >> Hi there. > >> I ... started writing simple programs in the python gui...  when I write > >> python code ...[and]... double click it all that happens is a black box

Re: Why prefer != over <> for Python 3.0?

2008-03-29 Thread Gabriel Genellina
En Sun, 30 Mar 2008 02:11:33 -0300, hdante <[EMAIL PROTECTED]> escribió: > BTW, my opinion is that it's already time that programmer editors > have input methods advanced enough for generating this: > > if x ≠ 0: > ∀y ∈ s: > if y ≥ 0: f1(y) > else: f2(y) Fine if you have the

Re: Help me on function definition

2008-03-29 Thread castironpi
On Mar 29, 11:45 pm, hdante <[EMAIL PROTECTED]> wrote: > On Mar 28, 10:47 pm, "aeneng" <[EMAIL PROTECTED]> wrote: > > > Hello everyone, > >  Hi, > >  Always avoid reinventing the wheel: > > from Numeric import array, cross_product > a = array([1, 2, 3]) > b = array([4, 5, 6]) > print cross_product(

Re: Serial port error statistics - any comparable data?

2008-03-29 Thread castironpi
On Mar 29, 4:26 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Hendrik van Rooyen schrieb: > > > > > > > Hi, > > > I have been doing some tests on a device that > > we are thinking of incorporating into a product, > > and I have seen that reception on a serial port > > at 115200 baud over abou

Re: Where can I find :

2008-03-29 Thread castironpi
On Mar 29, 11:19 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sat, 29 Mar 2008 20:15:59 -0700 (PDT), pythonnubie > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > Hi  All : > > Does anyone know where I  can find  either a book or a website  that > > explains  beginni

( WWW.SNEAKERS-IN-CHINA.COM) Nike AF1 x Air Jordan 5. Nike Air Force Ones Shoes & Air Jordan 5.

2008-03-29 Thread sneakers_in_china
(www sneakers-in-china com) wholesale Air Jordan 1 Old Love/New Love Package (www sneakers-in-china com) Nike Air Jordan Retro 1 beginning moments "BMP Package-Old Love New Love Edition" (www sneakers-in-china com) selling Air Jordan DMP Defining Moments Package (www sneakers-in-china com) Air Jord

<    1   2