Re: Graph library recommendations for large graphs

2009-08-24 Thread Istvan Albert
On Aug 24, 5:37 pm, VanL wrote: > > Can anybody who has worked with large graphs before give a recommendation? > when using large graphs another limitation may come from the various graph algorithm run times. Most likely you will need to squeeze out as much as possible and a python implementation

Re: anyone with genomewide microarray analysis experience ?

2009-08-15 Thread Istvan Albert
On Aug 14, 8:52 am, trias wrote: > Does anyone have some scripts I could use for this purpose. I work with > S.cerevisiae Since the largest chromosome on the yeast genome is around 4 million bp, the easiest way to accomplish your goal is to create a list of the same size as the chromosome, then

Re: Relative Imports, why the hell is it so hard?

2009-03-24 Thread Istvan Albert
On Mar 24, 9:35 pm, Maxim Khitrov wrote: > Works perfectly fine with relative imports. This only demonstrates that you are not aware of what the problem actually is. Try using relative imports so that it works when you import the module itself. Now run the module as a program. The same module t

Re: Relative Imports, why the hell is it so hard?

2009-03-24 Thread Istvan Albert
On Mar 24, 3:16 pm, "Gabriel Genellina" wrote: > Did you know, once a module is imported by the first time yeah yeah, could we not get sidetracked with details that are not relevant? what it obviously means is to import it in all of your modules that need to access to relative paths > I don't u

Re: Relative Imports, why the hell is it so hard?

2009-03-24 Thread Istvan Albert
On Mar 23, 10:16 am, CinnamonDonkey wrote: > I'm fairly new to Python so I still have a lot to learn. But I'd like > to know how to correectly use relative imports. Relative imports are *fundamentally* broken in python. You will soon see that code using relative import will break if you attempt

Re: what IDE is the best to write python?

2009-02-03 Thread Istvan Albert
On Feb 2, 12:06 pm, Thorsten Kampe wrote: > > It makes my eyes bleed > > Ever tried sunglasses? Sunglasses for bleeding eyes? For pete's sake try bandages. -- http://mail.python.org/mailman/listinfo/python-list

Re: no sign() function ?

2008-12-22 Thread Istvan Albert
> conclusions --- try testing on a large number of candidates that are all (or mostly) positive or all (or mostly) negative and you'll see performance numbers that are substantially different than the ones you report: candidates = range(1000) In general the func

Re: Don't you just love writing this sort of thing :)

2008-12-05 Thread Istvan Albert
On Dec 3, 8:07 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED] central.gen.new_zealand> wrote: Originally, like many others here I said YIKES! but on a second read, it is not that bad. It actually grows on you. After looking at it one more time I found it neat, very concise without being unreadable.

Re: slow Python 3.0 write performance?

2008-12-05 Thread Istvan Albert
On Dec 5, 3:41 pm, Christian Heimes <[EMAIL PROTECTED]> wrote: > I've fixed the read() slowness yesterday. You'll get the fix in the next > release of Python 3.0 in a couple of weeks. Does this fix speed up the write() function as well? A previous poster suggested that in this case the slowdown

Re: slow Python 3.0 write performance?

2008-12-05 Thread Istvan Albert
On Dec 5, 3:06 pm, [EMAIL PROTECTED] wrote: > It should get faster over time.  It will get faster over a shorter period of > time if people contribute patches. I see, thanks for the clarification. I will make the point though that this makes python 3.0 unsuited for anyone who has to process data

slow Python 3.0 write performance?

2008-12-05 Thread Istvan Albert
Could someone run the code below on both Python 2.5 and 3.0 For me (on Windows) it runs over 7 times slower with Python 3.0 import time lo, hi, step = 10**5, 10**6, 10**5 # writes increasingly more lines to a file for N in range(lo, hi, step): fp = open('foodata.txt', 'wt') start = time

Re: Python 3 read() function

2008-12-04 Thread Istvan Albert
Turns out write performance is also slow! The program below takes 3 seconds on python 2.5 17 seconds on python 3.0 yes, 17 seconds! tested many times in various order. I believe the slowdowns are not constant (3x) but some sort of nonlinear function (quadratic?) play with the N to see it.

Re: Python 3 read() function

2008-12-04 Thread Istvan Albert
On Dec 4, 1:31 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: > Jerry Hill wrote: > > That's 3 orders of magnitude slower on python3.0! > > Timing of os interaction may depend on os.  I verified above on WinXp > with 4 meg Pythonxy.chm file.  Eye blink versus 3 secs, duplicated.  I > think something

