Re: convert xhtml back to html

2008-04-24 Thread Stefan Behnel
bryan rasmussen top-posted: > On Thu, Apr 24, 2008 at 9:55 PM, Stefan Behnel <[EMAIL PROTECTED]> wrote: >> from lxml import etree >> >> tree = etree.parse("thefile.xhtml") >> tree.write("thefile.html", method="html") >> >> http://codespeak.net/lxml > > wow, that's pretty nice there. >

Re: [ulipad:2586] [ANN]UliPad 3.9 released!

2008-04-24 Thread Zoom.Quiet
good job! enjoy now! 2008/4/25 limodou <[EMAIL PROTECTED]>: > > UliPad is a flexible editor, based on wxPython. It's has many features,just > like:class browser, code auto-complete, html viewer, directory browser, > wizard, > etc. The main feature is the usage of mixin. This makes UliPad can b

[ANN]UliPad 3.9 released!

2008-04-24 Thread limodou
UliPad is a flexible editor, based on wxPython. It's has many features,just like:class browser, code auto-complete, html viewer, directory browser, wizard, etc. The main feature is the usage of mixin. This makes UliPad can be extended easily. So you can write your own mixin or plugin, or simple scr

Re: Explicit variable declaration

2008-04-24 Thread Jason Stokes
"Filip Gruszczynski" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> If you want to just declare that name exist, but doesn't want to >> declare the type, why don't you just do this: >> >> def somefunc(): >> nonlocal = nonlocal >> local = 0 # or None or [] or an initial

Re: Class Inheritance - What am I doing wrong?

