Re: Yet another comparison of Python Web Frameworks

2007-10-10 Thread Michele Simionato
On Oct 10, 5:57 am, [EMAIL PROTECTED] wrote: > Since you are starting a new project you may want to look into > something new and different > > http://mdp.cti.depaul.edu/examples Well, the name is certainly appealing to an old gauge field theorist like myself ;) Michele Simionato -- http://ma

Re: Unexpected behaviour with HTMLParser...

2007-10-10 Thread Stefan Behnel
Just Another Victim of the Ambient Morality wrote: > HTMLParser is behaving in, what I find to be, strange ways and I would > like to better understand what it is doing and why. In case you also want an HTML library that is easy to use (and powerful and flexible and...), look at lxml.html. h

Cantankerous trolliness ad infinitum, was: Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-10 Thread Matthias Buelow
[EMAIL PROTECTED] wrote: ^ Is this some sport of yours to constantly create new gmail accounts and spam Usenet? > So you assert, but "man" bears a much closer resemblance to "manus" > than it does to "mens". This is irrelevant. Consult an etymological dictionary. F'up-to: c

Re: pytz has so many timezones!

2007-10-10 Thread Sanjay
Thanks a lot, Guys. The immediate step I think to take is having two combo boxes (dividing the data by '/'). Thanks for enormous response and the valuable suggestions! Sanjay -- http://mail.python.org/mailman/listinfo/python-list

pyxml package not working? No xml.dom.ext.reader module available after install.

2007-10-10 Thread Thomas W
I've tried to install the pyxml-package, available at http://pyxml.sourceforge.net/, both from source and using some hack on the win32-binary package available for python2.4, but without luck. After install the module xml.dom.ext.reader is not available, eventhough the folder, __init__py and every

Re: Problem with argument parsing

2007-10-10 Thread Diez B. Roggisch
lgwe wrote: > On 9 Okt, 17:18, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> lgwe wrote: >> > I have a python-script: myscript, used to start a program on another >> > computer and I use OptionParser in optpars. >> > I use it like this: myscript -H host arg1 -x -y zzz >> > I would like OptionPa

Re: pyxml package not working? No xml.dom.ext.reader module available after install.

2007-10-10 Thread Stefan Behnel
Thomas W wrote: > I've tried to install the pyxml-package, available at > http://pyxml.sourceforge.net/, > both from source and using some hack on the win32-binary package > available for python2.4, but without luck. After install the module > xml.dom.ext.reader is not available, eventhough the fo

[ANN] Data Plotting Library DISLIN 9.2

2007-10-10 Thread Helmut Michels
Dear Python users, I am pleased to announce version 9.2 of the data plotting software DISLIN. DISLIN is a high-level and easy to use plotting library for displaying data as curves, bar graphs, pie charts, 3D-colour plots, surfaces, contours and maps. Several output formats are supported such as X

Re: Static variable vs Class variable

2007-10-10 Thread Laszlo Nagy
Steven D'Aprano írta: > On Tue, 09 Oct 2007 21:25:38 +0200, Laszlo Nagy wrote: > > >> a = 1 >> a+= 1 # The compiler will probably optimize this and the Python bytecode >> interpreter will not rebind 'a' here, just increment the integer in >> memory. >> > > No. This is Python, not C. You can

Singleton

2007-10-10 Thread pythoncurious
Hi, I've been trying to get some sort of singleton working in python, but I struggle a bit and I thought I'd ask for advice. The first approach was simply to use a module, and every variable in it will be seen by all who import the module. That works in some cases, but not if I have the following

Re: NUCULAR fielded text searchable indexing

2007-10-10 Thread Paul Boddie
On 9 Okt, 22:32, [EMAIL PROTECTED] wrote: > > Well I'd like people to use the software because they think > it's good. If the name is a problem it's probably only the > first of many reasons they won't want to use it or will not > like it because it doesn't match their preconceptions. Please igno

Re: pyxml package not working? No xml.dom.ext.reader module available after install.

2007-10-10 Thread Thomas W
On 10 Okt, 11:13, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Thomas W wrote: > > I've tried to install the pyxml-package, available > > athttp://pyxml.sourceforge.net/, > > both from source and using some hack on the win32-binary package > > available for python2.4, but without luck. After install

Re: struct.unpack less than 1 byte