Re: Python 3 read() function

2008-12-04 Thread Istvan Albert
I can confirm this, I am getting very slow read performance when reading a smaller 20 MB file. - Python 2.5 takes 0.4 seconds - Python 3.0 takes 62 seconds fname = "dmel-2R-chromosome-r5.1.fasta" data = open(fname, 'rt').read() print ( len(data) ) -- http://mail.python.org/mailman/listinfo/py

Re: RELEASED Python 3.0 final

2008-12-04 Thread Istvan Albert
Congratulations on a fantastic work! -- http://mail.python.org/mailman/listinfo/python-list

Re: multiprocessing eats memory

2008-09-26 Thread Istvan Albert
On Sep 26, 4:52 am, redbaron <[EMAIL PROTECTED]> wrote: > How could I avoid of storing them? I need something to check does it > ready or not and retrieve results if ready. I couldn't see the way to > achieve same result without storing asyncs set. It all depends on what you are trying to do. The

Re: multiprocessing eats memory

2008-09-25 Thread Istvan Albert
On Sep 25, 8:40 am, "Max Ivanov" <[EMAIL PROTECTED]> wrote: > At any time in main process there are shouldn't be no more than two copies of > data > (one original data and one result). >From the looks of it you are storing a lots of references to various copies of your data via the async set. --

Re: Processing in Python

2008-05-20 Thread Istvan Albert
On May 20, 6:13 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Salvatore DI DI0 schrieb: > > > Hello, > > > The Processing Graphics language has been implemented in Javascript. > > No, it hasn't. Processing is written in Java. He meant it has been re-implemented in Javascript: http://ejohn.o

