Which package to choose?

2005-12-21 Thread ankit
Hi pupil, please let me know which package to choose for xml processing in python . Here are my requirements "I want a package which provides me schema support along with minidom support. According to my findings, "libxml2" provides schema support but it needs either libxml2 or libgdome2 for minid

Re: libxml2 has schema support

2005-12-21 Thread ankit
Thanks, pupil I get my answer for this. Closed.. -- http://mail.python.org/mailman/listinfo/python-list

Re: Resizing of PIL images

2005-12-21 Thread Fredrik Lundh
"Tuvas" wrote: > I am seeking a way to resize a PIL image, even if the original is a > smaller dimention than the new size. Resizing seems to only make an > image smaller, and not larger. I have a 700x700 sized picture, > sometimes that will display an image larger and other times smaller. Is > th

Re: How to check if a string "is" an int?

2005-12-21 Thread Alex Martelli
Erik Max Francis <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > > How do I check if a string contains (can be converted to) an int? I > > want to do one thing if I am parsing and integer, and another if not. > > try: > x = int(aPossibleInt) > ... do something

Re: Which Python web framework is most like Ruby on Rails?

2005-12-21 Thread Alex Martelli
Paul Rubin wrote: > Richie Hindle <[EMAIL PROTECTED]> writes: > > A good solution would be multiple-licensing. You state that the > > code is (for example) triple-licensed under the GPL, LGPL and BSD > > licenses. The user of your code decides which license to obey. >

Re: Resizing of PIL images

2005-12-21 Thread Peter Hansen
Tuvas wrote: > I am seeking a way to resize a PIL image, even if the original is a > smaller dimention than the new size. Resizing seems to only make an > image smaller, and not larger. I have a 700x700 sized picture, > sometimes that will display an image larger and other times smaller. Is > there

Re: Guido at Google

2005-12-21 Thread Alex Martelli
Fuzzyman <[EMAIL PROTECTED]> wrote: > That's potentially very good news. (Or slightly sinister -depending on > your paranoia levels). > > You got any references on that ? I don't think there was any official announcement, but it's true -- he sits about 15 meters away from me;-). > I was just t

Re: Guido at Google

2005-12-21 Thread Fuzzyman
Alex Martelli wrote: > Fuzzyman <[EMAIL PROTECTED]> wrote: > > > That's potentially very good news. (Or slightly sinister -depending on > > your paranoia levels). > > > > You got any references on that ? > > I don't think there was any official announcement, but it's true -- he > sits about 15 met

Re: When Python *Eggs* better than Python *distutils*?? What's Eggs?

2005-12-21 Thread dangoor
setuptools discussion has been ongoing on distutils-sig for months. Though the vast majority of the work has been done by Phillip Eby, there has been input from quite a few people along the way. I haven't seen any other related effort that comes anywhere close to setuptools. What do you envision a

Re: Resizing of PIL images

2005-12-21 Thread Fredrik Lundh
Peter Hansen wrote: > See the docs on transform(). From the sounds of it, if resize() won't > stretch something (it's own docs don't make that clear) "resize" resizes the image to the given size. "thumbnail" (which is an in-place operation) doesn't; it creates an image no larger than the given

Re: Which Python web framework is most like Ruby on Rails?

2005-12-21 Thread Ben Sizer
Martin Christensen wrote: > > "Ben" == Ben Sizer <[EMAIL PROTECTED]> writes: > Ben> Unfortunately, that doesn't really satisfy the GPL's concerns. > Ben> The work arguably "contains or is derived from" Karrigell, which > Ben> is explicitly covered in section 2b of the GPL. If you start > Ben> e

Re: Guido at Google

2005-12-21 Thread Nicola Musatti
Alex Martelli wrote: > Fuzzyman <[EMAIL PROTECTED]> wrote: > > > That's potentially very good news. (Or slightly sinister -depending on > > your paranoia levels). > > > > You got any references on that ? > > I don't think there was any official announcement, but it's true -- he > sits about 15 met

Re: Which Python web framework is most like Ruby on Rails?

2005-12-21 Thread Fredrik Lundh
Pierre Quentel wrote: > I am Karrigell's author. I have chosen the GPL licence almost at random > (I saw that the Python licence was GPL-compatible), so I don't mind > switching to another Open Source licence if the GPL is liable to cause > problems. Which one would you advice : BSD ? Python licen

Re: Which Python web framework is most like Ruby on Rails?

2005-12-21 Thread Robert Kern
Alex Martelli wrote: > Paul Rubin wrote: > > >>Richie Hindle <[EMAIL PROTECTED]> writes: >> >>>A good solution would be multiple-licensing. You state that the >>>code is (for example) triple-licensed under the GPL, LGPL and BSD >>>licenses. The user of your code decid

