Re: ANN: Dao, the official 1.0 version is released

2009-03-06 Thread Daniel Fetchinson
r hostility towards people who write a new >> programming language, > > I did not see any such thing. The mild hostility was directed at the > act of blind spamming, which we have had more than enough of. Well, there are lots of OT postings but in my estimation those that men

Re: ANN: Dao, the official 1.0 version is released

2009-03-06 Thread Daniel Fetchinson
No need for any hatred or hostility towards people who write a new programming language, I bet many people on this list are interested in this kind of stuff. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

[mod_python] Knowing the encoding of the URI

2009-03-03 Thread Daniel Chiaramello
the is coded? Is there a better way to determine the encoding? I noticed the "content_encoding" member of the request, but it is always set to None... Thanks for your attention, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: starting a Python 2.5 executable without the DOS window

2009-02-27 Thread Daniel
On Feb 27, 8:19 am, Vlastimil Brom wrote: > >> 2009/2/27 Greg Miller : > >> > I am working on a program that controls a piece of equipment.  The GUI/ > >> > control software is written with Python2.5/wxPython.  I would like to > >> > know if there is a way of starting the GUI without the DOS windo

Re: Easier to wrap C or C++ libraries?

2009-02-13 Thread Daniel Fetchinson
also be staightforward... Are there many pitfalls when > having to map C++'s notion of OO to Python? There is no question about it in my mind that wrapping C is easier. Reason being that python is written in C and not C++. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepr

Re: where is handle_timeout in SocketServer

2009-02-11 Thread Daniel
On Feb 11, 4:01 pm, Daniel wrote: > I've just been reading the docs to help me with a SocketServer issue. > I found in the docs (http://docs.python.org/library/socketserver.html) > a reference to a member attribute timeout and a member function > handle_timeout() is made.  I am

where is handle_timeout in SocketServer

2009-02-11 Thread Daniel
I've just been reading the docs to help me with a SocketServer issue. I found in the docs (http://docs.python.org/library/socketserver.html) a reference to a member attribute timeout and a member function handle_timeout() is made. I am using python 2.5 and there's no indication that these were add

Re: "Super()" confusion

2009-02-10 Thread Daniel Fetchinson
t; and J.K.'s articles. Last time I checked (perhaps one or two years ago), > the "harmful" article was almost the only relevant source of info about > super(). > > [1] > http://groups.google.com/group/comp.lang.python/search?q=super+harmful&start=0&scoring=d&; > [2] http://www.google.com/search?q=python+super Okay, I think we converged to a common denominator. I agree with you that the documentation needs additions about super and I also agree with you that referring to both MS and JK articles is appropriate when a question about super comes up. It's good to have a discussion when views actually converge and not diverge at the end :) Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: "Super()" confusion

2009-02-10 Thread Daniel Fetchinson
> Consider whether you really need to use super(). > > http://fuhm.net/super-harmful/ Did you actually read that article, understood it, went through the tons of responses from python-dev team members, including Guido > > "Tons" of responses? This was mentioned already, bu

Re: "Super()" confusion

2009-02-10 Thread Daniel Fetchinson
On 2/9/09, Gabriel Genellina wrote: > En Mon, 09 Feb 2009 23:34:05 -0200, Daniel Fetchinson > escribió: > >>>>>> Hello. I've been scouring the web looking for something to clear up a >>>>>> little confusion about the use of "super()"

python-list

2009-02-09 Thread Daniel Zhou
python-list -- http://mail.python.org/mailman/listinfo/python-list

Re: "Super()" confusion

2009-02-09 Thread Daniel Fetchinson
to learn to use super. It will certainly not be helpful to anyone trying to learn the usage of super. The person who wrote that essay is simply misunderstanding the concept, as has been explained countless times by the python dev team. Hence, it only increases confusion, adds to the noise and sprea

Re: "Super()" confusion

2009-02-09 Thread Daniel Fetchinson
s still alive, it grew to be a mature internet meme like the dancing hamster or star wars kid :) See (among tons of other writings): http://mail.python.org/pipermail/python-dev/2005-January/thread.html Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I say "two classes up in the inheritance chain" in python?

