Re: Portable general timestamp format, not 2038-limited

2007-07-01 Thread Martin Gregorie
Roedy Green wrote: > On Sun, 01 Jul 2007 17:47:36 +0100, Martin Gregorie > <[EMAIL PROTECTED]> wrote, quoted or indirectly quoted > someone who said : > >> GPS time is UTC time and I'd assume the same is true for Loran. > > not according to this site that has

Re: Reversing a string

2007-07-01 Thread Martin Durkin
[EMAIL PROTECTED] (Alex Martelli) wrote in news:[EMAIL PROTECTED]: > Martin Durkin <[EMAIL PROTECTED]> wrote: >... >> >>>>>> def rev(x): >> >>> mylist = [] >> >>> for char in x: >> &g

Re: Portable general timestamp format, not 2038-limited

2007-07-03 Thread Martin Gregorie
number. BTW, be sure to distinguish Julian Day and Modified Julian Day (used by astronomers from the "Julian Date" that [used to] be used by IBM mainframes. The former is a day count but the latter is day within year (yyddd). JD and MJD are described in: http://tycho.usno.nav

Re: Reversing a string

2007-07-05 Thread Martin Durkin
[EMAIL PROTECTED] (Alex Martelli) wrote in news:[EMAIL PROTECTED]: > Aahz <[EMAIL PROTECTED]> wrote: >> I would agree with people who claim >> that you should memorize most of the built-in functions (which is >> precisely why there is a high barrier to adding more built-in >> functions). > > I

Re: Choosing Tkinter over wxPython...

2007-07-10 Thread martin . laloux
me to because of the problem of the new versions of wxpython not compatible with the old ones (try to run a script done with wxpython 3, 4, 5 even 6 with wxpython 2.8.x). Each time, I must re-examine all my old scripts. Tkinter, although less beautiful, is more stable -- http://mail.python.org/ma

Re: Portable general timestamp format, not 2038-limited

2007-07-10 Thread Martin Gregorie
ot recollect them related to SH. > Its in "A Short History of Time". Sorry I can't quote chapter or page, but a friend borrowed my copy and lent me Dawkins "Climbing Mount Improbable" before vanishing, never to be seen since. Not an equal exchange: I preferred ASHOT to CMI. -- martin@ | Martin Gregorie gregorie. | Essex, UK org | -- http://mail.python.org/mailman/listinfo/python-list

Re: Portable general timestamp format, not 2038-limited

2007-07-11 Thread Martin Gregorie
Ilya Zakharevich wrote: > [A complimentary Cc of this posting was sent to > Martin Gregorie > <[EMAIL PROTECTED]>], who wrote in article <[EMAIL PROTECTED]>: >> Its in "A Short History of Time". Sorry I can't quote chapter or page, >> but a frien

Re: Portable general timestamp format, not 2038-limited

2007-07-11 Thread Martin Gregorie
Ilya Zakharevich wrote: > My point is that attributing something to SH due to it appearing in > ABHoT is like attributing it to you since it was mentioned in your > post... > OK, so who should it be attributed to? -- martin@ | Martin Gregorie gregorie. | Essex, UK org

unicode and __repr__()

2007-04-18 Thread Martin Drautzburg
I am using repr() to pass arrays, dicts and combinations therof to javascript as it already returns a valid javascript expression (a string) right away. But for some reason it does not handle Umlaute correctly and those characters finally appear as two strange characters on the browser. I am using

Namespaces/introspection: collecting sql strings for validation

2007-04-21 Thread Martin Drautzburg
I would like to validate sql strings, which are spread all over the code, i.e. I run ("prepare") them against a database to see if it happy with the statements. Spelling errors in sql have been a major pain for me. The statements will not be assembled from smaller pieces, but they will not neccess

Dictionaries and dot notation

2007-04-22 Thread Martin Drautzburg
This may be pretty obvious for most of you: When I have an object (an instance of a class "Foo") I can access attributes via dot notation: aFoo.bar however when I have a dictionary aDict = {"bar":"something"} I have to write aDict["bar"] What if I want to create a da

Re: sql to xml

2007-04-22 Thread Martin Drautzburg
Tim Golden wrote: > 2) Don't use XML if you don't need to. I would call this advice a "golden rule" the violation of which has caused serious pain in some of the projects I am working on. -- http://mail.python.org/mailman/listinfo/python-list