Re: ]ANN[ Vellum 0.16: Lots Of Documentation and Watching

2008-05-01 Thread Istvan Albert
On Apr 29, 3:51 am, "Zed A. Shaw" <[EMAIL PROTECTED]> wrote: > You can grab the most recent draft of the book at: > > http://zedshaw.com/projects/vellum/manual-final.pdf > However, I'm curious to get other people's thoughts. IMO if you would refrain from using swear words in the manual it would

Re: Python Success stories

2008-04-23 Thread Istvan Albert
On Apr 23, 2:08 pm, Bob Woodham <[EMAIL PROTECTED]> wrote: > x = x++; > > has unspecified behaviour in C. That is, it is not specified > whether the value of x after execution of the statement is the > old value of x or one plus the old value of x. unspecified means that the result could be anyt

Re: Python Success stories

2008-04-22 Thread Istvan Albert
On Apr 22, 6:25 am, azrael <[EMAIL PROTECTED]> wrote: > A friend of mine i a proud PERL developer which always keeps making > jokes on python's cost. > This hurts. Please give me informations about realy famous > aplications. you could show him what Master Yoda said when he compared Python to Pe

Re: py3k s***s

2008-04-18 Thread Istvan Albert
On Apr 18, 1:39 am, Sverker Nilsson <[EMAIL PROTECTED]> wrote: > Some whine. Some just don't care. Why not whine? Whining and ranting is actually good for the psyche. It is better to get it out of your system. As for your original post, no doubt there are substantial downsides to introducing Py3

Re: I am worried about Python 3

2008-04-09 Thread Istvan Albert
On Apr 9, 11:53 am, John Nagle <[EMAIL PROTECTED]> wrote: > The general consensus is that Python 3.x isn't much of an there are a number of unfortunate typos in there that interfere with the message, instead of "The general consensus is" I think you actually meant "In my opinion" i. -- ht

Re: Is subprocess.Popen completely broken?

2008-03-27 Thread Istvan Albert
On Mar 27, 10:53 am, Skip Montanaro <[EMAIL PROTECTED]> wrote: > Is subprocess.Popen completely broken? Your lack of faith in Python is somewhat disturbing ... -- http://mail.python.org/mailman/listinfo/python-list

Re: Line segments, overlap, and bits

2008-03-27 Thread Istvan Albert
On Mar 26, 5:28 pm, Sean Davis <[EMAIL PROTECTED]> wrote: > I am working with genomic data. Basically, it consists of many tuples > of (start,end) on a line. I would like to convert these tuples of > (start,end) to a string of bits where a bit is 1 if it is covered by > any of the regions describ

Re: sympy: what's wrong with this picture?

2008-03-04 Thread Istvan Albert
On Mar 4, 3:13 pm, Mensanator <[EMAIL PROTECTED]> wrote: > But what if _I_ wanted to make a repeatable sequence for test > purposes? Wouldn't factorint() destroy my attempt by reseeding > on every call? Would it? It may just be that you are now itching to see a problem even where there isn't one

Re: ANN: Phatch = PHoto bATCH processor and renamer based on PIL

2008-02-21 Thread Istvan Albert
On Feb 18, 9:58 am, "SPE - Stani's Python Editor" <[EMAIL PROTECTED]> wrote: > I'm pleased to announce the release of Phatch which is a > powerful batch processor and renamer. Phatch exposes a big part of This program is fantastic! Very accesible user interface and produces ggreat images. Thanks!

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-05 Thread Istvan Albert
On Feb 5, 4:56 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > Could it be because .NET doesn't have arbitrary length integer types > and your little benchmark will create lots of integers > 2**32 ? > What is the result if you replace foo(a) with > def foo(a): return sqrt(a) Good observation,

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-05 Thread Istvan Albert
On Feb 5, 12:31 pm, dmitrey <[EMAIL PROTECTED]> wrote: > Hi all, > the urlhttp://torquedev.blogspot.com/2008/02/changes-in-air.html > (blog of a game developers) > says IronPython is faster than CPython in 1.6 times. > Is it really true? This is a second time around that IronPython piqued my inter

Re: Bizarre behavior with mutable default arguments

2007-12-30 Thread Istvan Albert
On Dec 30, 3:41 pm, bukzor <[EMAIL PROTECTED]> wrote: > No globals, as you specified. BTW, it's silly not to 'allow' globals > when they're called for, otherwise we wouldn't need the 'global' > keyword. okay, now note that you do not actually use the ingroup list for anything else but getting and

Re: Bizarre behavior with mutable default arguments

2007-12-30 Thread Istvan Albert
On Dec 30, 11:26 am, George Sakkis <[EMAIL PROTECTED]> wrote: > I'm with you on this one; IMHO it's one of the relatively few language > design missteps of Python, favoring the rare case as the default > instead of the common one. George, you pointed this out this link in a different thread http

Re: Fate of itertools.dropwhile() and itertools.takewhile()

2007-12-30 Thread Istvan Albert
On Dec 30, 3:29 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > One "recipe" is extracting blocks from text files that are delimited by a > special start and end line. Neat solution! I actually need such functionality every once in a while. Takewhile + dropwhile to the rescue! i. --

Re: Bizarre behavior with mutable default arguments

2007-12-30 Thread Istvan Albert
On Dec 29, 11:21 pm, bukzor <[EMAIL PROTECTED]> wrote: > The standard library is not affected because the people who wrote code into it know how python works. Programming abounds with cases that some people think should work differently: a = b = [] a.append(1) is b empty or not at this point?

Re: Bizarre behavior with mutable default arguments

2007-12-30 Thread Istvan Albert
On Dec 30, 5:23 am, thebjorn <[EMAIL PROTECTED]> wrote: >def age(dob, today=datetime.date.today()): >... > > None of my unit tests caught that one :-) interesting example I can see how it caused some trouble. A quick fix would be to write it: def age(dob, today=datetime.date.today ):

Re: Fate of itertools.dropwhile() and itertools.takewhile()

2007-12-29 Thread Istvan Albert
On Dec 29, 6:10 pm, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > These thoughts reflect my own experience with the itertools module. > It may be that your experience with them has been different. Please > let me know what you think. first off, the itertools module is amazing, thanks for creati

Re: Bizarre behavior with mutable default arguments

2007-12-29 Thread Istvan Albert
On Dec 29, 1:11 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Google for "Python mutable default arguments" and a mere 30 minutes later this thread is already one of the results that come up -- http://mail.python.org/mailman/listinfo/python-list

Re: Bizarre behavior with mutable default arguments

2007-12-29 Thread Istvan Albert
On Dec 29, 12:50 pm, bukzor <[EMAIL PROTECTED]> wrote: > Is this functionality intended? It seems very unintuitive. This has > caused a bug in my programs twice so far, and both times I was > completely mystified until I!realized that the default value was > changing. it is only unintuitive when

Re: joining rows