2009-01-27 Thread Daniel Fetchinson
e solution is quite simple : just define it outside the class > statements, and adds it afterward: > > def do_something_children(self): > # code here > > class Child1(Parent1): > # code here > > Child1.do_something = do_something_children > > class Chi

How do I say "two classes up in the inheritance chain" in python?

2009-01-26 Thread Daniel Fetchinson
uch a way that it works in both child1 and child2 and bypasses both parent1 and parent2. How would I do that? Notes: (1) of course child1 and child2 have all sorts of methods which are different, only meth is almost the same. (2) I can't modify the grandfather class. Cheers, Daniel -- Psss,

logging multiple messages

2009-01-15 Thread Daniel
I was fighting with a problem all day that was producing multiple messages in my logging output. The problem was related to the fact that I was defining logging handlers multiple times. I found the following posting from a few years ago that related to my problem: http://groups.google.com/group/

Re: python3.0 MySQLdb

2009-01-14 Thread Daniel Fetchinson
> Daniel> Well, this actually is the case: MySql has not been ported. As > Daniel> far as I can see the mysql python module in general (meaning for > Daniel> the 2.x branch) is not as well maintained as some others and > Daniel> questions about windows vs. l

Re: python3.0 MySQLdb

2009-01-14 Thread Daniel Fetchinson
u" > > So the final questions was, is there anything els on the menu besides > PostgreSQL, like MySql for example ? If not I will take PostgreSQL > please. The 3.x branch just as the 2.x branch contains bindings to sqlite. This you can use from day 1, the 3.0 release contains it. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: os system command not found

2009-01-14 Thread Daniel da Silva
On Jan 14, 5:25 am, codicedave wrote: > Hi all! > I installed a external program called infomap using the classical > procedure > > ./configure > make > sudo make install > >  and it works perfectly in Terminal (Os x) using both bash and tcsh > shell > > admins-macbook-pro-2:~ unil$ infomap-build

Re: python3.0 MySQLdb

2009-01-13 Thread Daniel Fetchinson
P. Exactly. One could think about 3-4 different potentially useful answers to the OP but when one sees 3-4 immediately right after reading the post then probably there are a couple more still after some thinking. So if the OP specifies exactly what he/she wants, he/she will get more signal

Re: python3.0 MySQLdb

2009-01-12 Thread Daniel Fetchinson
> I need something to connect to a database, preferably mysql, that > works in python3.0 please. And your question is? -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL on 3.x?

2008-12-31 Thread Daniel Fetchinson
> Does anyone know if PIL will be ported to the 3.x branch? Actually, Guilherme Polo has ported PIL 1.1.6 to python 3.0: http://mail.python.org/pipermail/image-sig/2008-December/005338.html Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- h

Re: C API: array of floats/ints from python to C and back

2008-12-27 Thread Daniel Fetchinson
return NULL; > nitems = nbytes/sizeof(long); > for (i=0; i/* do something with vec[i] */ > } > return ret; > } > > From Python you can get "vec" and "nitems" using the buffer_info() method > of array objects. Thanks very much, this was very helpful! Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: C API: array of floats/ints from python to C and back

2008-12-27 Thread Daniel Fetchinson
e free to use whatever structure you > feel adequate. > > Once the list/tuple is created and filled, there is no speed difference > accessing the individual items. Creating an empty list that grows one > element at a time is slow for large lists (the memory block has to be > re-allocated and copied over evry time it gets full) but this doesn't > happen if you provide the final size when creating the list. All right, this is clear then too, I'll probably use a list. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: C API: array of floats/ints from python to C and back

2008-12-27 Thread Daniel Fetchinson
and even easier - the C code gets a pointer to an array > of integers, as usual). I looked for this in the C API docs but couldn't find anything on how to make an array.array python object appear as a pointer to integers (or floats, etc) in C code. On http://docs.python.org/c-api/concrete.html#sequence-objects There is only list and tuple or maybe you mean byte array? That has only been introduced in python 2.6 and I'm working on 2.5. Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: C API: array of floats/ints from python to C and back