Re: expect-like package

2005-12-21 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Stephen Thorne <[EMAIL PROTECTED]> wrote: >On 21/12/05, Eric McCoy <[EMAIL PROTECTED]> wrote: >> So for HTTP, for example, I'd use something >> like this: >> >> send "HEAD / HTTP/1.0" >> send "Host: server.host.name" >> send "" >> expect ... >> "^HTTP/1\.0 200.*"

Dr. Dobb's Python-URL! - weekly Python news and links (Dec 21)

2005-12-21 Thread Cameron Laird
QOTW: "[P]ortability is an n-way street." - Paul McGuire "Python's polymorphism support is so good that it makes inheritance much less important than it is in other languages." - Ben Sizer Skip Montanaro presents the affirmative case for Python as a unit-testing framework for C++:

Presentation with Python inline code

2005-12-21 Thread apm
Hi all I wonder whether there is a Python module that allows to present slides with built-in Python effects. The presentation could be specified in an XML file and presented by a Python program that allows some kind of scripting to add nice effects and demonstrate live execution of code within the

Re: Which package to choose?

2005-12-21 Thread Dennis Benzinger
ankit schrieb: > Hi pupil, please let me know which package to choose for xml processing > in python . > Here are my requirements > > "I want a package which provides me schema support along with minidom > support. > According to my findings, "libxml2" provides schema support but it > needs either

How to get the type of an object?

2005-12-21 Thread Licheng Fang
I wrote a function with a list as its parameter. And the function has to perform different operations based on the datatypes of the elements. How can I decide whether an object is, say, a list or a string? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get the type of an object?

2005-12-21 Thread smichr
You can use the type() function: ### >>> s='hello' >>> type(s) >>> type(s)==str True >>> n=1 >>> type(n) >>> type(n)==int True ### You can do the same with list, too. So you could write, if type(x)==list: #do list action /c -- http://mail.python.org/mailman/listinfo/python-list

Re: Existing FTP server code?

2005-12-21 Thread vglass
Depending on which language and protocol you want to use consider the following SFTP (FTP over SSH) http://www.jscape.com/sftp/ (Java classes) http://www.jscape.com/sshfactorydotnet/ (.NET classes) FTPS (FTP over SSL) http://www.jscape.com/sftp/ (Java classes) http://www.jscape.com/sftpdotnet

Re: Subclassing socket

2005-12-21 Thread groups . 20 . thebriguy
More simple way? What's that? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get the type of an object?

2005-12-21 Thread Dennis Benzinger
Licheng Fang schrieb: > I wrote a function with a list as its parameter. And the function has > to perform different operations based on the datatypes of the elements. > How can I decide whether an object is, say, a list or a string? > > Thanks. > To check if an object is of a particular type us

Re: Reducing import try/except boilerplate

2005-12-21 Thread Bengt Richter
On Thu, 22 Dec 2005 00:44:52 +1000, Nick Coghlan <[EMAIL PROTECTED]> wrote: >Several standard library modules (e.g., cPickle/pickle, cStringIO/StringIO, >threading/dummy_threading) have versions which may not be available on all >platforms, and pure Python fallbacks that work on any platform Pyt

Re: Subclassing socket

2005-12-21 Thread Steve Holden
[EMAIL PROTECTED] wrote: > socket objects have a little quirk. If you try to receive 0 bytes on a > blocking socket, they block. That is, if I call recv(0), it blocks > (until some data arrives). > Well, arguably you should just try to stop receiving zero bytes. Why on earth is your application

Loop Iteration

2005-12-21 Thread RaH
Hello. I am writing a script to parse my logfiles to monitor sshd attempted logins. I know I'm reinventing the wheel, but it's something I want to do. The problem I am having is that upon the 4th or 5th pass in my for statement I recieve an error AttributeError: 'NoneType' object has no attribute

Re: Which Python web framework is most like Ruby on Rails?

2005-12-21 Thread Martin Christensen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > "Kent" == Kent Johnson <[EMAIL PROTECTED]> writes: Kent> In the text you quoted I said, "a small in-house project that Kent> might possibly be distributed to business partners or become a Kent> product some day." Sounds like distribution to me.

Re: what's wrong with "lambda x : print x/60,x%60"

