Re: What strategy for random accession of records in massive FASTA file?

2005-01-15 Thread Bulba!
On 14 Jan 2005 12:30:57 -0800, Paul Rubin wrote: >Mmap lets you treat a disk file as an array, so you can randomly >access the bytes in the file without having to do seek operations Cool! >Just say a[234]='x' and you've changed byte 234 of the file to the >letter x.

Re: Speed revisited

2005-01-10 Thread Bulba!
On Sun, 09 Jan 2005 22:51:47 GMT, Andrea Griffini <[EMAIL PROTECTED]> wrote: >>Tip 1: Once you have data in memory, don't move it, move a pointer or >>index over the parts you are inspecting. >> >>Tip 2: Develop an abhorrence of deleting data. > >I've to admit that I also found strange that deleti

Re: Speed revisited

2005-01-09 Thread Bulba!
On Sat, 08 Jan 2005 17:57:30 -0700, Steven Bethard <[EMAIL PROTECTED]> wrote: >Note that Python lists are implemented basically as arrays, which means >that deleting an item from anywhere but the end of the list is O(n) >because all items in the list must be moved down to fill the hole. Ouch...

Re: Speed revisited

2005-01-09 Thread Bulba!
On 8 Jan 2005 18:25:56 -0800, "John Machin" <[EMAIL PROTECTED]> wrote: >> Both versions use local variables, etc. Both have their >> lists initially sorted. Both essentially use a loop with >> conditional for comparison, >> then process the record in the >> same way. > >"process the record in the

Re: The Industry choice

2005-01-08 Thread Bulba!
On 6 Jan 2005 20:07:19 -0500, [EMAIL PROTECTED] (Aahz) wrote: >>Nope. That is not what I'm arguing. Really, I think you have >>jumped to conclusion about that: I merely pointed out that >>I don't like what I perceive as end effect of what GPL license >>writers are attempting to achieve: vendor loc

Re: windows mem leak

2005-01-08 Thread Bulba!
On Sat, 08 Jan 2005 15:00:05 -0500, Steve Holden <[EMAIL PROTECTED]> wrote: >> Does the Win32 port of Python have a memory leak? I have some code that >> runs flawlessly on Linux, but bombs after a few hours on Windows. It's >> threaded and uses a lot of memory. >Yes, that's a well-known proble

Re: Python Operating System???