2007-12-29 Thread Istvan Albert
on a second read ... I see that you mean the case that should only join consecutive lines with the same key -- http://mail.python.org/mailman/listinfo/python-list

Re: joining rows

2007-12-29 Thread Istvan Albert
On Dec 29, 10:22 am, Tim Chase <[EMAIL PROTECTED]> wrote: > If, however, order matters, you have to do it in a slightly > buffered manner. > Can be reduced to a sed one-liner I think the original version works just as well for both cases. Your sed version however does need the order you mention.

Re: sqlobject issue/question...

2007-12-29 Thread Istvan Albert
On Dec 28, 11:27 pm, "bruce" <[EMAIL PROTECTED]> wrote: > i'm playing around, researching sqlobject, and i notice that it appears to > require the use of "id" in each tbl it handles in the database. > is there a way to overide this function/behavior... there better be such way. An ORM that does

Re: Converting old "shelve" databases to gdbm

2007-12-24 Thread Istvan Albert
On Dec 24, 7:38 pm, [EMAIL PROTECTED] wrote: > Any tips welcome. pickling has a text protocol that should be compatible across python versions. Pickle each of your database entries to a different file, then read them in the newer version of the script. i. -- http://mail.python.org/mailman/list

Re: Understanding memory leak reports

2007-12-21 Thread Istvan Albert
On Dec 21, 1:44 pm, "Giampaolo Rodola'" <[EMAIL PROTECTED]> wrote: > Since the main module is very big (more than 2800 lines of code) maybe that is the actual problem to begin with, you should refactor it so it it more modular and trackable, otherwise this is just one of the many issues that wil

Re: 2D Game Development in Python

2007-12-21 Thread Istvan Albert
On Dec 20, 8:16 pm, PatrickMinnesota <[EMAIL PROTECTED]> wrote: > seen all the lists. I've done my reading. What I don't have is > actual testimonials by people who have used a chunk of code to program > an animated 2D game and had a great experience. You could use Panda3D to create the game, w

Re: pypi and easy_install

2007-12-19 Thread Istvan Albert
On Dec 19, 9:44 pm, Istvan Albert <[EMAIL PROTECTED]> wrote: > On Dec 19, 8:07 pm, "Giampaolo Rodola'" <[EMAIL PROTECTED]> wrote: > > download_url = 'http://code.google.com/p/pyftpdlib/downloads/list', this is from looking at your setup.py he

Re: pypi and easy_install

2007-12-19 Thread Istvan Albert
On Dec 19, 8:07 pm, "Giampaolo Rodola'" <[EMAIL PROTECTED]> wrote: > Could someone point me in the right direction? > download_url = 'http://code.google.com/p/pyftpdlib/downloads/list', you'll need to specify the full path to the actual archive, a link that one could use to download the archive,

Re: Is anyone happy with csv module?

2007-12-11 Thread Istvan Albert
On Dec 11, 2:14 pm, "massimo s." <[EMAIL PROTECTED]> wrote: > dislike more is that it seems working by *rows* instead than by > *columns*. you can easily transpose the data to get your columns, for a data file that looks like this: data.txt A,B,C 1,2,3 10,20,30 100,200,300 do the foll

Re: Running unmodified CGI scripts persistently under mod_wsgi.

2007-12-08 Thread Istvan Albert
On Dec 8, 8:26 am, Michael Ströder <[EMAIL PROTECTED]> wrote: > But conventional CGI scripts are implemented with the assumption of being > stateless. while it might be that some CGI scripts must be executed in a new python process on each request, common sense and good programming practices wou

Re: Running unmodified CGI scripts persistently under mod_wsgi.

2007-11-27 Thread Istvan Albert
On Nov 25, 1:55 am, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > The other question is whether there is even a demand for this. Do > people want to be able to take unmodified Python CGI scripts and try > to run them persistently in this way, or would they be better off > converting them to proper

Re: Python web frameworks

2007-11-22 Thread Istvan Albert
On Nov 21, 12:15 am, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > I would say that that is now debatable. Overall mod_wsgi is probably a > better package in terms of what it has to offer. Only thing against > mod_wsgi at this point is peoples willingness to accept something that > is new in conju

Re: Python web frameworks

2007-11-20 Thread Istvan Albert
On Nov 20, 9:42 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > 12/7. Django comes with its own little server so that you don't have > > to set up Apache on your desktop to play with it. > > I was rather shocked to learn that django only has this tiny server and does > not come with a stand-a