2005-12-21 Thread garyrob
> I don't understand why the critics of lambda don't understand that > having to use so many temp variables, for either numbers or functions, > can work against both concision and clarity. I agree with this completely. My company has a rather large application written in Python (http://www.goombah

Re: How to get the type of an object?

2005-12-21 Thread Licheng Fang
That helps. Thank you guys. -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido at Google

2005-12-21 Thread rbt
Alex Martelli wrote: > I don't think there was any official announcement, but it's true -- he > sits about 15 meters away from me;-). For Americans: 15 meters is roughly 50 feet. -- http://mail.python.org/mailman/listinfo/python-list

Re: parsing engineering symbols

2005-12-21 Thread Fredrik Lundh
Bengt Richter wrote: > Nit: why not move 10** out of myfloat into SI_prefixes > (i.e., just retrieve precalculated factors)? the table I cut and pasted from only listed the exponents. if you want to prefix 1e to all the constants, be my guest. > Nit_2: No twinge of conscience shadowing str

Re: Guido at Google

2005-12-21 Thread Martin P. Hellwig
rbt wrote: > Alex Martelli wrote: >> I don't think there was any official announcement, but it's true -- he >> sits about 15 meters away from me;-). > > For Americans: 15 meters is roughly 50 feet. Well they could have used google for that ;-) http://www.google.com/search?hl=en&q=15+meter+in+feet

Re: Guido at Google

2005-12-21 Thread Kamilche
Well, congrats to Google! I think they're the lucky ones, to get him, and you, both. :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: ANNOUNCE; Try python beta

2005-12-21 Thread Mike Meyer
"Maravilloso" <[EMAIL PROTECTED]> writes: > I'm afraid that I've spoiled the "try_python" working by means of > executing the sentence: > > open("try.py").write("\n") > > Sorry. I hope it don't be difficult for you to restore the module again > to the default folder. No problem - I'm not crazy eno

Re: ANNOUNCE; Try python beta

2005-12-21 Thread Mike Meyer
Eric <[EMAIL PROTECTED]> writes: > I'm not sure about everyone else, but I find the big warnings about > CSS and JavaScript almost as annoying as the fact that it doesn't do > anything. At all, even with JavaScript enabled. Then again, my main > browser is elinks, so my opinion is somewhat biased

Re: parsing engineering symbols

2005-12-21 Thread Jacob Rael
Just a newbie, trolling. I like this solution. Simple, easy to understand. Did you put the SI_prefixes outside the def so you could wrap the whole thing in a module and reuse it in other blocks? jr -- http://mail.python.org/mailman/listinfo/python-list

Python and Wacom Tablets (digitizing tablets) for sketch input

2005-12-21 Thread Gabe Johnson
Hello Python people, Does anybody have experience using Python and digitizing tablets such as a Wacom Tablet? I would like to know if Python is capable of giving you the high-resolution data from the tablet, or if it truncates it to low-res integers like Java. I have been developing some sketch r

Re: Guido at Google

2005-12-21 Thread Jack Diederich
On Wed, Dec 21, 2005 at 01:36:42PM -0500, rbt wrote: > Alex Martelli wrote: > > I don't think there was any official announcement, but it's true -- he > > sits about 15 meters away from me;-). > > For Americans: 15 meters is roughly 50 feet. Right, so that is about three and a half stone? -- ht

ANN: SPE 0.8.1.b IDE (realtime error underlining & script tooltips)

2005-12-21 Thread SPE - Stani's Python Editor
Release news from http://pythonide.stani.be This new release is for under your Christmas tree. (If you want more presents, just donate to SPE and receive the manual in your mailbox ;-) There are so many changes and fixes. The new cool features not to be missed are the realtime error underlingin

Re: ANN: SPE 0.8.1.b IDE (realtime error underlining & script tooltips)

2005-12-21 Thread SPE - Stani's Python Editor
Sorry, should be SPE 0.8.1.c Stani -- http://mail.python.org/mailman/listinfo/python-list

error: can't find modules

2005-12-21 Thread pmiller
I'm getting an error when I port my code to another machine. It is from the added modules. There seem to be identical Python configurations on both machines. How do I debug this problem ? Thanks, Phil Miller -- http://mail.python.org/mailman/listinfo/python-list

Re: pyUnit and dynamic test functions

2005-12-21 Thread Sakcee
Please anyone help, is this kind of dynamin thing possible? any suggestion for creating frameworks for automated testing , all comments appreciated thanks Sakcee wrote: > Hi > > I am trying to use pyUnit to create a framework for testing functions > > I am reading function name, expected outpu

Trying to find regex for any script in an html source

2005-12-21 Thread 28tommy
Hi, I'm trying to find scripts in html source of a page retrieved from the web. I'm trying to use the following rule: match = re.compile('') I'm testing it on a page that includes the following source: