How to do a Http HEAD requests

2006-12-11 Thread Soni Bergraj
Hello list, I was just wondering if there is a more convenient way of doing a Http HEAD requests then the socket module? Any ideas? Cheers, -- Soni Bergraj http://www.YouJoy.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: is there a tutorial for creating packages in python?

2006-12-08 Thread Soni Bergraj
C bindings there are several choices, Python C API, SWIG and ctypes come to mind. For C++ there i Boost.Python. For the usual packaging work you would use dsitutlis. http://en.wikibooks.org/wiki/Python_Programming/Extending_with_C gives a short introduction on how to getting started. Cheers, --

Re: merits of Lisp vs Python

2006-12-08 Thread Soni Bergraj
rmance charts. Regards, -- Soni Bergraj http://www.YouJoy.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Need Help Parsing From File

2006-12-06 Thread Soni Bergraj
John Frame wrote: > How would I read this data from the file into a two dimensional array in > Python? Like: [x.split() for x in open('myfile.txt')] Or if you need integers: [[int(a) for a in x.split()] for x in open('myfile.txt')] ;) -- Soni Bergraj http:

Re: Coding standards without control?

2006-12-06 Thread Soni Bergraj
>> Python makes coding standards obsolete;) > But Python has the advantage, that your coding standards can concentrate on > the important things and skip most of the formatting rules, that are often > part of other languages coding standards. Better to say, almost obsolete, i gue

Re: newb: What is the purpose of if __name__ == "__main__":

2006-12-06 Thread Soni Bergraj
ecuted when you run the source file as a program. Hope that helps, -- Soni Bergraj http://www.YouJoy.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Why not just show the out-of-range index?

2006-12-05 Thread Soni Bergraj
stdazi wrote: > It really seems like a > feature that should be embedded in some Python debugger than a feature > in the interpreter itself. +1 -- Soni Bergraj http://www.YouJoy.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Coding standards without control?

2006-12-05 Thread Soni Bergraj
tle Minds""" from: http://www.python.org/dev/peps/pep-0008/ Python makes coding standards obsolete;) -- Soni Bergraj http://www.YouJoy.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Convert PNG files to BMP files using PIL

2006-12-04 Thread Soni Bergraj
ndings at http://www.imagemagick.org/script/api.phpm Cheers, -- Soni Bergraj http://www.YouJoy.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: decorators question

2006-12-04 Thread Soni Bergraj
There was a copy-and-paste error with my last message. Better try this for foobar.py: def foo(f): print "called foo" return 'some text' @foo def bar(): print "called bar" -- Soni Bergraj http://www.YouJoy.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: decorators question

2006-12-04 Thread Soni Bergraj
> Shouldn't this code called when we actually DO call it ? Python statements are always executed to create the corresponding class and function objects when a module is imported. Cheers, -- Soni Bergraj http://www.YouJoy.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: decorators question

2006-12-04 Thread Soni Bergraj
tion Traceback (most recent call last): File "", line 1, in ? TypeError: 'str' object is not callable >>> bar 'some text' Hope that helps;) -- Soni Bergraj http://www.YouJoy.org/ -- http://mail.python.org/mailman/listinfo/python-list