2005-01-08 Thread Bulba!
On Sat, 08 Jan 2005 08:28:12 GMT, "Roose" <[EMAIL PROTECTED]> wrote: >I am not trying to be insulting... but unless someone would like to educate >me otherwise, the idea of an OS written in Python is almost ludicrous. As I >said, I think you might mean an OS SHELL, which would be a reasonable >(a

Speed revisited

2005-01-08 Thread Bulba!
On 4 Jan 2005 14:33:34 -0800, "John Machin" <[EMAIL PROTECTED]> wrote: >(b) Fast forwarding 30+ years, let's look at the dictionary method, >assuming you have enough memory to hold all your data at once: > >Step 1: read the "left" table; for each row, if english not in mydict, >then do mydict[engl

Re: The Industry choice

2005-01-07 Thread Bulba!
On 6 Jan 2005 19:01:46 -0500, [EMAIL PROTECTED] (Aahz) wrote: >>Note that the so-called 'viral' nature of GPL code only applies to >>*modifications you make* to the GPL software. The *only* way in which >>your code can be 'infected' by the GPL is if you copy GPL source. >That's not true -- con

Re: Python evolution: Unease

2005-01-07 Thread Bulba!
On Thu, 6 Jan 2005 23:42:40 -0500, "Terry Reedy" <[EMAIL PROTECTED]> wrote: >>> Would it be possible, at least for Windows, to write a Python script >>> implementing a 'virtual distribution'? IE, download Python, install it, >>> download next package, install it, etc. -- prefereably table drive

Re: Python evolution: Unease

2005-01-07 Thread Bulba!
On 06 Jan 2005 18:46:00 -0800, Paul Rubin wrote: >"Terry Reedy" <[EMAIL PROTECTED]> writes: >> Would it be possible, at least for Windows, to write a Python script >> implementing a 'virtual distribution'? IE, download Python, install it, >> download next package, ins

Re: [OT] Re: The Industry choice

2005-01-06 Thread Bulba!
On Thu, 06 Jan 2005 22:42:01 +0100, Peter Dembinski <[EMAIL PROTECTED]> wrote: >[...] > >> That's remarkable, first time I see smth like this - >> out of curiosity, could you say a word where was that? >Are you the same Bulba I know from alt.pl.comp.os.hacking?

Re: The Industry choice

2005-01-06 Thread Bulba!
On Thu, 06 Jan 2005 14:27:55 -0800, Jeff Shannon <[EMAIL PROTECTED]> wrote: >>>That's generally the goal of the Free Software Foundation: they think >>>all users should have the freedom to modify and/or distribute your code. >> >> You have the freedom of having to wash my car then. ;-) >A more

Re: The Industry choice

2005-01-06 Thread Bulba!
On 06 Jan 2005 15:38:53 -0800, Paul Rubin wrote: >> Making derived work proprietary in no way implies that the base >> work is publicly unavailable anymore. >Since you want to be able to incorporate GPL code in your proprietary >products, Nope. That is not what I'm arg

Re: The Industry choice

2005-01-06 Thread Bulba!
On 06 Jan 2005 14:16:13 -0800, Paul Rubin wrote: >> Yes, apart from libraries and similar cases (frameworks etc), it's no >> doubt rare for closed-source "end-user packages" to be sold with >> licenses that include source and allow you to "do anything with it". >> >> Ho

Re: The Industry choice

2005-01-06 Thread Bulba!
On Thu, 06 Jan 2005 10:38:53 -0800, Jeff Shannon <[EMAIL PROTECTED]> wrote: >It's also noteworthy to consider that many times, waste happens not >because of corruption or self-interest, but simply because of errors >of judgement. Precisely. That is one of the main points I was trying to get

Re: The Industry choice

2005-01-06 Thread Bulba!
On Thu, 06 Jan 2005 09:42:42 -0500, Steve Holden <[EMAIL PROTECTED]> wrote: >> You see, I'm not disagreeing with you that your model applies >> _where it applies_. I only disagree that it applies in face of >> stronger forces. Now what kind of forces is dominant in >> most frequent scenarios would

Re: The Industry choice

2005-01-06 Thread Bulba!
On Thu, 06 Jan 2005 09:27:49 -0500, Steve Holden <[EMAIL PROTECTED]> wrote: >>>I'd go further. It's not possible to force anyone to share, but the >>>GPL aims to remove software from a system that instead aims to force >>>people NOT to share. >> Nope. IMHO, GPL attempts to achieve the vendor lo

Re: The Industry choice

2005-01-06 Thread Bulba!
On Thu, 06 Jan 2005 12:20:35 +0100, Stefan Axelsson <[EMAIL PROTECTED]> wrote: >> If GPL folks had their way, it would not be possible not to "share" >> _anything_ you create. It is widely acknowledged that GPL >> license has the "viral" aspect of extending itself on your >> software - can you po

Re: The Industry choice

2005-01-06 Thread Bulba!
On Thu, 06 Jan 2005 15:44:03 GMT, Roel Schroeven <[EMAIL PROTECTED]> wrote: >I was thinking more of end-user packages: if you somehow could lay your >hands on the source code of Visual Studio itself, you're still not >allowed to do anything with it. And why would anybody want to waste their tim

Re: The Industry choice

2005-01-06 Thread Bulba!
On Thu, 06 Jan 2005 08:39:11 GMT, Roel Schroeven <[EMAIL PROTECTED]> wrote: >> If GPL folks had their way, it would not be possible not to "share" >> _anything_ you create. >That's generally the goal of the Free Software Foundation: they think >all users should have the freedom to modify and/or

Re: Python evolution: Unease

2005-01-06 Thread Bulba!
On Wed, 05 Jan 2005 17:25:08 -0800, Robert Kern <[EMAIL PROTECTED]> wrote: >> Yes, I know, it can be written by hand. But by this line of logic why >> bother learning VHLL and not just stay with C? >I'm not sure what you mean by "written by hand." I mean the same way as you do mylist.sort() in

Re: The Industry choice

2005-01-05 Thread Bulba!
cing them not to do so is impossible without turning the world into >a police state. What's the cost of copying music files vs cost of combining some programs together, even in the form of e.g. using an external library? >Maybe if Python were GPL, then Bulba wouldn't use it,

No typical loops, and other crazy ideas

2005-01-05 Thread Bulba!
OK. I have reworked this program (below) to use just the data manipulation capabilities of Python (training was largely the motivation). I've tried to manipulate the data just in Python and not in typical loops. One thing that may not be entirely crazy in this, IMHO, is the attempt to use built-i

Re: The Industry choice

2005-01-05 Thread Bulba!
On Wed, 5 Jan 2005 11:19:56 +0100, [EMAIL PROTECTED] (Alex Martelli) wrote: >Say that the city has ten hat shops of the same quality. One is in >Piazza dell'Unita`, all the way to the Northern border of the city. One >is in Piazza Saragozza, all the way to the Southern border. The other >eight

Re: Python evolution: Unease

2005-01-05 Thread Bulba!
On Wed, 5 Jan 2005 07:37:25 -0600, Skip Montanaro <[EMAIL PROTECTED]> wrote: > >Terry> Numarray has a record array type. If there is not one publicly >Terry> available, perhaps you could write a CSV file to record-array >Terry> slurper and contribute it to the Recipes site or maybe ev

Re: Pythonic search of list of dictionaries

2005-01-05 Thread Bulba!
On Tue, 04 Jan 2005 21:57:46 +0100, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >In <[EMAIL PROTECTED]>, Bulba! wrote: > >> I put those dictionaries into the list: >> >>oldl=[x for x in orig] # where orig=csv.DictReader(ofile ... >

Re: Python evolution: Unease

2005-01-04 Thread Bulba!
On Tue, 4 Jan 2005 15:18:48 -0200, Carlos Ribeiro <[EMAIL PROTECTED]> wrote: >> Let's take one by one: >I'll take only a few ;-) >> - IDE: Better than what? Than IDLE? Than Eclipse? Than SPE? Than Pythonwin? > >I would like to seee Eric3, with some polish & opensourced on Win >(which means sol

Re: Python evolution: Unease

2005-01-04 Thread Bulba!
On Tue, 4 Jan 2005 11:15:54 +0100, [EMAIL PROTECTED] (Alex Martelli) wrote: >Also, you keep talking about "the core python team" on the basis, it >would appear, of reading one document by Guido. Have you bothered doing >a MINIMUM of homework, such as, looking at >http://www.amk.ca/diary/archi

Re: The Industry choice

2005-01-04 Thread Bulba!
On Mon, 03 Jan 2005 20:16:35 -0600, "Rob Emmons" <[EMAIL PROTECTED]> wrote: >> This "free software" (not so much OSS) notion "but you can >> hire programmers to fix it" doesn't really happen in practice, >> at least not frequently: because this company/guy remains >> ALONE with this technology, the

Re: The Industry choice

2005-01-04 Thread Bulba!
On Sun, 2 Jan 2005 23:59:53 -0800, "Eric Pederson" <[EMAIL PROTECTED]> wrote: >I'm decades behind on economics research, but I remember >modeling clustering based on mass and distance (the gravity model). >On a decision making basis there seems to be an aspect of it that is >binary: (0) either

Re: The Industry choice

2005-01-04 Thread Bulba!
On Sun, 02 Jan 2005 17:18:43 -0600, Mike Meyer <[EMAIL PROTECTED]> wrote: >> This "free software" (not so much OSS) notion "but you can >> hire programmers to fix it" doesn't really happen in practice, >> at least not frequently: because this company/guy remains >> ALONE with this technology, the c

Re: The Industry choice

2005-01-04 Thread Bulba!
On Mon, 3 Jan 2005 00:08:25 +0100, [EMAIL PROTECTED] (Alex Martelli) wrote: >> True. I have a bit of interest in economics, so I've seen e.g. >> this example - why is it that foreign branches of companies >> tend to cluster themselves in one city or country (e.g. >It's not just _foreign_ companie

Pythonic search of list of dictionaries

2005-01-04 Thread Bulba!
Hello everyone, I'm reading the rows from a CSV file. csv.DictReader puts those rows into dictionaries. The actual files contain old and new translations of software strings. The dictionary containing the row data looks like this: o={'TermID':'4', 'English':'System Administration', 'Polish':

Re: Speed ain't bad

2005-01-02 Thread Bulba!
On Sat, 1 Jan 2005 14:20:06 +0100, "Anders J. Munch" <[EMAIL PROTECTED]> wrote: >> One of the posters inspired me to do profiling on my newbie script >> (pasted below). After measurements I have found that the speed >> of Python, at least in the area where my script works, is surprisingly >> high.

Re: The Industry choice

2005-01-02 Thread Bulba!
On Fri, 31 Dec 2004 21:08:02 GMT, [EMAIL PROTECTED] (Cameron Laird) wrote: >Let me add a cautionary note, though: Big Companies, >including Oracle, Software AG, IBM, Cisco, and so on, have >adopted Tcl over and over. All of them still rely on Tcl >for crucial products. All of them also have emp

Re: The Industry choice

2005-01-02 Thread Bulba!
On Sat, 01 Jan 2005 15:08:01 -0500, Steve Holden <[EMAIL PROTECTED]> wrote: >> There is the stability issue you mention... but also probably the fear >> issue. If you choose a solution from a major company -- then it fails for >> some reason or they drop the product -- it's their fault -- you've g

Re: The Industry choice

2005-01-02 Thread Bulba!
On Sat, 01 Jan 2005 13:28:16 -0600, "Rob Emmons" <[EMAIL PROTECTED]> wrote: >> For managers of companies it's worse: the company makes >> VERY substantial investments into any technology it "marries", >> and that means big losses if it goes. Long-term stability >> of this technology in terms of "w

Re: More baby squeaking - iterators in a class

2004-12-31 Thread Bulba!
On Fri, 31 Dec 2004 16:31:45 GMT, Steven Bethard <[EMAIL PROTECTED]> wrote: >py> p = R3('eggs') >py> i = p.__iter__() >py> i.next() >'s' >or >py> p = R3('eggs') >py> i = iter(p) >py> i.next() >'s' And that is precisely what I needed to know. Thanks, to you, Terry and everyone who took time to l

Re: Speed ain't bad

2004-12-31 Thread Bulba!
On 31 Dec 2004 06:05:44 -0800, Paul Rubin wrote: >> (initially, that was just a shell script, but whitespaces and >> strange chars that users love to enter into filenames break >> just too many shell tools) >I didn't look at your script, but why not just use info-zip?

Re: Speed ain't bad

2004-12-31 Thread Bulba!
On Fri, 31 Dec 2004 13:19:44 +0100, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote: >> True; however, it's my understanding that compressing individual files >> also means that in the case of damage to the archive it is possible to >> recover the files after the damaged file. This cannot be guarant

Re: Speed ain't bad

2004-12-31 Thread Bulba!
On Thu, 30 Dec 2004 22:17:10 -0500, Jeremy Bowers <[EMAIL PROTECTED]> wrote: >I would point out a couple of other ideas, though you may be aware of >them: Compressing all the files seperately, if they are small, may greatly >reduce the final compression since similarities between the files can not

Re: Speed ain't bad

2004-12-31 Thread Bulba!
On Fri, 31 Dec 2004 13:19:44 +0100, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote: >> True; however, it's my understanding that compressing individual files >> also means that in the case of damage to the archive it is possible to >> recover the files after the damaged file. This cannot be guarant

Re: The Industry choice

2004-12-31 Thread Bulba!
On 31 Dec 2004 03:49:44 -0800, Paul Rubin wrote: >It's not just a matter of attitude or politics. Python is an >excellent choice for many projects. For some other projects, it's >clearly unsuitable. For yet other projects, it's a plausible choice >but there are sound t

Re: The Industry choice

2004-12-31 Thread Bulba!
On Thu, 30 Dec 2004 12:59:57 -0500, Steve Holden <[EMAIL PROTECTED]> wrote: >> We either need time for folks to accept dynamic, "scripting" >> languages, or a lot of "modern" language programmers need to gang up >> against managers and stuff. :) >[...] >Right, what have the managers ever done for