2008-12-27 Thread Daniel Fetchinson
must be an array of ints"); > goto fail; > } Yes, the dependency on numpy is my main concern. If it will help with my problem I don't mind the dependency actually, so I'll do more detailed benchmarks first. Thank you, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: C API: array of floats/ints from python to C and back

2008-12-27 Thread Daniel Fetchinson
nd PyErr_Occurred() > is true) > To fill the resulting tuple, use PyTuple_SET_ITEM instead. BTW, why return > a tuple and not a list? No particular reason, other than the fact that I won't need to modify these lists/tuples from python so whenever something will not change, I use a tuple because it's immutable. Or this is not a very good practice? There is no difference between lists and tuples in terms of speed I suppose (getitem, setitem, etc). Thanks a lot, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: C API: array of floats/ints from python to C and back

2008-12-27 Thread Daniel Fetchinson
On 12/27/08, Robert Kern wrote: > Daniel Fetchinson wrote: > >> I agree that array.array is more efficient than a list but the input >> for my function will come from PIL and PIL returns a list. So I have a >> list to begin with which will be passed to the C function. >

Re: C API: array of floats/ints from python to C and back

2008-12-27 Thread Daniel Fetchinson
y.array to C anyway I don't see any advantage to (1) although (2) can be useful. Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: C API: array of floats/ints from python to C and back

2008-12-27 Thread Daniel Fetchinson
to an array.array and passing that to the C function doesn't make any difference in terms of speed since the operation itself will be done in the C function anyway. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: C API: array of floats/ints from python to C and back