Re: favourite IDE

2007-04-22 Thread Martin Drautzburg
azrael wrote: > Some time ago I posted a question about the favourite IDE. I finally > found it. WING IDE i the best I've ever seen for python. Yes WingIde is cool but it is not free. A fairly good alternative is the "pydev" plugin for eclipse. -- http://mail.python.org/mailman/listinfo/python-

serializable object references

2007-04-22 Thread Martin Drautzburg
Is it possible to convert an object into a string that identifies the object in a way, so it can later be looked up by this string. Technically this should be possible, because things like <__main__.Foo instance at 0xb7cfb6ac> say everything about an object. But how can I look up the real object

Re: serializable object references

2007-04-22 Thread Martin Drautzburg
Gabriel Genellina wrote: > En Sun, 22 Apr 2007 08:07:27 -0300, Martin Drautzburg > <[EMAIL PROTECTED]> escribió: > >> Is it possible to convert an object into a string that identifies the >> object in a way, so it can later be looked up by this string. >> Te

Re: Dictionaries and dot notation

2007-04-22 Thread Martin Drautzburg
> mydata = data( ) > mydata.foo = 'foo' > mydata.bar = 'bar' > > print mydata.foo > print mydata.bar I am aware of all this. Okay let me rephrase my question: is there a way of using dot notation without having to create a class? -- http://mail.python.org/mailman/listinfo/python-list

Re: Namespaces/introspection: collecting sql strings for validation

2007-04-22 Thread Martin Drautzburg
Peter Otten wrote: > Martin Drautzburg wrote: > >> I would like to validate sql strings, which are spread all over the >> code, i.e. I run ("prepare") them against a database to see if it >> happy with the statements. Spelling errors in sql have been a major >

Re: Dictionaries and dot notation

2007-04-22 Thread Martin Drautzburg
Daniel Nogradi wrote: >> > What if I want to create a datastructure that can be used in dot >> > notation without having to create a class, i.e. because those >> > objects have no behavior at all? >> >> A class inheriting from dict and implementing __getattr__ and >> __setattr__ should do the tri

Re: Dictionaries and dot notation

2007-04-22 Thread Martin Drautzburg
Alex Martelli wrote: > Martin Drautzburg <[EMAIL PROTECTED]> wrote: > >> > mydata = data( ) >> > mydata.foo = 'foo' >> > mydata.bar = 'bar' >> > >> > print mydata.foo >> > print mydata.bar >>

Re: serializable object references

2007-04-22 Thread Martin Drautzburg
Gabriel Genellina wrote: > En Sun, 22 Apr 2007 12:47:10 -0300, Martin Drautzburg > <[EMAIL PROTECTED]> escribió: > >> I was thinking that it would be nice if a web application could talk >> to real objects. The client side does not need to know the internals >>

Re: Namespaces/introspection: collecting sql strings for validation

2007-04-22 Thread Martin Drautzburg
George Sakkis wrote: > Yes, there is: use an ORM to do the SQL generation for you. Check out > SQLAlchemy, it will buy you much more than what you asked for. Might look, though in general I don't like OR mappers much. Having SQL generated feels as strange as having python code generated. Too much

Re: Namespaces/introspection: collecting sql strings for validation

2007-04-23 Thread Martin Drautzburg
Peter Otten wrote: def SQL(sql): > ...     print sql > ... a = SQL("module") > module # that one was obvious class A: > ...     b = SQL("class") > ...     def method(self, c=SQL("default arg")): > ...             d = SQL("method") > ... You are my hero. Indeed very cool! -- http:/