Re: Populating a dictionary, fast [SOLVED]

2007-11-20 Thread Istvan Albert
On Nov 19, 2:33 pm, Francesc Altet <[EMAIL PROTECTED]> wrote: > Just for the record. I was unable to stop thinking about this, and > after some investigation, I guess that my rememberings were gathered > from some benchmarks with code in Pyrex (i.e. pretty near to C speed). Pretty interesting an

Re: Populating a dictionary, fast [SOLVED SOLVED]

2007-11-16 Thread Istvan Albert
On Nov 16, 1:18 pm, "Michael Bacarella" <[EMAIL PROTECTED]> wrote: > You're right, it is completely inappropriate for us to be showing our > dirty laundry to the public. you are misinterpreting my words on many levels, (and I of course could have refrained from the "chair-monitor" jab as well)

Re: gc penalty of 30-40% when manipulating large data structures?

2007-11-16 Thread Istvan Albert
On Nov 16, 10:59 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > The GC has a heuristic where it kicks in when (allocations - > deallocations) exceeds a certain threshold, As the available ram increases this threshold can be more easily reached. Ever since I moved to 2Gb ram I stumbled upon issue

Re: Populating a dictionary, fast [SOLVED SOLVED]

2007-11-15 Thread Istvan Albert
On Nov 15, 4:11 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > Unless you're accusing both myself and the original poster of outright > lying, of faking our results, what's your explanation? I don't attribute it to malice, I think you're simply measuring something else. You b

Re: Populating a dictionary, fast [SOLVED SOLVED]

2007-11-15 Thread Istvan Albert
On Nov 14, 6:26 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On systems with multiple CPUs or 64-bit systems, or both, creating and/or > deleting a multi-megabyte dictionary in recent versions of Python (2.3, > 2.4, 2.5 at least) takes a LONG time, of the order of 30+ minute

Re: Populating a dictionary, fast [SOLVED]

2007-11-13 Thread Istvan Albert
On Nov 13, 11:27 am, Francesc Altet <[EMAIL PROTECTED]> wrote: > Another possibility is using an indexed column in a table in a DB. > Lookups there should be much faster than using a dictionary as well. I would agree with others who state that for a simple key based lookup nothing beats a diction

Re: Populating a dictionary, fast

2007-11-12 Thread Istvan Albert
On Nov 12, 12:39 pm, "Michael Bacarella" <[EMAIL PROTECTED]> wrote: > The win32 Python or the cygwin Python? > > What CPU architecture? it is the win32 version, a dual core laptop with T5220 Core 2 -- http://mail.python.org/mailman/listinfo/python-list

Re: Populating a dictionary, fast

2007-11-11 Thread Istvan Albert
On Nov 11, 11:51 am, Michael Bacarella <[EMAIL PROTECTED]> wrote: > and see it take about 45 minutes with this: > > $ cat cache-keys.py > #!/usr/bin/python > v = {} > for line in open('keys.txt'): > v[long(line.strip())] = True On my system (windows vista) your code (using your data) runs

Re: Populating a dictionary, fast

2007-11-11 Thread Istvan Albert
On Nov 11, 11:25 am, Michael Bacarella <[EMAIL PROTECTED]> wrote: > I tried your code (with one change, time on feedback lines) and got the > same terrible > performance against my data set. > To prove that my machine is sane, I ran the same against your generated > sample file and got _excellen

Re: Populating a dictionary, fast

2007-11-11 Thread Istvan Albert
On Nov 10, 4:56 pm, Michael Bacarella <[EMAIL PROTECTED]> wrote: > This would seem to implicate the line id2name[id] = name as being > excruciatingly slow. As others have pointed out there is no way that this takes 45 minutes.Must be something with your system or setup. A functionally equivalen

Re: NUCULAR fielded text searchable indexing

2007-10-27 Thread Istvan Albert
On Oct 17, 7:20 am, Steve Holden <[EMAIL PROTECTED]> wrote: > I still remember Gadfly fondly. What a great piece of software Gadfly is ... congrats on that Aaron. For me it was one of the first Python packages that truly stood out and made me want to learn Python. i. -- http://mail.python.org/

Re: CGI and external JavaScript nightmare

2007-10-22 Thread Istvan Albert
On Oct 18, 5:04 pm, IamIan <[EMAIL PROTECTED]> wrote: > > > The OP's problem is that he suffers from the delusion that people want > > > to steal the source code for hisCGIscript. > > Why is assuming someone may try to get my source CGI delusional? > > I'm on a shared server (Dreamhost). The CGI it