2008-12-27 Thread Daniel Fetchinson
ys that would be too slow using array.array and numpy.array (I've verified this claim by benchmarking a numpy.array based solution). > I'd just use numpy, myself: > import numpy > total = numpy.array([1, 2, 3]) + numpy.array([2, 3, 4]) What makes you think I want to add two arr

C API: array of floats/ints from python to C and back

2008-12-27 Thread Daniel Fetchinson
s is a frequent operation I'd think there are some shortcuts, aren't there? Or what's the simplest way of doing this? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Easy-to-use Python GUI

2008-12-24 Thread Daniel Fetchinson
he GUI builder. Still, it's quite powerful, since it supports all the > common > GUI elements (text, group boxes, checkboxes, drop-down lists, text boxes, > buttons, etc.). This is about the level of sophistication I'm looking for. > > Anything like this for Python? How about the Tcl/Tk GUI that comes bundled with python? http://docs.python.org/library/tk.html Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Are Django/Turbogears too specific?

2008-12-22 Thread Daniel Fetchinson
d has been for years while the 2.x branch is in beta but will be released soon as a stable, production version. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL on 3.x?

2008-12-20 Thread Daniel Fetchinson
m the answers too. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python resources

2008-12-19 Thread Daniel Fetchinson
w.modpython.org/live/current/doc-html/pyapi-psp.html The spyce project you may also find helpful: http://spyce.sourceforge.net/ Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

PIL on 3.x?

2008-12-19 Thread Daniel Fetchinson
Does anyone know if PIL will be ported to the 3.x branch? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: something else instead of PIL?

2008-12-17 Thread Daniel Fetchinson
eventually. That's actually an interesting question. Does anybody know if PIL is being ported to 3.0? Are there such plans? Maybe even code? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

changing string encoding to different charset?

2008-12-14 Thread Daniel Woodhouse
Is it possible to re-encode a string to a different character set in python? To be more specific, I want to change a text file encoded in windows-1251 to UTF-8. I've tried using string.encode, but get the error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 0: ordinal not in

Re: 1 or 1/0 doesn't raise an exception

2008-12-13 Thread Daniel Fetchinson
>> Is it a feature that >> >> 1 or 1/0 >> >> returns 1 and doesn't raise a ZeroDivisionError? If so, what's the >> rationale? > > Yes, it's a feature: > > http://en.wikipedia.org/wiki/Short-circuit_evaluation > > When you have "True or False", you know it's true by the time > you've got the first p

1 or 1/0 doesn't raise an exception

2008-12-13 Thread Daniel Fetchinson
Is it a feature that 1 or 1/0 returns 1 and doesn't raise a ZeroDivisionError? If so, what's the rationale? -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: why doesn't pop/clear call __delitem__ on a dict?

2008-12-11 Thread Daniel Fetchinson
>> I just found out that if I want to have a custom dict it's not enough >> to overload __getitem__, __setitem__ and __delitem__ because, for >> example, pop and clear don't call __delitem__. I.e. an instance of the >> following will not print 'deleted' upon instance.pop( 'key' ): >> >> class mydic

why doesn't pop/clear call __delitem__ on a dict?

2008-12-10 Thread Daniel Fetchinson
print 'deleted' super( mydict, self ).__delitem__( key ) Why is this? There might other gotchas too I suppose. My intention is clear from the above, what other methods do I have to overload so that I get what I expect for all dict operations? Cheers, Daniel -- Psss, pss

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Daniel Fetchinson
> for (int i=0; i il += in[i] * in[i]; > il = 1.0 / sqrt(il); > for (int i=0; i out[i] = il * in[i]; > > Try computing the Fourier transform of: > > 0.007 + 0.01 I, -0.002 - 0.0024 I Funniest thread ever! Actual real money changing hands, did this happen ever in a newsgroup? Xah Lee rulez! Xah Lee for president! (No kidding, I like the guy.) Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: looking up function's doc in emacs

2008-12-10 Thread Daniel Fetchinson
-f functionName", and in php it's php.net/functionName. Both > of which i have a elisp command with a shortcut that let me jump to > the doc) Why can't you do the same with pydoc (the command line tool, ususally installed in /usr/local/bin/pydoc or somewhere else if python shipped w

Re: html codes

2008-12-09 Thread Daniel Fetchinson
x27;L\xc3\xb6blich \xc3\xa4hnlich \xc3\xbcblich' >>>> print _ > Löblich ähnlich üblich > > If you care about the encoding you have to encode/decode explicitly: > >>>> urllib.quote(u"Löblich ähnlich üblich".encode("latin1")) > 'L%F6bli

html codes

2008-12-08 Thread Daniel Fetchinson
script library uses stuff like '%3A' for the ':' for example. The conversion is here: http://www.ascii.cl/htmlcodes.htm Is there a python package/module/whatever that does the conversion for me or do I have to write a little wrapper myself (and introduce bugs while doing so :))?

Re: Guido's new method definition idea

2008-12-07 Thread Daniel Fetchinson
is having a less confusing >> situation for newbies > > Once again: how is adding "magical" syntax going to reduce confusion ? > >> (confusing the number of arguments to a method >> call). > > This is only confusing the first time. The correct solution to this > problem is IMHO to better document Python's object model, specially how > the descriptor protocol turns functions into methods. As I've said in another reply the argument that "def self.meth( arg )" is confusing because "self" doesn't exist in the current scope as an instance is convincing to me. So I no longer like the alternate syntax mentioned by Guido. Still, improved error messages would be desirable (concerning the number of arguments passed to an instance method). Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido's new method definition idea

2008-12-07 Thread Daniel Fetchinson
his context might be misconstrued as the class object and thus `def > self.foo` might be misunderstood (through the intuitive equivalence > you mention) as a defining a classmethod rather than an instance > method. This is actually a real counter argument, I think. Self, the instance, doesn't exist until it is created and certainly doesn't exist during class creation. So something like class C: def self.meth( arg ): return arg can be confusing since 'self' appears as if it was defined in the scope of C but clearly it isn't yet. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido's new method definition idea

2008-12-06 Thread Daniel Fetchinson
>> Hi folks, >> >> The story of the explicit self in method definitions has been >> discussed to death and we all know it will stay. However, Guido >> himself acknowledged that an alternative syntax makes perfect sense >> and having both (old and new) in a future version of python is a >> possibili

Re: Guido's new method definition idea

2008-12-06 Thread Daniel Fetchinson
> Bad idea having two ways to do this. Pick one or the other! Maybe only this alternative syntax for python 4000? -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido's new method definition idea

2008-12-06 Thread Daniel Fetchinson
>> Hi folks, >> >> The story of the explicit self in method definitions has been >> discussed to death and we all know it will stay. However, Guido >> himself acknowledged that an alternative syntax makes perfect sense >> and having both (old and new) in a future version of python is a >> possibili

Guido's new method definition idea

2008-12-05 Thread Daniel Fetchinson
compatible, and can be evolved into a PEP with a reference implementation without too much effort." shows that the proposal is viable. I'd like this new way of defining methods, what do you guys think? Anyone ready for writing a PEP? Cheers, Daniel -- Psss, psss, put it down! -

Re: RELEASED Python 3.0 final

2008-12-04 Thread Daniel Fetchinson
>> As you have probably guessed: nothing changed here. >> Also see:http://www.python.org/dev/peps/pep-0666/ > > What? Do you mean it's possible to mix tabs and spaces still? Why? Why not? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown --

Re: RELEASED Python 3.0 final

2008-12-03 Thread Daniel Fetchinson
; >> Linux fetch 2.6.23.1-42.fc8 #1 SMP Tue Oct 30 13:18:33 EDT 2007 x86_64 >> x86_64 x86_64 GNU/Linux >> >> tar xzvf Python-3.0.tgz >> cd Python-3.0 >> ./configure >> make >> >> Failed to find the necessary bits to build these modules: >> _tkinter

Re: RELEASED Python 3.0 final

2008-12-03 Thread Daniel Fetchinson
> [EMAIL PROTECTED] > Python 2.6/3.0 Release Manager > (on behalf of the entire python-dev team) uname -a Linux fetch 2.6.23.1-42.fc8 #1 SMP Tue Oct 30 13:18:33 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux tar xzvf Python-3.0.tgz cd Python-3.0 ./configure make Failed to find the necessary bits

Anyone heard of a good Voice Stress Analysis program

2008-11-25 Thread Daniel Folkes
Anyone heard of a good voice stress analysis program that was either: a) Written in python b) can be used by python? It would be a great help to me. Thanks, Dan Folkes http://danfolkes.com -- http://mail.python.org/mailman/listinfo/python-list

Re: how to acces the block inside of a context manager as sourcecode

2008-11-20 Thread Daniel
part of the report. Thank you for your ideas Daniel class CM( object ): def __enter__(self): self.startline= inspect.stack( )[ 1 ][ 0 ].f_lineno print 'startline',self.startline filename = inspect.stack( )[-1][1] def getIndentation(line):

Re: how to acces the block inside of a context manager as sourcecode

2008-11-19 Thread Daniel
umentation (it contains many parameters that need to be well documented), so I print the source code, cut it out and glue it into my lab notebook. Now I want to automate this process, i.e. the dataStore should print the sourcecode. Daniel > There isn't a solution in the general case, beca

Re: Python-URL! - weekly Python news and links (Nov 17)

2008-11-19 Thread Daniel Fetchinson
n this thread :-), I posted my response as > a reply to your most recent message in the "Official > definition of call-by-value..." thread. > -- > http://mail.python.org/mailman/listinfo/python-list And this thread has a good chance of becoming the "Longest and