Re: tkFileDialog.askopenfilename()

2007-05-16 Thread martin . laloux
look at "Basic Tkinter dialogs" from python cookbook at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/438123 -- http://mail.python.org/mailman/listinfo/python-list

Re: Execute commands from file

2007-05-16 Thread Martin Blume
eling as "like if the commands was typed one after the other in a interactive session", but perhaps this helps. Warning: the code above is without any error checks. You might also run into security problems, the example above assumes you trust your input. HTH. YMMV. Martin -- http:/

zipfile stupidly broken

2007-05-16 Thread Martin Maney
To quote from zipfile.py (2.4 library): # Search the last END_BLOCK bytes of the file for the record signature. # The comment is appended to the ZIP file and has a 16 bit length. # So the comment may be up to 64K long. We limit the search for the # signature to a few Kbytes at th

Re: Execute commands from file

2007-05-17 Thread Martin Blume
) 42 >>> xxx 42 Seems to work great to me. OTOH, this doesn't: >>> inp=open("question.py") >>> for l in inp: ... exec l ... 42 Traceback (most recent call last): File "", line 2, in ? File "", line 1 def sowhat(): ^ SyntaxError: unexpected EOF while parsing So it seems to depend on the way the file is read. Regards Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Execute commands from file

2007-05-19 Thread Martin Blume
t; for line in inp: > exec line > > As for your first example, why not just use execfile() ? > I assume that execfile(fname) is equivalent to exec open(fname).read() ? Regards Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Execute commands from file

2007-05-19 Thread Martin Blume
a little over-zealous in pursuing > correct English usage, in which case please accept > my apology. > The apology is on my part, I didn't explain my thinking clearly enough. Thanks for your explanations. Makes my newbie understanding of Python much more robust. Regards Marti

Re: zipfile stupidly broken

2007-05-19 Thread Martin Maney
Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > To search 64k for all zip files would slow down the opening of all zip > files whereas most zipfiles don't have comments. No, actually it would only slow down for files which do have comments, assuming I understand the code correctly. IME most zipfiles

Re: zipfile [module and file format, both] stupidly broken

2007-05-19 Thread Martin Maney
Larry Bates <[EMAIL PROTECTED]> bristled: > Are you serious? A zipfile with a comment > 4Kbytes. I've never encountered > such a beast. If I hadn't run into one I would never have had a clue that Python's zipfile module had this silly bug. > As with any open source product it is much better to r

Re: zipfile [module and file format, both] stupidly broken

2007-05-19 Thread Martin Maney
Gabriel Genellina <[EMAIL PROTECTED]> wrote: > A module in the Python Standard Library has a bug. I take the Python > Library Reference manual, go to the last pages (Appendix B), and find how > to properly report a bug. Sure, the information is *somewhere*. Silly me, I expected it to be readi

Invalid thread state for this thread

2007-05-24 Thread Martin Evans
ed for multiple thread support) and this also appears to work fine, but for this test only this one thread was used. I have a compiled version of 2.4.2. Any ideas would be appreciated. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Invalid thread state for this thread

2007-05-25 Thread Martin Evans
n > independently (thus the need for multiple thread support) and this also > appears to work fine, but for this test only this one thread was used. I > have a compiled version of 2.4.2. > > Any ideas would be appreciated. > > Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: strftime in python 2.2

2007-08-13 Thread Martin Blume
cies in a critical system. > How can i convert that string to have the same result? > import time time.strftime("%H%M) HTH Martin -- http://mail.python.org/mailman/listinfo/python-list

We need PIGs :)

2007-08-29 Thread Martin Marcher
has "PIG: XXX" in the metadata docstring or wherever - maybe even a __pig__ = XXX variable. any input is welcome (also point me to the place where that can be found if it already exists) martin -- http://mail.python.org/mailman/listinfo/python-list