Re: More baby squeaking - iterators in a class

2004-12-31 Thread Bulba!
On Thu, 30 Dec 2004 12:06:31 -0800, Scott David Daniels <[EMAIL PROTECTED]> wrote: >Here's one way: # (Make __iter__ an iterator) >Py> class R1(object): > def __init__(self, data): > self.data = data > self.i = len(data) > def __iter__(self): >

Re: The Industry choice

2004-12-30 Thread Bulba!
On Thu, 30 Dec 2004 12:59:57 -0500, Steve Holden <[EMAIL PROTECTED]> wrote: >> We either need time for folks to accept dynamic, "scripting" >> languages, or a lot of "modern" language programmers need to gang up >> against managers and stuff. :) >[...] >Right, what have the managers ever done for

Re: The Industry choice

2004-12-30 Thread Bulba!
On 30 Dec 2004 08:58:36 -0800, "Sridhar R" <[EMAIL PROTECTED]> wrote: >>From technical point of view, I could not understand the the reasoning >behind using Java in major companies. Sure that Python, is used in >some, but still Java is considered as a sure-job language. > >After being a python p

Speed ain't bad

2004-12-30 Thread Bulba!
One of the posters inspired me to do profiling on my newbie script (pasted below). After measurements I have found that the speed of Python, at least in the area where my script works, is surprisingly high. This is the experiment: a script recreates the folder hierarchy somewhere else and stores