how to acces the block inside of a context manager as sourcecode

2008-11-18 Thread Daniel
k.extract_stack() print f[0] def __enter__(self): pass def __exit__(self,type,value,traceback): if type is not None: print 'exception' pass Any ideas? Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Sync paramstyle between sqlite and mysql

2008-11-11 Thread Daniel
On Nov 10, 11:00 am, Daniel <[EMAIL PROTECTED]> wrote: > Hello, > > I'm developing an application that accesses both a MySQL and an SQLite > database.  I would like to have named parameters in my SQL and have > found the following: > > For MySQL my named p

Re: Remote control of firefox (mozilla) from a python program

2008-11-10 Thread Daniel
On Nov 10, 9:23 am, Scott <[EMAIL PROTECTED]> wrote: > I have a requirement to control a firefox web browser from an external > python program.  The python program running under linux from a command > shell needs to first find all open firefox web browser windows read > the URL currently displayed

Sync paramstyle between sqlite and mysql

2008-11-10 Thread Daniel
Hello, I'm developing an application that accesses both a MySQL and an SQLite database. I would like to have named parameters in my SQL and have found the following: For MySQL my named parameters need to look like this: %(paramname)s For SQLite my named parameters need to look like this: :paramn

Re: Django or TurboGears or Pylons? for python web framework.