Re: We need PIGs :)

2007-08-30 Thread Martin Marcher
Hello, On 30 Aug 2007 07:14:25 GMT, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Thu, 30 Aug 2007 07:10:47 +0200, Martin Marcher wrote: > > > Does that sound like a good idea or would that be over formalization? > > Sounds like over engineering/forma

Lost in __setstate__() in C++ and swig

2007-09-11 Thread Martin Drautzburg
I am trying to cPickle/unpickle a C++ extension class with some private data members. I wrote __getstate__() and __setstate__ in C++ (I have to, due to the private data). Pickling writes the following file: ccopy_reg _reconstructor p1 (cpyramid MidiBytes

Project organization and import

2007-03-04 Thread Martin Unsal
org/search/hypermail/python-1993/0448.html Has anyone found a systematic way to solve the problem of reloading in an interactive interpreter when using "from foo import *"? I appreciate any advice I can get from the community. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Project organization and import

2007-03-05 Thread Martin Unsal
unctional unit (such as a class), or at most a few closely related functional units per file. In Python, most of the large projects I've looked at use "from foo import *" liberally. I guess my question boils down to this. Is "from foo import *" really deprecated or not? If everyone has to use "from foo import *" despite the problems it causes, how do they work around those problems (such as reloading)? Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Project organization and import

2007-03-05 Thread Martin Unsal
restart the interpreter, load an entire package and then run a test script to set up your test conditions again. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Project organization and import

2007-03-05 Thread Martin Unsal
pts instead. These are more reliable > and easier to validate than reload() in a shell. I think this is the crux of my frustration. I think reload() is unreliable and hard to validate because Python's package management is broken. I appreciate your suggestion of alternatives and I think I need to come to terms with the fact that reload() is just broken. That doesn't mean it has to be that way or that Python is blameless in this problem. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Project organization and import

2007-03-05 Thread Martin Unsal
o first reboot your computer. In Python, where reload() is essentially the incremental build process, and the interpreter is essentially a virtual machine, you guys are saying that my best option is to just "reboot" the virtual machine to make sure I have a "clean slate". It may be the path of least resistance, but to say that it is necessary or inevitable is 1960s mainframe thinking. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Project organization and import

2007-03-05 Thread Martin Unsal
"from foo import bar", or you are stuck with a file structure that is isomorphic to your design namespace. The former breaks reload; the latter breaks large projects. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Project organization and import

2007-03-06 Thread Martin Unsal
interactively in the interpreter. Is that the case or have I misunderstood? Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Project organization and import

2007-03-06 Thread Martin Unsal
is broken. I think you should be asking yourselves, "Did we all abandon reload() because it is actually an inferior workflow, or just because it's totally broken in Python?" I have one question left but I'll ask that in a separate post. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Project organization and import

2007-03-06 Thread Martin Unsal
On Mar 5, 2:18 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Martin Unsal a écrit : > > For example, say > > you want to organize the widgets package as follows: > > > widgets/scrollbar/*.py > > widgets/form/*.py > > widgets/common/util.py >

Re: Project organization and import

2007-03-06 Thread Martin Unsal
not by a style guideline, but by the design flaws of Python's package system. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Project organization and import

2007-03-06 Thread Martin Unsal
lem? OK, maybe I'm totally missing something here, but you can't do "import ../util/common" in Python can you? Look at the directory structure in my original post. How does Scrollbar.py import its dependencies from common.py, without relying on PYTHONPATH? Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Project organization and import

2007-03-06 Thread Martin Unsal
about how such things are organized. It's funny, I'm a newbie to Python but it seems like I'm one of the only people here thinking about it as a large scale development language rather than a scripting language. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Project organization and import

2007-03-06 Thread Martin Unsal
ode, > and manually manipulate it. That's exactly what I want to do. That's exactly what I'm having trouble with. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Project organization and import

2007-03-06 Thread Martin Unsal
n higher level directory would be frowned upon. What if it shares a common higher level directory by design? :) Relative imports aren't ideal, but I think in some cases it's better than relying on PYTHONPATH which is global state (an environment variable no less). Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Project organization and import

2007-03-06 Thread Martin Unsal
simple example. I thought you were asking why I would want to organize code that way, and the only short answer is experience. I'd prefer not to try to formulate a long answer because it would be time consuming and somewhat off topic, but we can go there if necessary. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python shell on mac os x

2007-03-16 Thread martin . laloux
or go to http://pythonmac.org/packages/ and you have python 2.5 or python 2.4.4 with readline support -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding the insertion point in a list

2007-03-17 Thread Martin Blume
reak > if(not inserted): x.append(y) > > print x > > You can get rid of the sentinel "inserted" using the else clause of the for loop: for i in range(len(x)): if (y <= x[i]): x.insert(i, y) break else: x.append(y)

Re: plot dendrogram with python

2007-03-27 Thread martin . laloux
I use pycluster http://bonsai.ims.u-tokyo.ac.jp/~mdehoon/software/cluster/software.htm#pycluster -- http://mail.python.org/mailman/listinfo/python-list

gmpy floating point exception

2007-03-28 Thread Martin Manns
e 1, in ? OverflowError: cannot convert float infinity to long >>> a+b Floating point exception ~ $ BTW. 1) What is the best way to test for inf regardless of type? 2) Is there any inf type around with a + inf == inf inf > a (as long as a != inf) etc. that works with any other type? Thanks in advance Martin -- http://mail.python.org/mailman/listinfo/python-list

inf class (was: gmpy floating point exception)

2007-03-29 Thread Martin Manns
On Thu, 29 Mar 2007 00:57:03 -0700 [EMAIL PROTECTED] (Alex Martelli) wrote: > Martin Manns <[EMAIL PROTECTED]> wrote: > > 2) Is there any inf type around with > > a + inf == inf > > inf > a (as long as a != inf) > > etc. > > that works with any other type

Re: python on mac os 10.4.x

2007-04-03 Thread martin . laloux
Go to http://wiki.python.org/moin/MacPython and http://pythonmac.org/packages/ if you want to download macpython 2.5 or macpython 2.4.4 ("framework" builds). Installation is very easy (package) and you have all you want without problem with the 2.3.5 version wich remains installed and functional

grandparent method with super

2007-04-05 Thread Martin Manns
://www.python.org/download/releases/2.2/descrintro/ but I am still stuck. Thanks in advance Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: grandparent method with super

2007-04-05 Thread Martin Manns
self): > A.m(self) > > I don't think you want to try to use super() in this case. That works, but when I replace A with something else, I do not get the grandparent anymore without changing all the method calls. Basically, I would like to call the method m in the first g

Re: grandparent method with super

2007-04-05 Thread Martin Manns
> >call the > method m in the first > >grandparent of D. > > > >Martin > > I think the problem you may run into is with the term "first > grandparent" - when you look at the method resolution order of the > class D, you will find that the MRO goes "D,

Re: grandparent method with super

2007-04-05 Thread Martin Manns
etter that you > rethink your class hierarchy. After seeing the implications and the solutions, I will. Thank you everyone for your help Martin -- http://mail.python.org/mailman/listinfo/python-list

is asynchat broken or just not intended to work like other dispatchers? [PATCH]

2007-04-11 Thread Martin Maney
Simple asyncore application where I wanted to use an explicit map (1) rather than the automagic default. Worked fine until I tried to use asynchat to handle an interactive status and control connection (3) and found it had no notion about using a non-default map. After convincing myself that this

Re: SQLite problems

2007-04-12 Thread martin . laloux
> I run Python 2.5 on a Mac OS X system with SQLite 3.2.8 installed via > fink. Why fink ?, it is very easy to make sqlite. download the source, configure, make and install from terminal -- http://mail.python.org/mailman/listinfo/python-list

Method calls and stack consumption

2007-04-14 Thread Martin Manns
I am currently hesitant to depend on something from svn. How stable and robust is stackless? Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Method calls and stack consumption

2007-04-15 Thread Martin Manns
On Sun, 15 Apr 2007 07:27:25 +0200 Peter Otten <[EMAIL PROTECTED]> wrote: > Martin Manns wrote: > > > Calling methods of other object instances seems quite expensive on > > the stack (see example below). Is there a better way of traversing > > through methods of ins

Re: Python + ogr module?

2007-04-17 Thread martin . laloux
You must seek for python and Open Source GIS or mapserver and you find: http://mapserver.gis.umn.edu/community/conferences/MUM3/workshop/python http://www.archaeoworld.com/classes/osgit/lectures/ with http://www.archaeoworld.com/classes/osgit/lectures/osgit_02_libraries.pdf and you have some exa

Re: where is help file?

2007-09-14 Thread Martin Blume
have a > module that doesn't provide a help text seems to indicate that it's not > a standard library module. What's the name of the module you're trying > to get help on? > > Hope this helps (no pun intended), > AFAIK you have to import the module first, before you can get help on that module. HTH Martin -- http://mail.python.org/mailman/listinfo/python-list

Parsing problems: A journey from a text file to a directory tree

2007-09-16 Thread Martin M.
h, I really don't get my head around this problem and I need your help. I have the feeling, that the answer is not that complicated, but I just don't get it right now... Your desperate, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: test if email

2007-10-12 Thread Martin Marcher
ver it. (if there's no @ you should know wether it's a local user or not) hth martin -- http://noneisyours.marcher.name http://feeds.feedburner.com/NoneIsYours -- http://mail.python.org/mailman/listinfo/python-list

Re: C++ version of the C Python API?

2007-10-23 Thread Martin Marcher
2007/10/21, Robert Dailey <[EMAIL PROTECTED]>: > On 10/21/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > No, I literally meant that the Python C API is object-oriented. > > You don't need an object-oriented language to write object-oriented > >

crontab library

2007-10-24 Thread Martin Marcher
time in creating such a thing maybe someone did it already :) thanks martin -- http://noneisyours.marcher.name http://feeds.feedburner.com/NoneIsYours -- http://mail.python.org/mailman/listinfo/python-list

Re: crontab library

2007-10-24 Thread Martin Marcher
2007/10/24, Guilherme Polo <[EMAIL PROTECTED]>: > 2007/10/24, Martin Marcher <[EMAIL PROTECTED]>: > > I had a look at the crontab docs and never realized how complex it > > actually is. So before I spend time in creating such a thing maybe > > someone did it alread

Re: Test for a unicode string

2007-10-24 Thread Martin Marcher
2007/10/24, goldtech <[EMAIL PROTECTED]>: > Question: Is there a way to test a string for unicode chars (ie. test > if a string will throw the error cited above). yes there ist :) >>> isinstance(u"a", basestring) True >>> isinstance(u"a", unicode) True >>> isinstance("a", unicode) False >>> isins

Re: New to Vim and Vim-Python

2007-10-24 Thread Martin Marcher
of emacs - there's just a lot more available that is ready to use vim emacs than with vim (in my case, your use case may vary) hth martin -- http://noneisyours.marcher.name http://feeds.feedburner.com/NoneIsYours -- http://mail.python.org/mailman/listinfo/python-list

Re: print vs sys.stdout.write, and UnicodeError

2007-10-25 Thread Martin Marcher
25 Oct 2007 17:37:01 GMT, Brent Lievers <[EMAIL PROTECTED]>: > Greetings, > > I have observed the following (python 2.5.1): > > >>> import sys > >>> print sys.stdout.encoding > UTF-8 > >>> print(u'\u00e9') > é > >>> sys.stdout.write(u'\u00e9\n') > Traceback (most recent call last): > File "", lin

Re: Eclipse Plugins

2007-10-26 Thread Martin Marcher
2007/10/26, Robert Rawlins - Think Blue <[EMAIL PROTECTED]>: > I'm not sure what you IDE you all generally use for your python development. > I've been somewhat lazy and always used a plain text editor, however this > technique is starting to take its toll, and it's purely been out of laziness > no

"Standard" Full Text Search Engine

2007-10-26 Thread Martin Marcher
Hello, is there something like a standard full text search engine? I'm thinking of the equivalent for python like lucene is for java or ferret for rails. Preferrably something that isn't exactly a clone of one of those but more that is python friendly in terms of the API it provides. Things I'd

Re: "Standard" Full Text Search Engine

2007-10-26 Thread Martin Marcher
2007/10/26, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > On Oct 26, 8:53 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > Martin Marcher wrote: > Thanks for the NUCULAR mention (http://nucular.sourceforge.net). It > certainly doesn't meet all the re

os.walk and recursive deletion

2007-10-27 Thread Martin Marcher
Hello, I'm playing around with os.walk and I made up del_tree(path) which I think is correct (in terms of the algorithm, but not as python wants it :)). As soon as some directory is deleted the iterator of os.walk chokes. OK that is somehow clear to me as it can't be valid anymore since it can't

Re: os.walk and recursive deletion

2007-10-28 Thread Martin Marcher
27 Oct 2007 17:38:10 GMT, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]>: > On Sat, 27 Oct 2007 18:07:44 +0200, Martin Marcher wrote: > > I'm playing around with os.walk and I made up del_tree(path) which I > > think is correct (in terms of the algorithm, but not

Re: sharing vars with different functions

2007-10-29 Thread Martin Marcher
I hate gmail, always forgetting to set the right recipient... -- Forwarded message -- From: Martin Marcher <[EMAIL PROTECTED]> Date: 29.10.2007 10:11 Subject: Re: sharing vars with different functions To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> 2007/1

Re: A class question

2007-10-29 Thread Martin Marcher
2007/10/29, Hrvoje Niksic <[EMAIL PROTECTED]>: > Sbe unpx inyhr, urer vf n cbffvoyr vzcyrzragngvba: > ... was that on purpose? martin -- http://noneisyours.marcher.name http://feeds.feedburner.com/NoneIsYours -- http://mail.python.org/mailman/listinfo/python-list

Proxying downloads

2007-10-30 Thread Martin Marcher
ith a new request, as long as files are in progress. This would in the worst case download the file n times where n is the number of clients. * I guess that's the easiest one but also the least desirable solution. I hope I explained my problem somehow understandable. any hints are welcome thanks martin -- http://noneisyours.marcher.name http://feeds.feedburner.com/NoneIsYours -- http://mail.python.org/mailman/listinfo/python-list

Re: shouldn't 'string'.find('ugh') return 0, not -1 ?

2007-10-31 Thread Martin Marcher
2007/10/31, jelle <[EMAIL PROTECTED]>: > the subject pretty much says it all. > if I check a string for for a substring, and this substring isn't found, > should't the .find method return 0 rather than -1? > this breaks the IMHO "0" would mean the substring starts at index 0 of the iterable. If t

Re: Internet Survey

2007-01-10 Thread martin griffith
> > >pete a bit more subtle http://www.tagzin.com/main.aspx?cat=v&q=history martin -- http://mail.python.org/mailman/listinfo/python-list

Re: (newbie) Is there a way to prevent "name redundancy" in OOP ?

2007-01-10 Thread Martin Miller
Carl Banks wrote: > Martin Miller wrote: > > Carl Banks wrote: > > > > > Martin Miller wrote: > > > > ### non-redundant example ### > > > > import sys > > > > > > > > class Pin: > > > > def __init__(self,

Re: New os.path.exists() behavior - bug or feature?

2007-01-24 Thread Martin Miller
FWIW, your code works correctly for me in all respects with Python 2.5 on Windows XP Pro. I no longer have Python 2.4.x installed, so can't easily do a comparison. Perhaps the problem has something to do with Python 2.5 with Windows 2K. -Martin On Dec 17 2006, 4:29 pm, "klappnas

Re: how to unistall a Python package?

2007-01-25 Thread martin . laloux
you delete it from lib -- http://mail.python.org/mailman/listinfo/python-list

We sell to everyone!!! Government, Wholesalers, Distributers, Entreprenuers.....www.martin-global.com

2007-01-29 Thread Martin Global
Martin Global is one of North America's leading importers of goods manufactured and produced throughout Asia. We are distinctively unique from other importers, as we have one of North America's largest networks linking our organization directly to thousands of manufacturers and su

We sell to everyone!!! Government, Wholesalers, Distributers, Entreprenuers.....www.martin-global.com

2007-01-29 Thread Martin Global
Martin Global is one of North America's leading importers of goods manufactured and produced throughout Asia. We are distinctively unique from other importers, as we have one of North America's largest networks linking our organization directly to thousands of manufacturers and su

Re: Simple SVN/CVS-like library in Python?

2007-02-08 Thread Martin Wiechert
On Wednesday 07 February 2007 21:29, Andrea Gavana wrote: > Hi All, > > in our office we work with quite complex input files for a > reservoir simulator. Those files have thousands of keywords, switches, > sub-keywords and whatever. Every time a modification is requested, we > modify the input

Re: Calling J from Python

2007-02-09 Thread Martin Lüthi
Alexander Alexander Schmolck <[EMAIL PROTECTED]> writes: > I can think of two nice ways in J, 13 and 16 characters long respectively and > each expressing something essential and non-trival about the problem in a way > that would be more cumbersome in python. > > Here's the first one: > > (,,.~)^:

Re: How to call a function defined in another py file

2007-02-19 Thread Martin Blume
<[EMAIL PROTECTED]> schrieb > > I have a function called 'test' defined in A.py. > How can I call that function test in my another file B.py? > In B.py: import A A.test() HTH Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: How to call a function defined in another py file

2007-02-19 Thread Martin Blume
mentation at http://docs.python.org/tut/node8.html which tells it much better than I do, and might give you some more ideas for googling. I haven't had yet the necessity for cross-directory imports. HTH Martin -- http://mail.python.org/mailman/listinfo/python-list

Rational numbers

2007-02-23 Thread Martin Manns
00 >>> b -50L >>> a==b __main__:1: RuntimeWarning: tp_compare didn't return -1, 0 or 1 False >>> --- How do I get rid of these warnings? Is there any rational number library around that 1)

Re: Rational numbers

2007-02-23 Thread Martin Manns
y for any type (not just int and float) and I have little experience with verifying such generic code. The problems encountered in the mxNumber wrapper support this notion. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Rational numbers / alternatives to mxNumber

2007-02-23 Thread Martin Manns
On Fri, 23 Feb 2007 11:39:11 -0500 Martin Manns <[EMAIL PROTECTED]> wrote: > + boost indeed is a quite nice C++ library. However, I fear that I > would end up writing the python wrappers for operators (+ - * / min > max cmp etc.) myself. I would like to avoid this since these ope

Re: Rational numbers

2007-02-23 Thread Martin Manns
me.comcast.net/~casevh> > > > > I haven't used the rationals all that much, but been very > > happy with them when I have. > > > > casevh > Thank you for all the replies. I think that I am going to switch to gmpy. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Rational numbers

2007-02-23 Thread Martin Manns
On Fri, 23 Feb 2007 20:20:12 -0300 "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 23 Feb 2007 12:35:19 -0300, Martin Manns <[EMAIL PROTECTED]> > escribió: > > > I am starting to use rationals and since I found no batteries > > included, I trie

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