2007-10-10 Thread Guilherme Polo
2007/10/10, cprogrammer <[EMAIL PROTECTED]>: > hello all, > > i need to read from a file a struct like this [1byte, 12bits, 12bits] > reading 1 byte or more is not a problem ... but the 12 bits values > are ... > > thanks > > -- > http://mail.python.org/mailman/listinfo/python-list > 12bits, 12bit

Python service gets interrupted function call

2007-10-10 Thread ashish
Hi All, I wanted to know how to handle events like 'logoff' in the main thread so that any process which is being run by svcDoRun method of service does not get 'interrupted function call' exception. I am posting a very simple service program , and i want to know that is there a way to handle such

struct.unpack less than 1 byte

2007-10-10 Thread cprogrammer
hello all, i need to read from a file a struct like this [1byte, 12bits, 12bits] reading 1 byte or more is not a problem ... but the 12 bits values are ... thanks -- http://mail.python.org/mailman/listinfo/python-list

more information for making money

2007-10-10 Thread panguohua
www.space666.com sports , poker ,etc. -- http://mail.python.org/mailman/listinfo/python-list

Last value of yield statement

2007-10-10 Thread Shriphani
Hello all, Let us say I have a function like this: def efficientFiller(file): worthless_list = [] pot_file = open(file,'r') pot_file_text = pot_file.readlines() for line in pot_file_text: if line.find("msgid") != -1: message_

Re: Last value of yield statement

2007-10-10 Thread Dustan
On Oct 10, 5:19 am, Shriphani <[EMAIL PROTECTED]> wrote: > Hello all, > > Let us say I have a function like this: > > def efficientFiller(file): Note that you are shadowing the built-in variable 'file' here. Better use 'filename', or something to that effect. > worthless_list = [] >

ANNOUNCE: omniORB 4.1.1 and omniORBpy 3.1

2007-10-10 Thread Duncan Grisby
I am pleased to announce that omniORB 4.1.1 and omniORBpy 3.1 are now available. omniORB is a robust, high performance CORBA implementation for C++; omniORBpy is a version for Python. You can download them in source and Windows binary forms from SourceForge: http://sourceforge.net/project/show

Re: Last value of yield statement

2007-10-10 Thread Shriphani
On Oct 10, 3:34 pm, Dustan <[EMAIL PROTECTED]> wrote: > On Oct 10, 5:19 am, Shriphani <[EMAIL PROTECTED]> wrote: > > > Hello all, > > > Let us say I have a function like this: > > > def efficientFiller(file): > > Note that you are shadowing the built-in variable 'file' here. Better > use 'filename'

Re: Mixing Python and C classes in a module

2007-10-10 Thread John Machin
On 10/10/2007 1:02 PM, [EMAIL PROTECTED] wrote: > > It is easier to do it the other way around. > Create module.py and _module.so and in module.py write: > > from _module.so import * It is even easier to type from _module import * and somewhat more productive, too :-) -- http://mail.pyt

Re: struct.unpack less than 1 byte

2007-10-10 Thread John Machin
On Oct 10, 8:15 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > 2007/10/10, cprogrammer <[EMAIL PROTECTED]>: > > i need to read from a file a struct like this [1byte, 12bits, 12bits] > > reading 1 byte or more is not a problem ... but the 12 bits values > > are ... > > 12bits, 12bits == 3 byes a

Re: struct.unpack less than 1 byte

2007-10-10 Thread Michal Bozon
You are able to read single bits from file in C ? You'll have to read the bytes and than perform some bitwise operations on them to extract the bits > hello all, > > i need to read from a file a struct like this [1byte, 12bits, 12bits] > reading 1 byte or more is not a problem ... but the 12 bit

Re: The fundamental concept of continuations

2007-10-10 Thread David Kastrup
[EMAIL PROTECTED] writes: > Again I am depressed to encounter a fundamentally new concept that I > was all along unheard of. Its not even in paul graham's book where i > learnt part of Lisp. Its in Marc Feeley's video. > > Can anyone explain: > > (1) its origin > (2) its syntax and semantics in em

Re: unpickle from URL problem