2008-11-07 Thread Daniel Fetchinson
t. For the javascript library I would strongly recommend extjs: http://extjs.com/ It makes javascript work VERY easy including event handling, GUI building, ajax calls, etc, etc. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

(Windows) "Dropping" stuff onto a Python script

2008-11-06 Thread daniel . haude
Hello people, I'd like to have the functionality known from "real" executables that if I drag-drop a file icon on top of the app, the app starts and has the file's path as command-line argument. However, this doesn't seem to work with Python scripts because Windows sees those just as files, not a

Re: What's your choice when handle complicated C structures.

2008-11-04 Thread Daniel Fetchinson
res. > > What will be your choice when handling binary structures? I would write a couple of wrapper functions around unpack of struct so that the actual unpacking is less annoying but otherwise would continue using the same approach as what you describe. Cheers, Daniel -- Psss, psss, put i

Re: How to Implement an XMLRPC Server in Python?

2008-10-29 Thread Daniel Fetchinson
rpcserver.html http://code.activestate.com/recipes/81549/ http://code.activestate.com/recipes/496786/ http://www.google.com/search?q=python+xmlrpc+server+example Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: big objects and avoiding deepcopy?

2008-10-28 Thread Daniel da Silva
etimes missing for performance reasons). > > Bye, > bearophile > -- > http://mail.python.org/mailman/listinfo/python-list > -- Daniel da Silva (240) 678 - 4686 GSFC, GES-DISC 610.2 University of Maryland -- http://mail.python.org/mailman/listinfo/python-list

Re: Interface to Matlab

2008-10-22 Thread Daniel
On Oct 17, 2:26 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED] central.gen.new_zealand> wrote: > In message > <[EMAIL PROTECTED]>, Daniel > wrote: > > > Have you looked at > >http://www.scipy.org/ > > andhttp://matplotlib.sourceforge.net/ > > >

Re: Interface to Matlab

2008-10-17 Thread Daniel
oogled "python matlab" and "java matlab" Daniel -- http://mail.python.org/mailman/listinfo/python-list

Python logging and ThreadingTCPServer

2008-10-17 Thread Daniel
rious strange characters and space. Sometimes it seems that the first process never is able to write to the log file after the second process starts writing. Is this a known issue/bug? Are there any known workarounds? Thanks, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: default value in __init__

2008-10-14 Thread Daniel da Silva
alternate method that is logically equivalent to the intention. Daniel On Tue, Oct 14, 2008 at 10:25 PM, Dennis Lee Bieber <[EMAIL PROTECTED]>wrote: > On Tue, 14 Oct 2008 20:50:13 +0200, Bruno Desthuilliers > <[EMAIL PROTECTED]> declaimed the following in > comp.lang.python

Re: Plotting libraries recommendations

2008-10-14 Thread Daniel da Silva
Seconded. If you are familiar with Matlab plotting at all, the interface is nearly identical, and the graphics are great. Daniel On Tue, Oct 14, 2008 at 9:19 AM, eliben <[EMAIL PROTECTED]> wrote: > On Oct 14, 1:18 pm, sert <[EMAIL PROTECTED]> wrote: > > I'm devel

Re: Python syntax question