Re: CGI and external JavaScript nightmare

2007-10-11 Thread Istvan Albert
On Oct 11, 2:23 am, IamIan <[EMAIL PROTECTED]> wrote: > > is a very lengthy garbled js file > athttp://pagead2.googlesyndication.com/pagead/show_ads.js > > The first piece of JavaScript works fine and the ads display > correctly, however the second file throws an "unterminated string > literal" js

Re: Yet another comparison of Python Web Frameworks

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

Re: NUCULAR fielded text searchable indexing

2007-10-09 Thread Istvan Albert
On Oct 9, 9:14 am, [EMAIL PROTECTED] wrote: > a great tradition of tounge-in-cheek package names, like > "Cold fusion", for example. Cold Fusion is a super cool name. Nobody will every think of it as representing something odd or silly. > too late now. sorry again, why would it be late? is the

Re: NUCULAR fielded text searchable indexing

2007-10-09 Thread Istvan Albert
On Oct 9, 7:26 am, [EMAIL PROTECTED] wrote: > No, it doesn't stand for anything. It also reminds me of someone we all know, and I wish it didn't. As the latin proverb says "Nomen est omen". Calling your package "docindexer" would draw a lot more people. It is hard to justify to a third party tha

Re: Yet another comparison of Python Web Frameworks

2007-10-07 Thread Istvan Albert
On Oct 7, 12:24 pm, Michele Simionato <[EMAIL PROTECTED]> wrote: > Here we disagree: I think that a programmer should know what he > is using. My point was that they should not *need* to know. Too much information can be detrimental. > > Where is the session data stored: in memory, files, databa

Re: Yet another comparison of Python Web Frameworks

2007-10-07 Thread Istvan Albert
IMO this is not as much a framework comparison rather than an evaluation of the individual components that make up Pylons. The framework is the sum of all its parts. Programmers should not need to know that that a package named Beaker is used for sessions, Routes for url mapping, PasteDeploy for

Re: setuptools without unexpected downloads

2007-09-27 Thread Istvan Albert
On Sep 26, 2:09 am, Ben Finney <[EMAIL PROTECTED]> wrote: > behaviour with a specific invocation of 'setup.py'. But how can I > disallow this from within the 'setup.py' program, so my users don't > have to be aware of this unexpected default behaviour? I don't have the answer for this, but I can

Re: Tracking memory usage and object life time.

2007-09-26 Thread Istvan Albert
On Sep 26, 8:06 am, Berteun Damman <[EMAIL PROTECTED]> wrote: > that have been created after I don't need them anymore. I furthermore > don't really see why there would be references to these larger objects > left. (I can be mistaken of course). This could be tricky because you have a graph that

Re: Newbie completely confused

2007-09-24 Thread Istvan Albert
Two comments, > ... > self.item3 = float(foo[c]); c+=1 > self.item4 = float(foo[c]); c+=1 > self.item5 = float(foo[c]); c+=1 > self.item6 = float(foo[c]); c+=1 > ... this here (and your code in general) is mind boggling and not in a good way, as for you original question, I don't think that read

Re: Zope review

2007-09-21 Thread Istvan Albert
On Sep 21, 7:04 pm, "Sean Tierney" <[EMAIL PROTECTED]> wrote: > someone could contrast Zope w/ another Python framework like Twisted. > I've been investing some time in learning Zope/Plone and would love to > hear someone speak to alternatives. Twisted is a networking engine, Zope is a web appli

Re: Zope review

2007-09-21 Thread Istvan Albert
On Sep 20, 7:44 pm, Norm <[EMAIL PROTECTED]> wrote: > without meaning to start a flame war between the various python web > tools, I was wondering if anyone had a review of the status of Zope. > For example, is it being used for new projects or just maintenance? Zope is heavily used. It is a matu

Re: I could use some help making this Python code run faster using only Python code.

2007-09-20 Thread Istvan Albert
On Sep 20, 7:13 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > How come it's not? Then I noticed you don't have brackets in > the join statement. So I tried without them and got If memory serves me right newer versions of python will recognize and optimize string concatenation via the += op

Re: MemoryError on reading mbox file