More baby squeaking - iterators in a class

2004-12-30 Thread Bulba!
Hello Mr Everyone, From: http://docs.python.org/tut/node11.html#SECTION001190 "Define a __iter__() method which returns an object with a next() method. If the class defines next(), then __iter__() can just return self:" The thing is, I tried to define __iter__() directly without

Re: Features for a Python package manager?

2004-12-29 Thread Bulba!
On Sat, 25 Dec 2004 11:37:42 +0100, Georg Brandl <[EMAIL PROTECTED]> wrote: >what features would you expect of a Python package manager, similar to >CPAN or rubygems? IMVHO it would be nice if it had a feature for "upload package/module I have just developed" - maybe PyPi would fill up faster if

PyQt installation problem

2004-12-29 Thread Bulba!
I got an evaluation version of Qt for Windows and installed PyQt. However, it gives me this error message: "ImportError: DLL load failed:" It doesn't seem to see the "qt-mteval" DLL, even though I made sure that the paths to "lib" and "bin" subfolders of Qt are there in the PATH. I installed Qt

Re: Newbie question - default values of a function

2004-12-22 Thread Bulba!
Thanks everyone (esp. Fredrik, http://www.effbot.org/zone/index.htm contains lotsa goodies by him I intend to study), I'm going offline to reboot my brain. ;-) -- It's a man's life in a Python Programming Association. -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie question - default values of a function

2004-12-22 Thread Bulba!
On Wed, 22 Dec 2004 22:29:44 GMT, "Matt Gerrans" <[EMAIL PROTECTED]> wrote: >Actually i was not mutable. Try this: >i = 1 >id(i) >i += 1 >id(i) Looks like I will have to read the Language Reference anyway. :-( >Because you are assigning the local reference variable L to a new list, >instead

Newbie question - default values of a function

2004-12-22 Thread Bulba!
OK. Don't laugh. There's this example from tutorial, showing how default value is computed once when defining function and shared between function calls: --- def f(a, L=[]): L.append(a) return L print f(1) print f(2) print f(3) This will print [1] [1, 2] [1, 2, 3] --- (Pyth

Re: Best GUI for small-scale accounting app?

2004-12-21 Thread Bulba!
On Tue, 21 Dec 2004 16:20:48 -0500, Ed Leafe <[EMAIL PROTECTED]> wrote: > You might want to check out Dabo, an application framework of which I >am one of the authors. We use wxPython as our UI toolkit, but have >streamlined the programming of the UI. We've also added data binding, >maki

Re: Best GUI for small-scale accounting app?

2004-12-20 Thread Bulba!
On 20 Dec 2004 05:53:03 -0800, "RM" <[EMAIL PROTECTED]> wrote: >Here is another question, are you deploying in Linux, Windows, Mac, or >some combination of these? I think that may be a big factor to >consider. I do like the look of Qt under Linux, however, I have never >seen it under Windows. Q

Re: Best GUI for small-scale accounting app?

2004-12-20 Thread Bulba!
On 20 Dec 2004 05:36:48 -0800, Paul Rubin wrote: >Zope seems huge to me too. I'd just use a Python cgi, optionally with >one of the simpler Python template libraries. Just try to keep things >simple, and never allow access except to authorized, trusted users >(i.e. don

Re: Best GUI for small-scale accounting app?

2004-12-20 Thread Bulba!
On Mon, 20 Dec 2004 11:37:23 -0200, Carlos Ribeiro <[EMAIL PROTECTED]> wrote: But if the data entry >forms are simple, I recommend you to check some lightweight approaches >for Web development in Python. I personally used CherryPy >(www.cherrypy.org); you can also check Quixote or Snakelets. All th

Re: Best GUI for small-scale accounting app?

2004-12-20 Thread Bulba!
On Mon, 20 Dec 2004 08:03:38 -0500, Steve Holden <[EMAIL PROTECTED]> wrote: >Personally I think that the choice may well come down to which API is >closest to what Bulba has used in the past. Well I haven't used any of them - I only plan to start learning and using GUI to

Re: Best GUI for small-scale accounting app?

2004-12-20 Thread Bulba!
On 20 Dec 2004 04:43:06 -0800, Paul Rubin wrote: >> I'll soon start development of a specialized small app and need >> to choose GUI for it. >> >> I have narrowed the choice to wxPython/PythonCard and QT/PyQT >What does the app need to do? Basically, it's for a "d

Best GUI for small-scale accounting app?

2004-12-20 Thread Bulba!
I'll soon start development of a specialized small app and need to choose GUI for it. I have narrowed the choice to wxPython/PythonCard and QT/PyQT (buying commercial licenses is not a big problem, the company would pay for it). Which is better for this kind of application? I mean, looking f

Re: Directory structure inside a ZipFile object

2004-12-09 Thread Bulba!
On Thu, 09 Dec 2004 07:42:57 -0800, Scott David Daniels <[EMAIL PROTECTED]> wrote: >Look into the two-argument form of the write command: Well, I should have guessed that, it works. Thanks! > import zipfile > archive = zipfile.ZipFile('box.zip', 'w', zipfile.ZIP_DEFLATED) > archive.

Directory structure inside a ZipFile object

2004-12-08 Thread Bulba!
Hello everyone, I'm a newbie to Python, learning it and tried to write the script that would read file, zip it, and put in the target directory. I used ZipFile module (code below). It works nice, except the zipfile created contains the directory path of the source file -- which I do NOT want to r