2007-10-10 Thread Jean-Paul Calderone
On Wed, 10 Oct 2007 05:58:51 GMT, Alan Isaac <[EMAIL PROTECTED]> wrote: >I am on a Windows box. > >I pickle a tuple of 2 simple objects with the pickle module. >It pickles fine. It unpickles fine. > >I upload to a server. >I try to unpickle from the URL. No luck. Try it: >x1, x2 = >pickle.load(

Re: NUCULAR fielded text searchable indexing

2007-10-10 Thread Richie Hindle
[Paul] > tell us how the software compares to stuff like Lucene or Xapian. +1 -- Richie -- http://mail.python.org/mailman/listinfo/python-list

function wrappers

2007-10-10 Thread Ramon Crehuet
Dear all, I have a Fortran programming background and I have some difficulties in understading how function wrappers work. I have delved into the subject because of the new decorators, but I understand the decorator syntax. My ignorance is more profound... Here is an example without decorators:

Re: Last value of yield statement

2007-10-10 Thread Amit Khemka
On 10/10/07, Shriphani <[EMAIL PROTECTED]> wrote: > On Oct 10, 3:34 pm, Dustan <[EMAIL PROTECTED]> wrote: > > On Oct 10, 5:19 am, Shriphani <[EMAIL PROTECTED]> wrote: > > > > > Hello all, > > > > > Let us say I have a function like this: > > > > > def efficientFiller(file): > > > > Note that you ar

Re: Last value of yield statement

2007-10-10 Thread John Machin
On 10/10/2007 8:19 PM, Shriphani wrote: > Hello all, > > Let us say I have a function like this: > > def efficientFiller(file): > worthless_list = [] > pot_file = open(file,'r') > pot_file_text = pot_file.readlines() > for line in pot_file_text: > i

Re: pyxml package not working? No xml.dom.ext.reader module available after install.

2007-10-10 Thread Stefan Behnel
Thomas W wrote: > On 10 Okt, 11:13, Stefan Behnel <[EMAIL PROTECTED]> wrote: >> Thomas W wrote: >>> I've tried to install the pyxml-package, available >>> athttp://pyxml.sourceforge.net/, >>> both from source and using some hack on the win32-binary package >>> available for python2.4, but without

setup.py build & SWIG: missing py files (they are outside the build directory)

2007-10-10 Thread mauro
Hi all, I am trying to make a package distribution containing some extension module written in C. The problem is that when I run setup.py some files are generated in the wrong position. Suppose that this is my setup.py: from distutils.core import setup, Extension setup(name='foo', package

Re: Last value of yield statement

2007-10-10 Thread Shriphani
On Oct 10, 4:05 pm, John Machin <[EMAIL PROTECTED]> wrote: > On 10/10/2007 8:19 PM, Shriphani wrote: > > > > > Hello all, > > > Let us say I have a function like this: > > > def efficientFiller(file): > > worthless_list = [] > > pot_file = open(file,'r') > > pot_file_text =

Re: function wrappers

2007-10-10 Thread Marc 'BlackJack' Rintsch
On Wed, 10 Oct 2007 12:39:24 +0200, Ramon Crehuet wrote: > def require_int(func): >def wrapper(arg): >assert isinstance(arg, int) >return func(arg) >return wrapper > p1(a): >print a > > p2=require_int(p1) > > My question is: why do p2 arguments become

Re: Last value of yield statement

2007-10-10 Thread Paul Hankin
On Oct 10, 11:19 am, Shriphani <[EMAIL PROTECTED]> wrote: > Hello all, > > Let us say I have a function like this: > > def efficientFiller(file): > worthless_list = [] > pot_file = open(file,'r') > pot_file_text = pot_file.readlines() > for line in pot_file_text: >

Autoglade

2007-10-10 Thread Diego Torres Milano
I've been working on a python based tool named autoglade that could be of help to simplify application development using glade as the interface designer. There is a lot of room for improvement but it's pretty usable right now. You can download autoglade from http://sourceforge.net/projects/autogla

Re: function wrappers

2007-10-10 Thread Paul Hankin
On Oct 10, 11:39 am, Ramon Crehuet <[EMAIL PROTECTED]> wrote: > Dear all, > I have a Fortran programming background and I have some difficulties in > understading how function wrappers work. I have delved into the subject > because of the new decorators, but I understand the decorator syntax. My >

Re: Exceptions: Logging TB and local variables?

2007-10-10 Thread Larry Bates
allen.fowler wrote: > Hi, > > My code looks like this: > > for item in bigset: > self.__sub1(item) > self.__sub2(item) > self.__sub3(item) > > # the subX functions, in turn, use various 3rd party modules. > > > Now, I would like to do this: > > for item in bigset: > try: > self.__

Re: function wrappers

2007-10-10 Thread Scott David Daniels
Ramon Crehuet wrote: > def require_int(func): > def wrapper(arg): > assert isinstance(arg, int) > return func(arg) > return wrapper > def p1(a): > print a > p2 = require_int(p1) > > My question is: why do p2 arguments become wrapper arguments? What is > the flux

Re: Yet another comparison of Python Web Frameworks

2007-10-10 Thread GHUM
Michele, > At work we are shopping for a Web framework, so I have been looking at > the available options on the current market. just because you were involved in creating an own version of Python does NOT free you from the social obligation to create your own Python web framework. So stop shoppi

Re: Singleton

2007-10-10 Thread Carl Banks
On Oct 10, 5:36 am, [EMAIL PROTECTED] wrote: > Hi, > > I've been trying to get some sort of singleton working in python, but > I struggle a bit and I thought I'd ask for advice. > > The first approach was simply to use a module, and every variable in > it will be seen by all who import the module.

cannot create python packages

2007-10-10 Thread Konstantinos Pachopoulos
Hi, i have the following files: current_dir/level1/Called.py current_dir/Caller.py Called.py: --- class Called: def exec1(self): print "Hello" Caller.py: -- from level1.Called import * c=Called() c.exec1() However it is impossible for Caller.py to find Called.py. I

Re: cannot create python packages

2007-10-10 Thread Rafael Sachetto
Try to put a empty file named __init__.py on current_dir/level1/On 10/10/07, Konstantinos Pachopoulos <[EMAIL PROTECTED]> wrote: > > Hi, > i have the following files: > current_dir/level1/Called.py > current_dir/Caller.py > > > Called.py: > --- > class Called: >def exec1(self): > p

Python on embedded system

2007-10-10 Thread Michael Trimarchi
hi, I'd like to reduce python and just compile this modules: Modulo 59 Nota Tecnica Rev.2 Data 01/03 _main_ _buildin_ marshal imp sys os float

Re: Unexpected behaviour with HTMLParser...

2007-10-10 Thread Andrew Durdin
On 10/9/07, Just Another Victim of the Ambient Morality <[EMAIL PROTECTED]> wrote: > > "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > > Without code, that's hard to determine. But you are aware of e.g. > > > > handle_entityref(name) > > handle_charref(ref) >

Re: Singleton

2007-10-10 Thread OnCallSupport321
Spring Python (http://springpython.python-hosting.com) offers a singleton solution. You can mark up function calls to only be called the first time, i.e. as singletons. The results are cached inside the Spring Python IoC container, so the next time the function is called, it returns the cached copy

Re: Singleton

2007-10-10 Thread Carl Banks
On Oct 10, 9:34 am, [EMAIL PROTECTED] wrote: > Spring Python (http://springpython.python-hosting.com) offers a [snip spam] Too bad your bot can't be bothered to read the post it would have known the singleton wasn't the problem here. Carl Banks -- http://mail.python.org/mailman/listinfo/pytho

Re: Jython import coventions

2007-10-10 Thread OnCallSupport321
On Oct 9, 10:42 pm, Benjamin <[EMAIL PROTECTED]> wrote: > When importing Java packages in Jython, what is the convention to > simplify imports? For example: > import java.util as util > Is this correct? Or should I use from * import *? I have preferred the style... import java import javax ...an

Re: Singleton

2007-10-10 Thread Steven D'Aprano
On Wed, 10 Oct 2007 09:36:56 +, pythoncurious wrote: > So how do people solve this? Is there an obvious way that I missed? Mostly by avoiding singletons. Why do you need only one instance? Perhaps you should consider the Borg pattern instead. http://aspn.activestate.com/ASPN/Cookbook/Python

Re: cannot create python packages

2007-10-10 Thread mauro
On 10 Ott, 15:01, Konstantinos Pachopoulos <[EMAIL PROTECTED]> wrote: > Hi, > i have the following files: > current_dir/level1/Called.py > current_dir/Caller.py > > Called.py: > --- > class Called: >def exec1(self): > print "Hello" > > Caller.py: > -- > from level1.Called i

Re: NUCULAR fielded text searchable indexing

2007-10-10 Thread aaron . watters
On Oct 10, 6:05 am, Paul Boddie <[EMAIL PROTECTED]> wrote: > On 9 Okt, 22:32, [EMAIL PROTECTED] wrote: > ...tell us how the [ http://nucular.sourceforge.net ] > software compares to stuff like Lucene or Xapian... I wish I could, honestly. I've looked briefly into trying to put together some sort

Re: Yet another comparison of Python Web Frameworks

2007-10-10 Thread Istvan Albert
On Oct 9, 11:57 pm, [EMAIL PROTECTED] wrote: > Since you are starting a new project you may want to look into > something new and different > > http://mdp.cti.depaul.edu/examples This is actually a neat framework! I'm a somewhat of fan of web- frameworks and I used most major ones and I like to po

Re: Symbolic Link

2007-10-10 Thread samwyse
On Sep 9, 10:05 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED] central.gen.new_zealand> wrote: > In message <[EMAIL PROTECTED]>,samwysewrote: > > > A hard-link, OTOH, allows > > direct access to the contents of a file, as long as it is on the same > > filesystem. No extra steps are required, so the pr

Re: Singleton

2007-10-10 Thread Carl Banks
On Oct 10, 9:39 am, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Wed, 10 Oct 2007 09:36:56 +, pythoncurious wrote: > > So how do people solve this? Is there an obvious way that I missed? > > Mostly by avoiding singletons. Why do you need only one instance? Perhaps > you sh

Re: struct.unpack less than 1 byte

2007-10-10 Thread Stargaming
On Wed, 10 Oct 2007 03:42:15 -0700, John Machin wrote: > On Oct 10, 8:15 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: >> 2007/10/10, cprogrammer <[EMAIL PROTECTED]>: >> > i need to read from a file a struct like this [1byte, 12bits, 12bits] >> > reading 1 byte or more is not a problem ... but t

Re: Singleton

2007-10-10 Thread Hrvoje Niksic
[EMAIL PROTECTED] writes: > Now when I run the 'run.py', it will print two different numbers. > sys.modules tells me that 'mod1' is imported as both 'one.mod1' and > 'mod1', which explains the result. If I were you, I'd make sure that the module duplicate problem is resolved first, for example by

Building Binary Packages

2007-10-10 Thread kyosohma
I am trying to figure out how to build binaries for Python packages and I've done it with MinGW. However, in my research, I've noticed that some of the programmers out there think that you should use the compiler that is used to compile the official Python distributions, which appears to be Visual

Version specific or not?

2007-10-10 Thread Steven W. Orr
We have an app and I'm trying to decide where the app should be installed. The question is whether it should be site-specific or not, as in /usr/lib/python2.3/site-packages or /usr/lib/site-python The latter would solve a lot of problems for me. In the case of emacs, most stuff seems to go int

Re: Problem of Readability of Python

2007-10-10 Thread Licheng Fang
On Oct 8, 4:24 am, [EMAIL PROTECTED] (Alex Martelli) wrote: > Licheng Fang <[EMAIL PROTECTED]> wrote: > >... > > > Python Tutorial says an empty class can be used to do this. But if > > namespaces are implemented as dicts, wouldn't it incur much overhead > > if one defines empty classes as such

Re: Fwd: NUCULAR fielded text searchable indexing

2007-10-10 Thread Grant Edwards
On 2007-10-09, Bill Hamilton <[EMAIL PROTECTED]> wrote: > On 10/9/07, Grant Edwards <[EMAIL PROTECTED]> wrote: >> On 2007-10-09, Robin Becker <[EMAIL PROTECTED]> wrote: >> > [EMAIL PROTECTED] wrote: >> >> On Oct 9, 8:46 am, Istvan Albert <[EMAIL PROTECTED]> wrote: >> >>> ps. there is a python proje

Re: Yet another comparison of Python Web Frameworks

2007-10-10 Thread Michele Simionato
On Oct 10, 5:57 am, [EMAIL PROTECTED] wrote: > Since you are starting a new project you may want to look into > something new and different > > http://mdp.cti.depaul.edu/examples Requiring Python 2.5 may not be a good idea for the time being. For instance, I am forced to use Python 2.4 because of

ANN: Pyrex 0.9.6.2

2007-10-10 Thread Greg Ewing
Pyrex 0.9.6.2 is now available: http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/ Another couple of minor fixes. What is Pyrex? -- Pyrex is a language for writing Python extension modules. It lets you freely mix operations on Python and C data, with all Python reference count

RE: Fwd: NUCULAR fielded text searchable indexing

2007-10-10 Thread Michael . Coll-Barth
> From: Grant Edwards > > Anyway, I apologize for my attempt at humor, since it appears > to have somehow offended. Why apologize? If someone doesn't like the name given to a piece of software by its author(s), screw them. If I find the software useful, I'll use it. Even if its called 'bounci

multimethods decorator

2007-10-10 Thread Gerardo Herzig
Hi all. Im reading the Gido's aproach using decorators at http://www.artima.com/weblogs/viewpost.jsp?thread=101605 It looks good to me, but the examples shows the functionality using functions. Now, when i try to give this decorator into a method, if i try the class test(object): @multimetho

a good website for softwares,movies and music etc.

2007-10-10 Thread panguohua
www.space666.com a good website for softwares,movies and music,sex etc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Singleton

2007-10-10 Thread Steven D'Aprano
On Wed, 10 Oct 2007 06:57:15 -0700, Carl Banks wrote: > On Oct 10, 9:39 am, Steven D'Aprano <[EMAIL PROTECTED] > cybersource.com.au> wrote: >> On Wed, 10 Oct 2007 09:36:56 +, pythoncurious wrote: >> > So how do people solve this? Is there an obvious way that I missed? >> >> Mostly by avoiding

Re: unpickle from URL problem

2007-10-10 Thread Alan Isaac
Marc 'BlackJack' Rintsch wrote: > Pickles are *binary* files, not text files Actually not: http://docs.python.org/lib/node316.html These were created with protocol 0. But my question is about the different outcomes I observed. Thank you, Alan Isaac -- http://mail.python.org/mailman/listinfo/py

Re: unpickle from URL problem

2007-10-10 Thread Alan Isaac
Jean-Paul Calderone wrote: > You shouldn't unpickle things you get from the network, since pickle can > execute arbitrary code: http://jcalderone.livejournal.com/15864.html Yes, but I have my reasons. (This is not library code: I just want students to all be using the same objects for an exercise

Re: Singleton

2007-10-10 Thread Diez B. Roggisch
Steven D'Aprano wrote: > On Wed, 10 Oct 2007 06:57:15 -0700, Carl Banks wrote: > >> On Oct 10, 9:39 am, Steven D'Aprano <[EMAIL PROTECTED] >> cybersource.com.au> wrote: >>> On Wed, 10 Oct 2007 09:36:56 +, pythoncurious wrote: >>> > So how do people solve this? Is there an obvious way that I m

How do I make urllib2 preserve case in HTTP header names?

2007-10-10 Thread tepples
The HTTP specification, RFC 2616, states that field names in HTTP headers are case insensitive. But I'm trying to use Python 2.5.1's urllib2 to interact with a web service offered by Amazon.com, which deviates from the HTTP spec in that it requires use of case-sensitive header names ReportName, Re

Re: unpickle from URL problem

2007-10-10 Thread Hrvoje Niksic
Alan Isaac <[EMAIL PROTECTED]> writes: > I upload to a server. > I try to unpickle from the URL. No luck. Try it: > x1, x2 = > pickle.load(urllib.urlopen('http://www.american.edu/econ/notes/hw/example1')) > > I change the filetype to unix. I upload again. > I try to unpickle from the URL. Now

Re: [ANN] Data Plotting Library DISLIN 9.2

2007-10-10 Thread M�ta-MCI (MVP)
Thanks! I play with this library, for fun ; with success. -- http://mail.python.org/mailman/listinfo/python-list

Re: why did MIT drop scheme for python in intro to computing?

2007-10-10 Thread Ashish Hanwadikar
"Grant Edwards" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 2007-10-09, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> Does scheme have a gui library? > > Yes. It had a far, far better Tk binding than Python. > > http://kaolin.unice.fr/STk/ > > I've used both for real-wor

Re: unit testing

2007-10-10 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: > I maintain old code... code written a long time ago, before unittest > was popular. Getting unittest to work on that is difficult at best. Writing unit tests for lots of old code is not the most funny thing you can imagine... For situations like that, it might be much b

Re: Problem of Readability of Python

2007-10-10 Thread Kevin
Am I missing something, or am I the only one who explicitly declares structs in python? For example: FileObject = { "filename" : None, "path" : None, } fobj = FileObject.copy() fobj["filename"] = "passwd" fobj["path"] = "/etc/" Kevin Kelley On 10/7/07, Licheng Fang <[EMAIL PROTECTED

Re: Yet another comparison of Python Web Frameworks

2007-10-10 Thread Kay Schluehr
On Oct 10, 5:57 am, [EMAIL PROTECTED] wrote: > Since you are starting a new project you may want to look into > something new and different > > http://mdp.cti.depaul.edu/examples The delivered sourcecode is syntactically broken. Tabs and whitespaces were mixed and when I open a file like gluon/glo

EasyMock for python ?

2007-10-10 Thread BlueBird
Hi, Does anybody know where to find a library like EasyMock for python ? I searched quickly but could not find anything. I found python-mocks on sourceforge but form quickly reading the docs, it is not an EasyMock style mock. Actually, according to http://martinfowler.com/articles/mocksArent

Re: Singleton

2007-10-10 Thread Carl Banks
On Oct 10, 11:18 am, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > Of course, if there is some other meaning to the OP's post, then possibly > I've completely misunderstood it. Would you mind telling me what you've > seen that the rest of us haven't? I read far enough to see that

Re: Building Binary Packages

2007-10-10 Thread Jim B. Wilson
On Wed, 10 Oct 2007 14:35:35 +, kyosohma wrote: > I am trying to figure out how to build binaries for Python packages and > I've done it with MinGW. Apparently, you still can: http://tinyurl.com/yb4bps -- http://mail.python.org/mailman/listinfo/python-list

Re: unpickle from URL problem

2007-10-10 Thread Alan Isaac
Hrvoje Niksic wrote: > The first upload breaks the file. You uploaded it in (presumably > FTP's) text mode, which changes \n -> \r\n. But you download it using > http, which specifies no such conversion in the opposite direction. No: I used binary upload both time. (Unless my ftp client is broke

Re: [Tutor] matching a street address with regular expressions

2007-10-10 Thread Shawn Milochik
On 10/4/07, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > Christopher Spears wrote: > > One of the exercises in Core Python Programming is to > > create a regular expression that will match a street > > address. Here is one of my attempts. > > > street = "1180 Bordeaux Drive" > patt = "\d+

Re: unpickle from URL problem

2007-10-10 Thread Marc 'BlackJack' Rintsch
On Wed, 10 Oct 2007 15:21:06 +, Alan Isaac wrote: > Marc 'BlackJack' Rintsch wrote: >> Pickles are *binary* files, not text files > > Actually not: > http://docs.python.org/lib/node316.html > > These were created with protocol 0. Actually yes, the docs are wrong. It's a binary file with by

Re: multimethods decorator

2007-10-10 Thread Bruno Desthuilliers
Gerardo Herzig a écrit : > Hi all. Im reading the Gido's aproach using decorators at > http://www.artima.com/weblogs/viewpost.jsp?thread=101605 > > It looks good to me, but the examples shows the functionality using > functions. > Now, when i try to give this decorator into a method, if i try the

Re: M2Crypto possible intermittent bug

2007-10-10 Thread John Nagle
John Nagle wrote: > I just "upgraded" from M2Crypto 0.17 to M2Crypto 0.18, and I'm > running my regression tests. I'm seeing occasional cases where > M2Crypto raises the exception SSL.SSLError, and the associated > error is "(0, 'Error')", which is the bogus error you get if you feed 0 to > "per

Re: function wrappers

2007-10-10 Thread Bruno Desthuilliers
Scott David Daniels a écrit : > Ramon Crehuet wrote: >> def require_int(func): >> def wrapper(arg): >> assert isinstance(arg, int) >> return func(arg) >> return wrapper >> def p1(a): >> print a >> p2 = require_int(p1) >> >> My question is: why do p2 arguments becom

Is hostmonster any good for hosting python?

2007-10-10 Thread walterbyrd
According to hostmonster's list of features, they do support python. Does anybody have any experience with hostmonster? -- http://mail.python.org/mailman/listinfo/python-list

FastCGI on Windows: socket.fromfd() support?

2007-10-10 Thread Drew
Microsoft's IIS server recently added native support for FastCGI. The big roadblock to Python support seems to be that socket.fromfd() doesn't work on Windows. Are there any plans to add this or similar functionality to the Windows build? Thanks, Drew -- http://mail.python.org/mailman/listinfo/

Re: Problem of Readability of Python

2007-10-10 Thread Steven Bethard
Kevin wrote: > Am I missing something, or am I the only one who explicitly declares > structs in python? > > For example: > FileObject = { > "filename" : None, > "path" : None, > } > > fobj = FileObject.copy() > fobj["filename"] = "passwd" > fobj["path"] = "/etc/" Yes, I think this i

Re: Yet another comparison of Python Web Frameworks

2007-10-10 Thread Peter Otten
Kay Schluehr wrote: >> http://mdp.cti.depaul.edu/examples > > The delivered sourcecode is syntactically broken. Tabs and whitespaces > were mixed and when I open a file like gluon/global.py I find sections > like this: > > class Request(Storage): > """ > defines the request object and th

Re: Problem of Readability of Python

2007-10-10 Thread Joe Riopel
On 10/10/07, Kevin <[EMAIL PROTECTED]> wrote: > Am I missing something, or am I the only one who explicitly declares > structs in python? > For example: > FileObject = { > "filename" : None, > "path" : None, > } > > fobj = FileObject.copy() > fobj["filename"] = "passwd" > fobj["path"] =

Re: Fwd: NUCULAR fielded text searchable indexing

2007-10-10 Thread George Sakkis
On Oct 10, 11:08 am, [EMAIL PROTECTED] wrote: > Why apologize? If someone doesn't like the name given to a piece of > software by its author(s), screw them. If I find the software useful, > I'll use it. Even if its called 'bouncingBetty'. Or 'BeautifulSoup' for that matter ;-) George -- htt

Re: Problem with argument parsing

2007-10-10 Thread Steven Bethard
Diez B. Roggisch wrote: > lgwe wrote: > >> On 9 Okt, 17:18, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >>> lgwe wrote: I have a python-script: myscript, used to start a program on another computer and I use OptionParser in optpars. I use it like this: myscript -H host arg1 -x -y

Re: Building Binary Packages

2007-10-10 Thread kyosohma
On Oct 10, 11:53 am, "Jim B. Wilson" <[EMAIL PROTECTED]> wrote: > On Wed, 10 Oct 2007 14:35:35 +, kyosohma wrote: > > I am trying to figure out how to build binaries for Python packages and > > I've done it with MinGW. > > Apparently, you still can:http://tinyurl.com/yb4bps That's a wealth of

www.yedil.com best hindi entertainment site

2007-10-10 Thread diprat7
www.yedil.com best hindi entertainment site with vidoes,photo sharing,photo rating features its really gona rock you www.yedil.com -- http://mail.python.org/mailman/listinfo/python-list

Plugins / Modularity

2007-10-10 Thread Robin Kåveland
Hi there. I'm basically in the process of writing my first substantial application in Python, and I've made a couple of (I'd like to say) design decisions so it won't just be a jumble. So, I've divided my program into three sub-packages, core, plugins and utilities. The core will be needed for the

Pythonic way for handling file errors

2007-10-10 Thread wink
Hello, I would like to know what would be considered the most Pythonic way of handling errors when dealing with files, solutions that seem reasonable using 2.5: --- try: f = open('afile', 'r') content = f.read() error = 200 except Exception: error = 404 finally: if locals().has

Re: Plugins / Modularity

2007-10-10 Thread Robin Kåveland
On Oct 10, 8:38 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Oct 10, 12:30 pm, Robin Kåveland <[EMAIL PROTECTED]> wrote: > > > > > Hi there. I'm basically in the process of writing my first substantial > > application in Python, and I've made a couple of (I'd like to say) > > design deci

how to rerun a function after edit it?

2007-10-10 Thread wang frank
Hi, I am looking for a way to rerun functions after I changed them. This is very critical during the development stage. Currently I have to quit python and restart the python to run the functions. I found the reload function. But it needs the module name. In my case, I import the module using

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-10 Thread JernauEmGurgeh
On 10 Oct, 02:05, [EMAIL PROTECTED] wrote: > Do not bluntly contradict me in public. 2 + 2 = 5 -- http://mail.python.org/mailman/listinfo/python-list

Re: Plugins / Modularity

2007-10-10 Thread [EMAIL PROTECTED]
On Oct 10, 12:30 pm, Robin Kåveland <[EMAIL PROTECTED]> wrote: > Hi there. I'm basically in the process of writing my first substantial > application in Python, and I've made a couple of (I'd like to say) > design decisions so it won't just be a jumble. So, I've divided my > program into three sub-

How can Python print the value of an attribute but complain it does not exist?

2007-10-10 Thread Emre Sevinc
Hello, I'm a Python newbie and I'm having a strange trouble with the following code: generatefeedvector-debug.py === import feedparser import re def getwordcounts(url): # Parse the feed d = feedparser.parse(url) wc = {}

  1   2   3   >