2007-09-12 Thread Istvan Albert
On Sep 12, 5:27 am, Christoph Krammer <[EMAIL PROTECTED]> wrote: > string = self._file.read(stop - self._file.tell()) > MemoryError This line reads an entire message into memory as a string. Is it possible that you have a huge email in there (hundreds of MB) with some attachment encoded as te

Re: Speed of Python

2007-09-07 Thread Istvan Albert
On Sep 7, 12:42 pm, "wang frank" <[EMAIL PROTECTED]> wrote: > Is my conclusion correct that Python is slower than matlab? There are ways to speed up code execution, but to see substantial improvement you'll need to use numpy and rework the code to operate on vectors/matrices rather than building

Re: Haskell like (c:cs) syntax

2007-08-29 Thread Istvan Albert
On Aug 29, 8:12 am, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > >> Caution : L[0] and L[1:] are COPIES of the head and tail of the list. > Sorry, should have written RETURN copies instead of ARE copies. L[0] does not return a copy, it does what is says, returns the object stored at index 0. i.

Re: Misleading wikipedia article on Python 3?

2007-08-08 Thread Istvan Albert
On Aug 8, 2:00 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote: > I thought, in fact, that open was on more shaky ground. ;) yeah, that too ... > I can't find any evidence of that in the PEPs. Do you have a reference? here is something: http://svn.python.org/view/python/branches/p3yk/Misc/NEWS?rev=

Re: Misleading wikipedia article on Python 3?