2008-10-13 Thread Daniel
> > David Blubaugh > > -Original Message- > From: Daniel [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 08, 2008 3:11 PM > To: [EMAIL PROTECTED] > Subject: Re: Python syntax question > > On Oct 8, 12:07 pm, Marc 'BlackJack' Rintsch <[EMAIL PRO

Upgrading from 2.5 to 2.6

2008-10-12 Thread Daniel Klein
Are there any guidelines for upgrading from 2.5 to 2.6? Do you have to uninstall 2.5, or does the installer do that for you? I have wxPython, mod_python and Django installed. Will these have to reinstalled/reconfigured for 2.6? Platform: Windows XP Pro SP3 Daniel Klein -- http

Re: Python syntax question

2008-10-08 Thread Daniel
On Oct 8, 12:07 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Wed, 08 Oct 2008 11:02:49 -0700, Daniel wrote: > > Here is one error I get when I try to import it: > > >>>> import Rpyc > > Traceback (most recent call last): > >

Python syntax question

2008-10-08 Thread Daniel
I hope this question is OK for this list. I've downloaded Rpyc and placed it in my site packages dir. On some machines it works fine, on others not so much. Here is one error I get when I try to import it: >>> import Rpyc Traceback (most recent call last): File "", line 1, in File "C:\Pyth

How to send Data Transfer Objects across the network?

2008-10-02 Thread Daniel
mplete the transaction. Thanks in advance... Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Sample code required to validate a xml file against XSD

2008-10-02 Thread Daniel
g/pipermail/xml-sig/2003-March/009244.html hope it helps. Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: windows help files ?

2008-10-02 Thread Daniel
wser (no internet connection required)? That would enable you to use the same mechanism on all platforms. Daniel -- http://mail.python.org/mailman/listinfo/python-list

problem with sockets code

2008-10-02 Thread Daniel
Hello, I can't seem to get my sockets code to work right. Here is what I have inside my RequestHandler handle() function: total_data=[] data = True logger_server.debug(self.__class__.__name__ + ' set data = True') while data: logger_server.debug(self.

Re: problem with "ImportError: No module named..." and sockets

2008-10-01 Thread Daniel
On Sep 30, 5:49 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 30 Sep 2008 19:44:51 -0300, Daniel <[EMAIL PROTECTED]>   > escribió: > > > > > On Sep 30, 4:17 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > > wrote:

Re: problem with "ImportError: No module named..." and sockets

2008-09-30 Thread Daniel
On Sep 30, 4:17 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 30 Sep 2008 18:38:19 -0300, Daniel <[EMAIL PROTECTED]>   > escribió: > > > > > [BEGIN CODE] > > #!/usr/bin/python > > import SocketServer > > import o

problem with "ImportError: No module named..." and sockets

2008-09-30 Thread Daniel
Hello, I'm trying to build a very simple IPC system. What I have done is create Data Transfer Objects (DTO) for each item I'd like to send across the wire. I am serializing these using cPickle. I've also tried using pickle (instead of cPickle), but I get the same response. Below is the code.

Re: PLEASE HELP ME WITH THIS ASSIGNMENT...PLEASE....

2008-09-11 Thread Daniel Fetchinson
unt you are willing to pay otherwise nobody will take it seriously. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: PLEASE HELP ME WITH THIS ASSIGNMENT...PLEASE....

2008-09-10 Thread Daniel Fetchinson
versions of programs you wrote in > Part A and Part B. Use a combination of gettimeofday() system call and > inter-process synchronization to measure (1) the average hand-over time > between two consecutive processes in the ring and (b) the total > execution time to complete N turns. Plot the measured values as graphs > when varying number of processes P and number of turns N. Explain the > results you obtain. > Submission Guidelines > > Thanking you, > > Ms. Vaidehi Pawar How much do you pay? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Alternatives to traditional RDBMS

2008-09-10 Thread Daniel Fetchinson
>> Are there any known alternatives >> to the traditional RDBMS (MySQL, >> PostgreSQL, SQLite, Oracle, etc0 / >> >> I know of 3 written in Python: >> * buzhug >> * kirbybase >> * PyDbLite > > ZODB. Without any problems usable without ZOPE, clusterable, ACID-conform > and so forth. There is als

help to use "zc.sourcerelease "

2008-09-02 Thread daniel jeem
Hello every body, I want to use "zc.sourcerelease " for creating pakage. But I'm blocked because I have'nt understand how to use it. Then if you have some link or tutorial, share it for me. Help please. Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with packages and path

2008-08-29 Thread Daniel
On Aug 29, 1:15 pm, Paul Boddie <[EMAIL PROTECTED]> wrote: > On 29 Aug, 19:08, Daniel <[EMAIL PROTECTED]> wrote: > > > > > > > I have tried running both commands above from the mypackage directory > > and unittests directory.  I get the following res

Re: When to use try and except?

2008-08-29 Thread Daniel
On Aug 29, 11:23 am, cnb <[EMAIL PROTECTED]> wrote: > If I get zero division error it is obv a poor solution to do try and > except since it can be solved with an if-clause. > > However if a program runs out of memory I should just let it crash > right? Because if not then I'd have to write excepti

Re: problem with packages and path

2008-08-29 Thread Daniel
On Aug 28, 2:28 am, "Marco Bizzarri" <[EMAIL PROTECTED]> wrote: > On Wed, Aug 27, 2008 at 6:44 PM, Daniel <[EMAIL PROTECTED]> wrote: > > Hello, > > > I'm writing some unit tests for my python software which uses > > packages.  Here is th

Re: problem with packages and path

2008-08-27 Thread Daniel
On Aug 27, 11:00 am, Paul Boddie <[EMAIL PROTECTED]> wrote: > On 27 Aug, 18:44, Daniel <[EMAIL PROTECTED]> wrote: > > > > > I'm writing some unit tests for my python software which uses > > packages.  Here is the basic structure: > > > mypacka

Re: problem with packages and path

2008-08-27 Thread Daniel
On Aug 27, 11:00 am, Paul Boddie <[EMAIL PROTECTED]> wrote: > On 27 Aug, 18:44, Daniel <[EMAIL PROTECTED]> wrote: > > > > > I'm writing some unit tests for my python software which uses > > packages.  Here is the basic structure: > > > mypacka

problem with packages and path

2008-08-27 Thread Daniel
he path (and it does). import os, sys newpath = os.path.normpath( os.path.join( __file__, "../../" )) sys.path.append(newpath) I still get the same error. Can someone please point me in the right direction? Thanks in advance: Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and database unittests

2008-08-26 Thread Daniel
t with the MySQL database is different than the sqlite portion. Thanks again, Daniel On Aug 26, 4:12 pm, gordyt <[EMAIL PROTECTED]> wrote: > Daniel I don't know if it would work for your situation or not, but if > you are using Python 2.5, you could use the now built-in sqlit

Python and database unittests

2008-08-26 Thread Daniel
ml I have found http://qualitylabs.org/pdbseed/, which helps with unittests for a live database. This isn't what I'm after. Does anyone know about a module that acts as a database stub for python unittests? Thanks, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Enhanced property decorator

2008-08-25 Thread Daniel
gt;     @my_prop.deleter >     def my_prop(): del self._prop Hmm, interesting. I wonder if it suppports setting the doc-string in a similar way? I'll have to look into that. Thanks for pointing this out. ~ Daniel -- http://mail.python.org/mailman/listinfo/python-list

Enhanced property decorator

2008-08-25 Thread Daniel
ty descriptor prevents built-in clutter. (2) encapsulation of property logic inside function namespace, preventing clutter in class namespace. (3) doc string appears in a more natural place, before getter/setter/ delter logic, as in classes and functions. Cons: difficult to implement? Of course, mo

Re: __eq__ problem with subclasses

2008-08-23 Thread Daniel Israel
Scott David Daniels wrote: Daniel Israel wrote: I am very confused by the following behavior. I have a base class which defines __eq__. I then have a subclass which does not. When I evaluate the expression a==b, where a and b are elements of these classes, __eq__ is always called with the

<    3   4   5   6   7   8   9   10   11   12   >