2008-04-24 Thread Arnaud Delobelle
Brian Munroe <[EMAIL PROTECTED]> writes: > Ok, so thanks everyone for the helpful hints. That *was* a typo on my > part (should've been super(B...) not super(A..), but I digress) > > I'm building a public API. Along with the API I have a few custom > types that I'm expecting API users to extend,

Re: Class Inheritance - What am I doing wrong?

2008-04-24 Thread Gabriel Genellina
En Thu, 24 Apr 2008 18:18:01 -0300, Brian Munroe <[EMAIL PROTECTED]> escribió: Ok, so thanks everyone for the helpful hints. That *was* a typo on my part (should've been super(B...) not super(A..), but I digress) I'm building a public API. Along with the API I have a few custom types that I

wxpython and IEHtmlWindow, Focus Problem.

2008-04-24 Thread Farsheed Ashouri
Hi everyone. I create a little browser with wxpython and IEHtmlWindow. But I have a little problem here. When I press enter in the html page, The focus goes to another panel. Why this happens? I want to load a html page and it have textares and user should able to press enter inside html page. Th

Re: how to mysqldb dict cursors

2008-04-24 Thread Paul McNett
Vaibhav.bhawsar wrote: I have been trying to get the DictCursor working with mysqldb module but can't seem to. I have pasted the basic connection code and the traceback from pydev. The connection does open with the default cursor class. can't figure this one out. many thanks. Try one of: """

Re: Little novice program written in Python

2008-04-24 Thread castironpi
On Apr 24, 11:09 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Thu, 24 Apr 2008 21:31:15 -0300, Rogério Brito <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > a = [i for i in range(0,n+1)] > >         Uhm... At least in 2.4 and earlier, range() returns a list... No >

Re: Installation in a local directory

2008-04-24 Thread Steve Holden
Sean McDaniel wrote: Hi y'all, I'm trying to perform a local install of python at work in my user directory. Everything compiles correctly, but I can't seem to tell the configure script the location of the bin and lib directories where I want my stuff. I've think I've passed the correct flags

Re: Little novice program written in Python

2008-04-24 Thread Steve Holden
Rogério Brito wrote: Hi, All. I'm just getting my feet wet on Python and, just for starters, I'm coding some elementary number theory algorithms (yes, I know that most of them are already implemented as modules, but this is an exercise in learning the language idioms). As you can see from t

Installation in a local directory

2008-04-24 Thread Sean McDaniel
Hi y'all, I'm trying to perform a local install of python at work in my user directory. Everything compiles correctly, but I can't seem to tell the configure script the location of the bin and lib directories where I want my stuff. I've think I've passed the correct flags to the 'configure' s

Re: How to get inner exception traceback

2008-04-24 Thread Gabriel Genellina
En Thu, 24 Apr 2008 08:20:29 -0300, Thomas Guettler <[EMAIL PROTECTED]> escribió: How can you get the traceback of the inner exception? try: try: import does_not_exit except ImportError: raise Exception("something wrong") except: ... Background: In Django so

Re: Remove old version before upgrade?

2008-04-24 Thread Steve Holden
Sal wrote: I'm currently running Windows version 2.5.1 and would like to upgrade to 2.5.2. My question is, can I just go ahead and install the new version over the old or should I remove the old version with add/ remove programs first? The old version is in a directory named Python25. You can d

Re: Psyco alternative

2008-04-24 Thread Steve Holden
sturlamolden wrote: On Apr 25, 4:57 am, Steve Holden <[EMAIL PROTECTED]> wrote: I am simply pointing out that RPython is used for efficiency, not to do things that can't be done in standard Python. Yes. And if we only use a very small subset of Python, it would in effect be a form of assembly

Re: ctypes: return a pointer to a struct

2008-04-24 Thread sturlamolden
On Apr 25, 5:39 am, "Jack" <[EMAIL PROTECTED]> wrote: > IP2Location_get_all.restype = POINTER(IP2LocationRecord) > IP2LocationObj = IP2Location_open(thisdir + '/IP-COUNTRY-SAMPLE.BIN') > rec = IP2Location_get_all(IP2LocationObj, '64.233.167.99') > print rec.country_short print rec.contents.countr

Re: ctypes: return a pointer to a struct

2008-04-24 Thread Jack
That worked. Thank you! >> AttributeError: 'LP_IP2LocationRecord' object has no attribute >> 'country_short' > > As it says, LP_IP2LocationRecord has no attribute called > 'country_short'. IP2LocationRecord does. > > Use the 'contents' attribute to dereference the pointer. That is: > > yourstruct.

Re: ctypes: return a pointer to a struct

2008-04-24 Thread sturlamolden
On Apr 25, 5:39 am, "Jack" <[EMAIL PROTECTED]> wrote: > AttributeError: 'LP_IP2LocationRecord' object has no attribute > 'country_short' As it says, LP_IP2LocationRecord has no attribute called 'country_short'. IP2LocationRecord does. Use the 'contents' attribute to dereference the pointer. That

Re: ctypes: return a pointer to a struct

2008-04-24 Thread Jack
Thanks for the prompt and detailed reply. I tried that but was getting this error: AttributeError: 'LP_IP2LocationRecord' object has no attribute 'country_short' Here's my version, which I think is equivalent to yours: (as a matter of fact, I also tried yours and got the same error.) class IP2

Re: ctypes: return a pointer to a struct

2008-04-24 Thread sturlamolden
On Apr 25, 5:15 am, sturlamolden <[EMAIL PROTECTED]> wrote: > First define a struct type IP2LocationRecord by subclassing from > ctypes.Structure. Then define a pointer type as > ctypes.POINTER(IP2LocationRecord) and set that as the function's > restype attribute. See the ctypes tutorial or refere

Re: ctypes: return a pointer to a struct

2008-04-24 Thread sturlamolden
On Apr 25, 5:09 am, "Jack" <[EMAIL PROTECTED]> wrote: > typedef struct > { > char *country_short; > char *country_long; > char *region; > char *city; > char *isp; > float latitude; > float longitude; > char *domain; > char *zipcode; > char *timezone; > char *netspeed; > > } IP2LocationR

ctypes: return a pointer to a struct

2008-04-24 Thread Jack
I'm not able to build IP2Location's Python interface so I'm trying to use ctypes to call its C interface. The functions return a pointer to the struct below. I haven't been able to figure out how I should declare the return type of the functions and read the fields. Any hint is appreciated. typede

Re: py3k concerns. An example

2008-04-24 Thread Terry Reedy
"Aaron Watters" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] The reason that successive versions of 2.x broke so little is that starting at about 2.2, all breakages (starting with int division change) were put off until until 3.0 instead of being implemented as decided upon (wit

Re: Psyco alternative

2008-04-24 Thread sturlamolden
On Apr 25, 4:57 am, Steve Holden <[EMAIL PROTECTED]> wrote: > I am simply pointing out that RPython is used for efficiency, not to do > things that can't be done in standard Python. Yes. And if we only use a very small subset of Python, it would in effect be a form of assembly code. Hence my comm

Remove old version before upgrade?

2008-04-24 Thread Sal
I'm currently running Windows version 2.5.1 and would like to upgrade to 2.5.2. My question is, can I just go ahead and install the new version over the old or should I remove the old version with add/ remove programs first? The old version is in a directory named Python25. -- http://mail.python.or

Re: Calling Python code from inside php

2008-04-24 Thread sturlamolden
On Apr 24, 5:51 am, Nick Stinemates <[EMAIL PROTECTED]> wrote: > I don't understand how the 2 are mutually exclusive? > > You can have PHP and Python bindings installed on the same Apache > server, unless I'm mistaken? Not everyone have the luxury of having mod_python installed. It depends on the

Re: Psyco alternative

2008-04-24 Thread Steve Holden
sturlamolden wrote: On Apr 25, 3:27 am, Steve Holden <[EMAIL PROTECTED]> wrote: That seems a little harsh: it's Python-in-a-strait-jacket. The fact remains that since RPython programs also run under the standard interpreter (albeit a factor of maybe a hundred times more slowly) their claim of

Re: Remove multiple inheritance in Python 3000

2008-04-24 Thread Steve Holden
sturlamolden wrote: On Apr 22, 1:07 pm, GD <[EMAIL PROTECTED]> wrote: Please remove ability to multiple inheritance in Python 3000. Too late for that, PEPs are closed. Multiple inheritance is bad for design, rarely used and contains many problems for usual users. Every program can be desig

how to mysqldb dict cursors

2008-04-24 Thread Vaibhav.bhawsar
I have been trying to get the DictCursor working with mysqldb module but can't seem to. I have pasted the basic connection code and the traceback from pydev. The connection does open with the default cursor class. can't figure this one out. many thanks. import MySQLdb import sys # connect to the

Re: Remove multiple inheritance in Python 3000

2008-04-24 Thread sturlamolden
On Apr 22, 1:07 pm, GD <[EMAIL PROTECTED]> wrote: > Please remove ability to multiple inheritance in Python 3000. Too late for that, PEPs are closed. > Multiple inheritance is bad for design, rarely used and contains many > problems for usual users. > > Every program can be designed only with si

Re: Psyco alternative

2008-04-24 Thread sturlamolden
On Apr 25, 3:27 am, Steve Holden <[EMAIL PROTECTED]> wrote: > That seems a little harsh: it's Python-in-a-strait-jacket. > > The fact remains that since RPython programs also run under the standard > interpreter (albeit a factor of maybe a hundred times more slowly) their > claim of self-hosting i

Problem building python in virtual machine running centos

2008-04-24 Thread Alexandre Gillet
Hi, I am trying to build python-2.4.5 on Centos 5.1, which is a virtual machine running with xen. I am not able to build python. The compilation crash with the following: gcc -pthread -c -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -I./Include -DPy_BUILD_CORE -o Objects/unicodeobject.o Objects

Re: Little novice program written in Python

2008-04-24 Thread Raymond Hettinger
> What I would like is to receive some criticism to my code to make it more > Python'esque and, possibly, use the resources of the computer in a more > efficient way (the algorithm implemented below is the Sieve of Eratosthenes): It looks like straight-forward code and is fine as it stands. If you

Re: Remove multiple inheritance in Python 3000

2008-04-24 Thread Nick Stinemates
On Tue, Apr 22, 2008 at 04:07:01AM -0700, GD wrote: > Please remove ability to multiple inheritance in Python 3000. > > Multiple inheritance is bad for design, rarely used and contains many > problems for usual users. > > Every program can be designed only with single inheritance. > > I also pub

Re: Calling Python code from inside php

2008-04-24 Thread Nick Stinemates
> While I certainly prefer to use Python wherever I can, that does not mean > that there aren't cases where legacy systems or other constraints make this > impossible. If I have e.g. a type3-based website - "how on earth" should I > replace that with Python (without wasting a lot of time)? I do

Re: py3k concerns. An example

2008-04-24 Thread Aaron Watters
On Apr 24, 10:10 am, Paul McGuire <[EMAIL PROTECTED]> wrote > end point applications (I consider maintaining 2 branches to be in the > "not working" category), but it does NOT WORK for people who maintain > modules for other people to use, because those people may be on a > range of Python versions

Re: Psyco alternative

2008-04-24 Thread Steve Holden
sturlamolden wrote: On Apr 25, 2:15 am, Steve Holden <[EMAIL PROTECTED]> wrote: I believe, without the benefit of recent experience, that the R stands for Restricted. Thus and RPython program must of necessity also be a valid Python program. Or do you know something I don't? That is correct.

Little novice program written in Python

2008-04-24 Thread Rogério Brito
Hi, All. I'm just getting my feet wet on Python and, just for starters, I'm coding some elementary number theory algorithms (yes, I know that most of them are already implemented as modules, but this is an exercise in learning the language idioms). As you can see from the code below, my backg

Re: Psyco alternative

2008-04-24 Thread sturlamolden
On Mar 28, 8:06 pm, Paul Boddie <[EMAIL PROTECTED]> wrote: > From what I've seen from browsing publicly accessible materials, > there's a certain commercial interest in seeing Psyco updated > somewhat. YouTube uses Psyco. -- http://mail.python.org/mailman/listinfo/python-list

Re: Psyco alternative

2008-04-24 Thread sturlamolden
On Apr 25, 2:15 am, Steve Holden <[EMAIL PROTECTED]> wrote: > I believe, without the benefit of recent experience, that the R stands > for Restricted. Thus and RPython program must of necessity also be a > valid Python program. Or do you know something I don't? That is correct. But RPython is not

Re: Psyco alternative

2008-04-24 Thread sturlamolden
On Mar 27, 5:01 pm, king kikapu <[EMAIL PROTECTED]> wrote: > Hmmm...thanks but i think Pyrex-like solution is not the ideal one. > Coming from C# and having 8 years of expertise on it, i have gain a > very positive thinking about jit compilers and i think that psyco (ok, > a just-in-time specializ

Re: Psyco alternative

2008-04-24 Thread Steve Holden
sturlamolden wrote: On Mar 27, 4:44 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: PyPy is self-hosted and has been for some time (a year or so?). This is technically not correct. PyPy is hosted by RPython, which is not Python but a different language all together. I believe, without the

Re: Psyco alternative

2008-04-24 Thread sturlamolden
On Mar 27, 5:01 pm, king kikapu <[EMAIL PROTECTED]> wrote: > Hmmm...thanks but i think Pyrex-like solution is not the ideal one. > Coming from C# and having 8 years of expertise on it, i have gain a > very positive thinking about jit compilers and i think that psyco (ok, > a just-in-time specializ

Re: Psyco alternative

2008-04-24 Thread sturlamolden
On Mar 27, 4:02 pm, king kikapu <[EMAIL PROTECTED]> wrote: > As for psyco, are there any alternatives to use now ? When Cython has implemented all of Python's syntax, we can replace CPython's compiler and bytecode interpreter with Cython and a C compiler. Cython can be one or two orders of magni

Re: Psyco alternative

2008-04-24 Thread sturlamolden
On Mar 27, 4:44 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > PyPy is self-hosted and has been for some time (a year or so?). This is technically not correct. PyPy is hosted by RPython, which is not Python but a different language all together. -- http://mail.python.org/mailman/listi

Re: How to find the parent of an old-style class?

2008-04-24 Thread Jasper
On Apr 24, 10:02 am, Jonathan Gardner <[EMAIL PROTECTED]> wrote: > On Apr 24, 7:16 am, Jasper <[EMAIL PROTECTED]> wrote: > > > I'm stuck using a library based on old style classes, and need to find > > a class's parent at runtime. > > > With new style classes you can use .__base__ to inspect a pare

Re: [Python-Dev] annoying dictionary problem, non-existing keys

2008-04-24 Thread Greg Ewing
bvidinli wrote: I posted to so many lists because, this issue is related to all lists, this is an idea for python, this is related to development of python... You shouldn't post to every group that you think might be vaguely relevant. You should pick *one* that you think is *most* relevant and

Re: Billing system written in python

2008-04-24 Thread VanL
AC Perdon wrote: I was thinking of using django but Im more looking in to a ready made billing system that I will just do some tweaking and fine tunning to meet our need. like jbilling. Look at Fivedash (fivedash.com), it may be what you need. -- http://mail.python.org/mailman/listinfo/python

Re: DO YOU KNOW ANY THING ABOUT ISLAM???

2008-04-24 Thread Mensanator
You mean something besides wiping my ass with a rock? -- http://mail.python.org/mailman/listinfo/python-list

Re: Class Inheritance - What am I doing wrong?

2008-04-24 Thread Brian Munroe
Ok, so thanks everyone for the helpful hints. That *was* a typo on my part (should've been super(B...) not super(A..), but I digress) I'm building a public API. Along with the API I have a few custom types that I'm expecting API users to extend, if they need too. If I don't use name mangling, i

Re: convert xhtml back to html

2008-04-24 Thread bryan rasmussen
wow, that's pretty nice there. Just to know: what's the performance like on XML instances of 1 GB? Cheers, Bryan Rasmussen On Thu, Apr 24, 2008 at 9:55 PM, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Tim Arnold wrote: > > hi, I've got lots of xhtml pages that need to be fed to MS HTML Workshop

Re: Psyco alternative

2008-04-24 Thread kib
Christian Tismer a écrit : [EMAIL PROTECTED] wrote: Diez B. Roggisch: the author says that the approach is flawed, so at *some* point it will be discontinued. Can't Psyco be improved, so it can compile things like: nums = (i for i in xrange(20) if i % 2) print sum(nums) Although my mai

Re: Class Inheritance - What am I doing wrong?

2008-04-24 Thread Gary Herron
Brian Munroe wrote: My example: class A(object): def __init__(self, name): self.__name = name def getName(self): return self.__name class B(A): def __init__(self,name=None): super(A,self).__init__() def setName(

Re: Class Inheritance - What am I doing wrong?

2008-04-24 Thread Arnaud Delobelle
Arnaud Delobelle <[EMAIL PROTECTED]> writes: > That is, if you also pass the name parameter to super(A,self).__init__ > in B's __init__ method Oops. should be super(B, self).__init__(name), of course. -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list

Re: Class Inheritance - What am I doing wrong?

2008-04-24 Thread Arnaud Delobelle
Brian Munroe <[EMAIL PROTECTED]> writes: > My example: > > class A(object): > > def __init__(self, name): > self.__name = name > > def getName(self): > return self.__name > > class B(A): > > def __init__(self,name=None): > super(A,self)._

Re: Class Inheritance - What am I doing wrong?

2008-04-24 Thread Virgil Dupras
On Apr 24, 10:22 pm, Brian Munroe <[EMAIL PROTECTED]> wrote: > My example: > > class A(object): > >         def __init__(self, name): >                 self.__name = name > >         def getName(self): >                 return self.__name > > class B(A): > >         def __init__(self,name=None): >

Re: Parsing text file with #include and #define directives

2008-04-24 Thread Arnaud Delobelle
[EMAIL PROTECTED] writes: > I'm parsing a text file for a proprietary product that has the following > 2 directives: > > #include > #define > > Defined constants are referenced via <#name#> syntax. > > I'm looking for a single text stream that results from processing a file > containing these d

Class Inheritance - What am I doing wrong?

2008-04-24 Thread Brian Munroe
My example: class A(object): def __init__(self, name): self.__name = name def getName(self): return self.__name class B(A): def __init__(self,name=None): super(A,self).__init__() def setName(self, name):

Re: DTD validation and xmlproc

2008-04-24 Thread mmm
> Regarding ... try lxml. > http://codespeak.net/lxmlhttp://codespeak.net/lxml/tutorial.htmlhttp://codespeak.net/lxml/validation.html > Thx Stefan, it seems that lxml does everything I need. I have not figured out all of the bells and whistles but the tutorials are getting me up to speed. Based

Re: convert xhtml back to html

2008-04-24 Thread Stefan Behnel
Tim Arnold wrote: > hi, I've got lots of xhtml pages that need to be fed to MS HTML Workshop to > create CHM files. That application really hates xhtml, so I need to convert > self-ending tags (e.g. ) to plain html (e.g. ). This should do the job in lxml 2.x: from lxml import etree tr

Re: Psyco alternative

2008-04-24 Thread Christian Tismer
[EMAIL PROTECTED] wrote: Diez B. Roggisch: the author says that the approach is flawed, so at *some* point it will be discontinued. Can't Psyco be improved, so it can compile things like: nums = (i for i in xrange(20) if i % 2) print sum(nums) Although my main goal is to support PyPy as

Parsing text file with #include and #define directives

2008-04-24 Thread python
I'm parsing a text file for a proprietary product that has the following 2 directives: #include #define Defined constants are referenced via <#name#> syntax. I'm looking for a single text stream that results from processing a file containing these directives. Even better would be an iterator(

Re: function that accepts any amount of arguments?

2008-04-24 Thread Steve Holden
member thudfoo wrote: On 4/24/08, Jonathan Gardner <[EMAIL PROTECTED]> wrote: On Apr 24, 5:28 am, malkarouri <[EMAIL PROTECTED]> wrote: > > What's wrong with raising ZeroDivisionError (not stopping the > exception in the first place)? > Because when I use your module, call avg (or mean) wi

Re: python-ldap - Operations Error

2008-04-24 Thread t . a . adjuster
On Apr 24, 2:02 pm, [EMAIL PROTECTED] wrote: > Not sure if this is an AD thing or just something i needed to do with > our particular server/config. Glad to hear my posting helped somebody. In our case, our domain controller was passing us referrals to the Configuration, ForestDNSZones, and Domai

Re: NameError: global name 'Response' is not defined

2008-04-24 Thread Ben Kaplan
Are you importing pylons? How are you doing it? If you are doing "from pylons import Response" or "from pylons import *", then you have another problem. If you are just doing "import pylons", then you need to do "return pylons.Response(...)" - Original Message From: Lalit <[EMAIL PROTE

where can I find gdkimlib (imlib bindings)?

2008-04-24 Thread Xavier Toth
I'm trying to get some old code that imported GdkImlib to work but I can't find these a current version of these binding, anyone know where they are? -- http://mail.python.org/mailman/listinfo/python-list

Re: function that accepts any amount of arguments?

2008-04-24 Thread [EMAIL PROTECTED]
On 24 avr, 14:28, malkarouri <[EMAIL PROTECTED]> wrote: > On Apr 24, 12:43 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > > [...] > > > Not quite sure what's the best thing to do in the second case - raise a > > ValueError if args is empty, or silently return 0.0 - but I'd tend to > > choose

Re: function that accepts any amount of arguments?

2008-04-24 Thread member thudfoo
On 4/24/08, Jonathan Gardner <[EMAIL PROTECTED]> wrote: > On Apr 24, 5:28 am, malkarouri <[EMAIL PROTECTED]> wrote: > > > > What's wrong with raising ZeroDivisionError (not stopping the > > exception in the first place)? > > > > > Because when I use your module, call avg (or mean) without args,

Re: function that accepts any amount of arguments?

2008-04-24 Thread Steve Holden
Jonathan Gardner wrote: On Apr 24, 5:28 am, malkarouri <[EMAIL PROTECTED]> wrote: What's wrong with raising ZeroDivisionError (not stopping the exception in the first place)? Because when I use your module, call avg (or mean) without args, I should see an error that says, "Hey, you have to pa

Re: Installer

2008-04-24 Thread M.-A. Lemburg
On 2008-04-24 18:39, Chris wrote: Hey all, I've created a python program that relies on pysqlite, wxpython, and matplotlib. Is there any way of creating an installer that will install all these modules, python 2.5 and my program? Assuming that you're on Windows, a well-working approach is to w

question

2008-04-24 Thread Enrique Alvarez
hi, I want to ask something about programming in python, I'm beginning, I download the souce code of an antispyware in python I m talking about nixory: http://nixory.sourceforge.net/ this is a antyspyware only for mozilla firefox and my question is: how could I implement more functions of th

Re: Where to get BeautifulSoup--www.crummy.com appears to be down.

2008-04-24 Thread Paul Rubin
Paul Boddie <[EMAIL PROTECTED]> writes: > simple Python-only modules, all you'd really need to do to prove the > concept is to develop the client-side Windows software (eg. apt-get > for Windows) which downloads package lists, verifies signatures, and > works out where to put the package contents.

Re: convert xhtml back to html

2008-04-24 Thread bryan rasmussen
I'll second the recommendation to use xsl-t, set the output to html. The code for an XSL-T to do it would be basically: http://www.w3.org/1999/XSL/Transform"; version="1.0"> you would probably want to do other stuff than just copy it out but that's another case. Also, from my recollecti

Re: python-ldap - Operations Error

2008-04-24 Thread theiviaxx
Thanks for the help guys, it works! I used the ldap.set_option(ldap.OPT_REFERRALS, 0) from http://peeved.org/blog/2007/11/20/ immedialtey after import, then did the initialize trace_level=2 and did the simple_bind_s. I was able to search and get the results. That trace_level thing is nice, i'm su

Re: Loading associated files

2008-04-24 Thread Mike Driscoll
On Apr 24, 10:14 am, [EMAIL PROTECTED] wrote: > I am trying to make a a simple databasing GUI interface and and have > created a module to deal with parsing the data from a file and a GUI > based program that displays this data using PyQt4, i know how to > register files in the system registry usin

Re: convert xhtml back to html

2008-04-24 Thread M.-A. Lemburg
On 2008-04-24 19:16, John Krukoff wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:python- [EMAIL PROTECTED] On Behalf Of Tim Arnold Sent: Thursday, April 24, 2008 9:34 AM To: python-list@python.org Subject: convert xhtml back to html hi, I've got lots of xhtml pages that need t

Re: Installer

2008-04-24 Thread Mike Driscoll
On Apr 24, 11:39 am, Chris <[EMAIL PROTECTED]> wrote: > Hey all, > > I've created a python program that relies on pysqlite, wxpython, and > matplotlib. Is there any way of creating an installer that will > install all these modules, python 2.5 and my program? > > Thanks. Chris, If all you're doin

RE: convert xhtml back to html

2008-04-24 Thread John Krukoff
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Tim Arnold > Sent: Thursday, April 24, 2008 9:34 AM > To: python-list@python.org > Subject: convert xhtml back to html > > hi, I've got lots of xhtml pages that need to be fed to MS HTML Worksho

Re: convert xhtml back to html

2008-04-24 Thread Walter Dörwald
Arnaud Delobelle wrote: "Tim Arnold" <[EMAIL PROTECTED]> writes: hi, I've got lots of xhtml pages that need to be fed to MS HTML Workshop to create CHM files. That application really hates xhtml, so I need to convert self-ending tags (e.g. ) to plain html (e.g. ). Seems simple enough, but I

Re: function that accepts any amount of arguments?

2008-04-24 Thread Jonathan Gardner
On Apr 24, 5:28 am, malkarouri <[EMAIL PROTECTED]> wrote: > > What's wrong with raising ZeroDivisionError (not stopping the > exception in the first place)? > Because when I use your module, call avg (or mean) without args, I should see an error that says, "Hey, you have to pass at least one value

Re: convert xhtml back to html

2008-04-24 Thread Tim Arnold
"Arnaud Delobelle" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Tim Arnold" <[EMAIL PROTECTED]> writes: > >> hi, I've got lots of xhtml pages that need to be fed to MS HTML Workshop >> to >> create CHM files. That application really hates xhtml, so I need to >> convert >> self

Re: Installer

2008-04-24 Thread Martin v. Löwis
> I've created a python program that relies on pysqlite, wxpython, and > matplotlib. Is there any way of creating an installer that will > install all these modules, python 2.5 and my program? Sure. Look at Tools/msi in the Python code, and adjust it to your needs. Please don't use the official pr

Re: How to find the parent of an old-style class?

2008-04-24 Thread Jonathan Gardner
On Apr 24, 7:16 am, Jasper <[EMAIL PROTECTED]> wrote: > I'm stuck using a library based on old style classes, and need to find > a class's parent at runtime. > > With new style classes you can use .__base__ to inspect a parent, but > I can't remember how this was done in days of yore, before object

Re: MESSAGE RESPONSE

2008-04-24 Thread Diez B. Roggisch
Blubaugh, David A. schrieb: Dear Sir, Belcan has an absolute zero-tolerance policy toward material such as the material described. That pairs up nicely with them having zero knowledge about the internet. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: NameError: global name 'Response' is not defined

2008-04-24 Thread Diez B. Roggisch
Lalit schrieb: Hi I am very new to web development. I started with Pylons. I am using http://www.rexx.com/~dkuhlman/pylons_quick_site.html as reference to create a sample web page using pylons. I got stuck up at step 4.3 i.e when modifying controller to "return Response('firstapp default')" I

Re: convert xhtml back to html

2008-04-24 Thread Tim Arnold
"Gary Herron" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Tim Arnold wrote: >> hi, I've got lots of xhtml pages that need to be fed to MS HTML Workshop >> to create CHM files. That application really hates xhtml, so I need to >> convert self-ending tags (e.g. ) to plain html (

Re: MESSAGE RESPONSE

2008-04-24 Thread D'Arcy J.M. Cain
On Thu, 24 Apr 2008 12:28:29 -0400 "Blubaugh, David A." <[EMAIL PROTECTED]> wrote: > Belcan has an absolute zero-tolerance policy toward material such as the > material described. Hard to imagine that they would hold you responsible for something sent to you without your permission. On the oth

Installer

2008-04-24 Thread Chris
Hey all, I've created a python program that relies on pysqlite, wxpython, and matplotlib. Is there any way of creating an installer that will install all these modules, python 2.5 and my program? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Where to get BeautifulSoup--www.crummy.com appears to be down.

2008-04-24 Thread Mike Driscoll
On Apr 24, 10:15 am, Paul Boddie <[EMAIL PROTECTED]> wrote: > On 24 Apr, 16:33, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > > > This is a legitimate issue and one I don't know how to solve. It would > > be nice to have some kind of verification process, but I'm unaware of > > anything affordable

RE: MESSAGE RESPONSE

2008-04-24 Thread Blubaugh, David A.
Dear Sir, Belcan has an absolute zero-tolerance policy toward material such as the material described. Thank you for your Concern, David Blubaugh From: Dan Upton [mailto:[EMAIL PROTECTED] Sent: Wed 4/23/2008 12:27 PM To: python-list@python.org Subject:

Re: convert xhtml back to html

2008-04-24 Thread Arnaud Delobelle
"Tim Arnold" <[EMAIL PROTECTED]> writes: > hi, I've got lots of xhtml pages that need to be fed to MS HTML Workshop to > create CHM files. That application really hates xhtml, so I need to convert > self-ending tags (e.g. ) to plain html (e.g. ). > > Seems simple enough, but I'm having some tro

Re: Problem using copy.copy with my own class

2008-04-24 Thread Jeffrey Barish
George Sakkis wrote: > First off, inheriting from a basic builtin type such as int and > changing its constructor's signature is not typical; you should > rethink your design unless you know what you're doing. Nah, I would never claim to know what I'm doing. However, I have to say that I have be

Re: Ideas for parsing this text?

2008-04-24 Thread Eric Wertman
> I would discourage you from using printables, since it also includes > '[', ']', and '"', which are significant to other elements of the > parser (but you could create your own variable initialized with > printables, and then use replace("[","") etc. to strip out the > offending characters).

Re: convert xhtml back to html

2008-04-24 Thread Gary Herron
Tim Arnold wrote: hi, I've got lots of xhtml pages that need to be fed to MS HTML Workshop to create CHM files. That application really hates xhtml, so I need to convert self-ending tags (e.g. ) to plain html (e.g. ). Seems simple enough, but I'm having some trouble with it. regexps trip up

Re: Ideas for parsing this text?

2008-04-24 Thread Paul McGuire
On Apr 24, 10:42 am, "Eric Wertman" <[EMAIL PROTECTED]> wrote: > I'm sure there are cooler ways to do some of that.  I spent most of my > time expanding the characters that constitute content.  I'm concerned > that over time I'll have things break as other characters show up. > Specifically a few o

convert xhtml back to html

2008-04-24 Thread Tim Arnold
hi, I've got lots of xhtml pages that need to be fed to MS HTML Workshop to create CHM files. That application really hates xhtml, so I need to convert self-ending tags (e.g. ) to plain html (e.g. ). Seems simple enough, but I'm having some trouble with it. regexps trip up because I also have

Re: Ideas for parsing this text?

2008-04-24 Thread Eric Wertman
Thanks to everyone for the help and feedback. It's amazing to me that I've been dealing with odd log files and other outputs for quite a while, and never really stumbled onto a parser as a solution. I got this far, with Paul's help, which manages my current set of files: from pyparsing import n

Billing system written in python

2008-04-24 Thread AC Perdon
Hi, I would like to develop a billing system for a cable tv system, basically what it does is have subscribers in db, compute billing statement, print for statement for distribution something like that. I was evaluating jbilling its a java base billing system that uses tomcat,mysql or postgress DB

Re: Where to get BeautifulSoup--www.crummy.com appears to be down.

2008-04-24 Thread Paul Boddie
On 24 Apr, 16:33, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > This is a legitimate issue and one I don't know how to solve. It would > be nice to have some kind of verification process, but I'm unaware of > anything affordable. If you have any ideas, feel free to express them. It'd be interesting

Re: [Python-Dev] annoying dictionary problem, non-existing keys

2008-04-24 Thread Gary Herron
bvidinli wrote: i use dictionaries to hold some config data, such as: conf={'key1':'value1','key2':'value2'} and so on... when i try to process conf, i have to code every time like: if conf.has_key('key1'): if conf['key1']<>'': other commands this is very annoying. in php, i

  1   2   >