2007-08-08 Thread Istvan Albert
On Aug 8, 12:08 pm, Paul Boddie <[EMAIL PROTECTED]> wrote: > However, for every enthusiast of one approach, there > will always be an enthusiast for another (see point #6): True. For example I for one also like the way the current print adds a newline, the vast majority of the time that is exact

Re: Misleading wikipedia article on Python 3?

2007-08-08 Thread Istvan Albert
On Aug 6, 6:11 am, Paul Rubin wrote: > Why on earth did they make this change? It just seems gratuitous. Having print a function (with parameters) makes is very easy to modify where the output goes. Say you want to have some prints go to one particular file, today you

Re: Misleading wikipedia article on Python 3?

2007-08-08 Thread Istvan Albert
On Aug 6, 6:49 am, Neil Cerutti <[EMAIL PROTECTED]> wrote: > Incidentally, from the second link I find it shocking that the > keyword parameter "file" shadows a builtin. It seems to endorse a > bad practice. I believe that the "file" builtin has been removed as well so it won't shadow anything.

Re: This bit of code hangs Python Indefinitely

2007-08-08 Thread Istvan Albert
On Aug 8, 9:38 am, brad <[EMAIL PROTECTED]> wrote: > The problem is that I have 512 things to add to the queue, but my limit > is half that... whoops. Shouldn't the interpreter tell me that I'm an > idiot for trying to do this instead of just hanging? A message such as > this would be more appropri

Re: zip() function troubles

2007-07-27 Thread Istvan Albert
On Jul 27, 2:18 pm, Raymond Hettinger <[EMAIL PROTECTED]> wrote: >> What was really surprising is that it works >> with no issues up until 1 million items" later editing made the sentence more difficult to read I should have said: "What was really surprising is that zip works with no issues up un

Re: zip() function troubles

2007-07-27 Thread Istvan Albert
On Jul 27, 2:16 am, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > References are not objects. yes this a valid objection, but in all fairness the example in the original post operates on comparably sized objects and also exhibited unexpected performance degradation as it turns out the garbage coll

Re: zip() function troubles

2007-07-27 Thread Istvan Albert
On Jul 27, 1:24 am, Peter Otten <[EMAIL PROTECTED]> wrote: > When you are allocating a lot of objects without releasing them the garbage > collector kicks in to look for cycles. Try switching it off: > > import gc > gc.disable() Yes, this solves the problem I was experiencing. Thanks. Istvan --

Re: zip() function troubles

2007-07-26 Thread Istvan Albert
On Jul 26, 9:33 pm, Paul Rubin wrote: > Do a top or vmstat while that is happening and see if you are > swapping. You are allocating 10 million ints and 10 million tuple > nodes, = 20 million objects. Although, even at 100 bytes per object > that would be 1GB which wou

Re: zip() function troubles

2007-07-26 Thread Istvan Albert
On Jul 26, 7:44 pm, Paul Rubin <http://[EMAIL PROTECTED]> wrote: > Istvan Albert <[EMAIL PROTECTED]> writes: > > exceeded 10 million the zip function slowed to a crawl. Note that > > there was memory available to store over 100 million items. > > How many byte

zip() function troubles

2007-07-26 Thread Istvan Albert
Hello all, I've been debugging the reason for a major slowdown in a piece of code ... and it turns out that it was the zip function. In the past the lists that were zipped were reasonably short, but once the size exceeded 10 million the zip function slowed to a crawl. Note that there was memory av

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-19 Thread Istvan Albert
On May 19, 3:33 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > >That would be invalid syntax since the third line is an assignment > > with target identifiers separated only by spaces. > > Plus, the identifier starts with a number (even though 6 is not DIGIT > SIX, but FULLWIDTH DIGIT SIX,

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-18 Thread Istvan Albert
On May 17, 2:30 pm, Gregor Horvath <[EMAIL PROTECTED]> wrote: > Is there any difference for you in debugging this code snippets? > class Türstock(object): Of course there is, how do I type the ü ? (I can copy/paste for example, but that gets old quick). But you're making a strawman argument by

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-17 Thread Istvan Albert
On May 17, 9:07 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > up. I interviewed about 20 programmers (none of them Python users), and > most took the position "I might not use it myself, but it surely > can't hurt having it, and there surely are people who would use it". Typically when you a

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-17 Thread Istvan Albert
On May 16, 11:09 pm, Gregor Horvath <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > On May 16, 12:54 pm, Gregor Horvath <[EMAIL PROTECTED]> wrote: > >> Istvan Albert schrieb: > > >> So the solution is to forbid Chinese XP ? Who sai

Re: Python Web Programming - looking for examples of solid high-traffic sites

2007-05-17 Thread Istvan Albert
On May 16, 5:04 pm, Victor Kryukov <[EMAIL PROTECTED]> wrote: > Our main requirement for tools we're going to use is rock-solid > stability. As one of our team-members puts it, "We want to use tools > that are stable, has many developer-years and thousands of user-years > behind them, and that we

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Istvan Albert
As a non-native English speaker, On May 13, 11:44 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > - should non-ASCII identifiers be supported? why? No. I don't think it adds much, I think it will be a little used feature (as it should be), every python instructor will start their class by say

web development with python - comparison

2007-03-26 Thread Istvan Albert
Here is a comprehensive review of python web apps: http://jesusphreak.infogami.com/blog/vrp1 Since this comes up every so often in this group. i. -- http://mail.python.org/mailman/listinfo/python-list

Re: Graphviz Python Binding for Python 2.5 on Windows?

2007-03-06 Thread Istvan Albert
On Mar 6, 3:18 pm, "Istvan Albert" <[EMAIL PROTECTED]> wrote: > try the networkx package, it includes the pygraphviz module that can > generate dot files: > > https://networkx.lanl.gov/wiki should've checked it before posting, it seems nowadays is a

Re: Graphviz Python Binding for Python 2.5 on Windows?

2007-03-06 Thread Istvan Albert
On Mar 5, 5:16 pm, "Alex Li" <[EMAIL PROTECTED]> wrote: > I tried to avoid. Any suggestions? try the networkx package, it includes the pygraphviz module that can generate dot files: https://networkx.lanl.gov/wiki Istvan -- http://mail.python.org/mailman/listinfo/python-list

Re: threading and multicores, pros and cons

2007-02-14 Thread Istvan Albert
On Feb 14, 1:33 am, Maric Michaud <[EMAIL PROTECTED]> wrote: > At this time, it 's not easy to explain him that python > is notflawed compared to Java, and that he will not > regret his choice in the future. Database adaptors such as psycopg do release the GIL while connecting and exchanging data

Re: python shelve on win vs unix

2007-02-09 Thread Istvan Albert
On Feb 9, 6:06 am, Tor Erik Soenvisen <[EMAIL PROTECTED]> wrote: > Any suggestions for a quick and dirty solution (such as alternatives to > shelve for persistent storage) to this problem would be appreciated. the easiest might be to just pickle your data into files. You could also use Durus htt

Re: Return images with matplotlib?

2007-02-04 Thread Istvan Albert
On Feb 4, 8:18 pm, Jan Danielsson <[EMAIL PROTECTED]> wrote: > def barchart(req, params): >some_format = matplotlib.generate_fancy_graph(params) >png_buf = make_png_buffer(some_format) >return png_buf > >Is this possible? If so -- how? savefig does that. You can save to a file nam

  1   2   >