Re: Overloading __init__ & Function overloading

2005-09-30 Thread Istvan Albert
in python you can provide default values for your parameters: class BaseClass: def __init__(self, a=None): if a is None: #no parameter pass else: #one parameter pass baseclass1=BaseClass() baseclass2=BaseClass(1) --

Re: "no variable or argument declarations are necessary."

2005-10-04 Thread Istvan Albert
> What can one do to swiftly detect this type of bug? While I can only speak from my own experience I can't remember a single instance where this type of bug caused any kind of serious problem. IMHO these are very trivial errors, that get caught immediately and I would not even qualify them as

Re: Controlling who can run an executable

2005-10-04 Thread Istvan Albert
>was using to track clients and transactions. He couldn't demonstrate >the program for one reason or another because it was protected in a way >that neither could circumvent. (She didn't remember how it was >protected, she had hired this person a long time ago.) I'd venture to guess that neither

Re: New project coming up...stay with Python, or go with a dot net language??? Your thoughts please!

2005-10-04 Thread Istvan Albert
Disclaimer: this is not a flame against Boo. It just boggles my mind that a language that describes itself as "python inspired syntax" keeps being touted as: > Luis M. Gonzalez wrote: > Boo (which could be considered almost an static version of Python for .NET) Boo is *nothing* like a static ve

Re: New project coming up...stay with Python, or go with a dot net language??? Your thoughts please!

2005-10-04 Thread Istvan Albert
> It has many similarities, but also some fundamental differences, > considered "almost" a static python lol, if that is your definition of 'almost' then your statement is correct -- http://mail.python.org/mailman/listinfo/python-list

Re: Controlling who can run an executable

2005-10-04 Thread Istvan Albert
> I could ask her, "If you can't break it is that good enough security?" Guess not. Most non-programmers think everyone else who knows some programming is a some sort of hacker genius. Instead come up with a simple solution then explain her how it will works. I think in the ensuing conversation y

Re: How to delete yourself????

2005-10-14 Thread Istvan Albert
> But is this nice code??? Is there another way to delete yourself??? I think you are overcomplicating things. Don't think of it as deleting 'itself', since what you seem to need is deleting a reference to the instance. In your example the parent is a container and it usually makes more sense t

Re: XML Tree Discovery (script, tool, __?)

2005-10-26 Thread Istvan Albert
All I can add to this is: - don't use SAX unless your document is huge - don't use DOM unless someone is putting a gun to your head There's a good selection of nice and simple XML processing libraries in python. You could start with ElementTree. -- http://mail.python.org/mailman/listinfo/python

Re: How best to reference parameters.

2005-10-26 Thread Istvan Albert
Sounds like the Bunch: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52308 -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHON LOOSING FOR JAVA???????

2005-11-08 Thread Istvan Albert
> PYTHON LOOSING FOR JAVA??? Yes, Python is already looser than Java. -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI question

2005-11-29 Thread Istvan Albert
See urlparse: http://www.python.org/doc/current/lib/module-urlparse.html -- http://mail.python.org/mailman/listinfo/python-list

Re: an intriguing wifi http server mystery...please help

2005-11-30 Thread Istvan Albert
> The server is almost entirely based on the server found at: > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/259148 Try using a different python based webserver. This recipe might have some problems that cause the weird behavior. (The Karigell webframework uses a server based on this r

Re: an intriguing wifi http server mystery...please help

2005-11-30 Thread Istvan Albert
> But if it's a problem with the software, why does the server work > great when wired (i.e. not wireless)...that's the weird part. Don't be so quick to eliminate software error ... when it comes to bugs there are few rules. You are using a recipe that is *known* to produce weird behavior. Make

Re: CGI question

2005-12-01 Thread Istvan Albert
> I'm still wondering though, if there's some part of the python standard > modules that will convert those % escapes to ASCII or similar - and I believe that functionality is provided by the quote/unquote functions in the urllib module: http://www.python.org/doc/current/lib/module-urllib.html I

Re: Python evolution: Unease

2005-01-04 Thread Istvan Albert
Iwan van der Kleyn wrote: And I do sense (reading planet python/this newsgroup) a mindset or at least a tendency by the people who really matter in these discussion to keep on adding features to the syntax; to add "structure" to Python. My personal preference would be to leave the language alone

Re: Python evolution: Unease

2005-01-04 Thread Istvan Albert
Doug Holton wrote: application is so important that I expect Python 3000 will have optional type declarations integrated into the argument list." I think that *optional* part of the "optional type declaration" is a myth. It may be optional in the sense that the language will accept missing declarat

Re: Download .jpg from web

2005-01-06 Thread Istvan Albert
GMane Python wrote: Using a network camera with built-in webserver The first thing that might be worth investigating is this webserver. What kind of throughput is it capable of? How does it handle repeated requests etc. Your program won't be faster than the server that provides it with the data.

Re: Writing huge Sets() to disk

2005-01-10 Thread Istvan Albert
Martin MOKREJÅ wrote: But nevertheless, imagine 1E6 words of size 15. That's maybe 1.5GB of raw data. Will sets be appropriate you think? You started out with 20E20 then cut back to 1E15 keys now it is down to one million but you claim that these will take 1.5 GB. On my system storing 1 million wo

Re: Writing huge Sets() to disk

2005-01-10 Thread Istvan Albert
Martin MOKREJÅ wrote: Istvan Albert wrote: So you say 1 million words is better to store in dictionary than in a set and use your own function to get out those unique or common words? I have said nothing even remotely like that. Fine, that's what I wanted to hear. How do you improve the algo

Re: shutil.move has a mind of its own

2005-01-12 Thread Istvan Albert
Daniel Bickett wrote: In my script, rather than a file being moved to the desired location, it is, rather, moved to the current working directory (in this case, my desktop -- without any exceptions, mind you). As it happens, the what is the output generated by the lines: fdir, fname = randFileInfo.

Re: java 5 could like python?

2005-01-12 Thread Istvan Albert
vegetax wrote: previus two python proyects where relatively big,and python didnt feel well suited for the task. One typical problem that others might talk about in more detail is that you might be writing java code in python. That means using Java style class hierarchies, methods and overall organ

Re: Integration with java

2005-01-14 Thread Istvan Albert
Joachim Boomberschloss wrote: the code is already written in Python, using the standard libraries and several extension modules One thing to keep in mind is that Jython does not integrate CPython, instead it "understands" python code directly. So if you have a C extension that works with python i

Re: [perl-python] 20050113 looking up syntax

2005-01-14 Thread Istvan Albert
Jürgen Exner wrote: Why don't you just stop posting this nonsense? He will, fairly soon. I'm suspecting that the original intent behind these posts was to stir up a perl vs python flamewar. That is unlikely to materialize since the poster does not seem to understand neither of these languages. I. -

Re: Integration with java (Jpype vs. JPE)

2005-01-17 Thread Istvan Albert
Cameron Laird wrote: Someone really ought to include a couple of sentences to that effect on the front page of http://jpype.sf.net/ >. Now I remember visiting this site, but never understood how it actually worked. Examples such as: from jpype import * startJVM("d:/tools/j2sdk/jre/bin/client/jvm.dl

pychecker - sets.Set need to be overridden

2005-01-17 Thread Istvan Albert
Hello all, if I have this code: import sets class Foo: x = sets.Set() then pychecker says: test.py:4: Methods (__cmp__, __hash__) in sets.Set need to be overridden in a subclass I don't get this message. What is it trying to say, and why? Istvan. -- http://mail.python.org/mailman/listinfo/pyth

Re: pychecker - sets.Set need to be overridden

2005-01-17 Thread Istvan Albert
[EMAIL PROTECTED] wrote: <__main__.Foo instance at 0x00C578A0> Set([]) on 2.4. on WinXP. What environment do you run in? I'm running it on cygwin, but still don't get it, why the warning? Istvan. -- http://mail.python.org/mailman/listinfo/python-list

Re: pychecker - sets.Set need to be overridden

2005-01-17 Thread Istvan Albert
Peter Otten wrote: The Set class has implementations for __cmp__() and __hash__() that unconditionally raise an exception. pychecker assumes that these methods are "abstract", i. e. meant to be overriden by a subclass, and warns that you are instantiating an abstract base class, while the intention

Re: Integration with java (Jpype vs. JPE)

2005-01-18 Thread Istvan Albert
Steve Menard wrote: To asnwer your question more fully, the jpype-specific cide is only for looking up the Classes and startting/stopping the environment. For everything else, Java objects and classes are used as regular Python objects. Thanks for the response. Currently I don't need to use java

Re: What YAML engine do you use?

2005-01-20 Thread Istvan Albert
Reinhold Birkenfeld wrote: You will be amazed, and never think of XML again. XML with elementtree is what makes me never have think about XML again. Istvan. -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] XML design intent ... further musings

2005-01-24 Thread Istvan Albert
Paul Rubin wrote: I love this old rant about XML: http://groups-beta.google.com/group/comp.lang.lisp/msg/9a30c508201627ee This is my favorite: http://weblog.burningbird.net/archives/2002/10/08/the-parable-of-the-languages "I’m considered the savior, the ultimate solution, the final word. Odes are

Re: What YAML engine do you use?

2005-01-24 Thread Istvan Albert
rm wrote: http://www.theinquirer.net/?article=20868 :-) There's a lot of nonsense out there propagated by people who do not understand XML. You can't possibly blame that on XML... For me XSLT transformations are the main reason for using XML. If I have an XML document I can turn it into other forma

Re: 4suite XSLT thread safe ?

2005-01-26 Thread Istvan Albert
Diez B. Roggisch wrote: What do you mean by that? You can of course transform xml using xslt in as many threads as you like It is not unthinkable that some parts of the library would not be threadsafe. They could have some internal shared global variable that keeps track of an intermediate state.

Re: python memory blow out

2005-01-27 Thread Istvan Albert
Simon Wittber wrote: Does anyone have ideas on why this is occuring, or how I might otherwise prevent memory blow out? I don't know it this is a decent enough solution but if I were you I would try running the SQL service in a subshell. Within this subshell I would terminate then restart the prog

Re: The ONLY thing that prevents me from using Python

2005-08-05 Thread Istvan Albert
There are plenty of webhosts that offer python, do a little research. -- http://mail.python.org/mailman/listinfo/python-list

Re: Database connection caching

2005-03-18 Thread Istvan Albert
[EMAIL PROTECTED] wrote: Hi all, is there an alternative way of: - create a connection object - open the connection - close the connection psycopg, a Postgresql database adapter does connection pooling automatically http://initd.org/projects/psycopg1 Most Zope database adapters also have implicit c

Re: module imports and memory usage

2004-11-30 Thread Istvan Albert
Brad Tilley wrote: Also, is there a way to load and unload modules as they are needed. I have some scripts that sleep for extended periods during a while loop and I need to be as memory friendly as possible. I can post a detailed script that currently uses ~ 10MB of memory if anyone is interest

Re: pre-PEP generic objects

2004-12-02 Thread Istvan Albert
Steven Bethard wrote: I promised I'd put together a PEP for a 'generic object' data type for Python 2.5 that allows one to replace __getitem__ style access with dotted-attribute style access (without declaring another class). Any comments would be appreciated! IMHO this too easy to accomplish r

Re: pre-PEP generic objects

2004-12-03 Thread Istvan Albert
Steven Bethard wrote: > The question is not how easy it is to write, > but how many times it's going to get written. but with that logic we could create a standard "looping" construct called loop(x) that would stand in for for i in range(x): or a file_reader('whatever') generator that would be a s

Re: pre-PEP generic objects

2004-12-03 Thread Istvan Albert
Steven Bethard wrote: module) not to the __builtins__. I don't see how this "litters the standard namespace". Maybe then it doesn't. but what are you saying? that a man cannot exaggerate and fudge the facts in order to embellish his argument? :-) Istvan. -- http://mail.python.org/mailman/listinfo

Re: xmlrpclib or twisted?

2004-12-06 Thread Istvan Albert
flupke wrote: I am planning to build a web GUI for the client so if i If you are planning to build a browser based interface then use an available webserver and don't build your own. Istvan. -- http://mail.python.org/mailman/listinfo/python-list

Re: Webapp servers & security

2004-12-07 Thread Istvan Albert
Anakim Border wrote: few) offer a clean environment to develop Python webapps. I have some problems, however, understanding their security model. Did I miss anything? They don't have a security model. AFAIK only Zope has. Istvan. -- http://mail.python.org/mailman/listinfo/python-list

Re: ElementTree and XPATH

2004-12-09 Thread Istvan Albert
[EMAIL PROTECTED] wrote: it seems to be invalid syntax if I give "/a/b[0]" to the findall() method. Does anyone know the correct syntax? I think the proper mindset going in should be that elementtree does not support xpath but that there are some handy constructs that resemble the location steps of

Re: Calling a C program from a Python Script

2004-12-09 Thread Istvan Albert
Brad Tilley wrote: If possible, how much faster would this be over a pure Python solution? It is like the difference between Batman and Ever. batman is faster than ever -- http://mail.python.org/mailman/listinfo/python-list

Re: Suggestion for "syntax error": ++i, --i

2004-12-13 Thread Istvan Albert
Petr Prikryl wrote: Summary: In my opinion, the C-like prefix increment and decrement operators (++i and --i) should be marked as "syntax error". My guess is that the impact of it would be nil. This is python, there are no prefix or postfix operators. That is very easy to remember. Just because one

Re: Performance (pystone) of python 2.4 lower then python 2.3 ???

2004-12-13 Thread Istvan Albert
Lucas Hofman wrote: Anyone who understands what is going on? It is difficult to measure a speedup that might be well within your measurement error. Run the same pystone benchmark repeatedly and see what variation you get. Istvan. -- http://mail.python.org/mailman/listinfo/python-list

Re: Boo who? (was Re: newbie question)

2004-12-20 Thread Istvan Albert
Doug Holton wrote: the syntax of boo is indeed virtually identical to python. All that boo does is borrows a few syntactical constructs from python. Calling it virtually identical is *very* misleading. I've downloaded and tried it when you first made this claim and it turned out that boo couldn't

Re: Boo who? (was Re: newbie question)

2004-12-21 Thread Istvan Albert
Doug Holton wrote: The syntax is indeed virtually identical to python. You are yet another person who has trolled before. > Do you have financial conflict of interest too like Fredrik? You'll easily get away by calling me a troll, but trying to make it look like that the effbot is one, that's j

Re: ElementTree - Why not part of the core?

2005-12-14 Thread Istvan Albert
> $ python > Python 2.5a0 (#1, Dec 12 2005, 19:26:49) >>> import xml.etree.ElementTree as ET hip hip hurray! > http://svn.python.org/view/python/trunk/Lib/xml/etree/ don't know how this works, the link now seems to be: http://svn.python.org/view/python/trunk/Lib/xmlcore/etree/ -- http://mail.

Re: Some errors when running code in diveintopython: (

2005-12-23 Thread Istvan Albert
must be something with your settings ... I remeber once I had truly puzzling problem that manifested itself the same way ... Firefox and cygwin python would work fine but the windows python would raise errors when trying to connect via http ... ... finally I realized that the day before IE was s

Re: New release of Diet Python (0.2 Beta)!!!

2006-07-27 Thread Istvan Albert
The Eternal Squire wrote: > A developer's installation of PSF, including Pywin, WxPython, Numpy, > Scipy I believe can run up to 300 MB, no? you're missing the point, no one forces you to install all these, also it is very unlikely that someone would have these unless they needed them. -- http:

Re: A Universe Set

2006-10-04 Thread Istvan Albert
Jorgen Grahn wrote: > I have been craving for some similar things for a while, and I'm still not > sure if they are good ideas, or brain damage caused by studying functional > programming at Uni. This is a self correcting situation, as ayone who understands why they need this can surely write th

Re: switching to numpy and failing, a user story

2006-10-06 Thread Istvan Albert
sturlamolden wrote: > Those involved in the development of NumPy must receive some > compensation. Financial support to NumPy also ensure that the > developmentcan continue. I for one does not want to see NumPy as Then charge for NumPy ... or write a book *besides* the documentation. One in which

Re: switching to numpy and failing, a user story

2006-10-09 Thread Istvan Albert
Fernando Perez wrote: > It's funny how I don't see anyone complaining about any of the Python books > sold here (or at any other publishing house): That is maybe because the language is fairly well documented to begin with. Try to imagine for a moment how many people would use Python if on the fi

Re: ANN: SimpleJSONRPCServer

2006-10-09 Thread Istvan Albert
Sybren Stuvel wrote: > aum enlightened us with: > > I've built a module called SimpleJSONRPCServer, which is essentially > > the same as the familiar python library module SimpleXMLRPCServer, > > except that it uses the JSON-RPC protocol. > > Thanks a lot! I've used XML-RPC on a low-speed device, a

Re: paseline(my favorite simple script): does something similar exist?

2006-10-12 Thread Istvan Albert
RickMuller wrote: > One of my all-time favorite scripts is parseline, which is printed here is another way to write that: def parseline(line, format): trans = {'x':lambda x:None,'s':str,'f':float,'d':int,'i':int} return [ trans[f](w) for f,w in zip(format, line.split() ) ] >>> parseli

Re: invert or reverse a string... warning this is a rant

2006-10-20 Thread Istvan Albert
Carl Banks wrote: > Say you're using a function from a third-party library that finds the > first character in a string that meets some requirement. You need to > find the last such character. You seem to imply that invoking a function on a reversed input is somehow a generic solution to the pro

Re: invert or reverse a string... warning this is a rant

2006-10-20 Thread Istvan Albert
egbert wrote: > String reversal comes in handy when you do palindromes. Yes, that's where the big bucks are, the Palindrome Industry. It is the shortsightedness of the Python core developers that keeps the palindrome related functions and algorithms out of the standard library i. -- http://m

Re: multythreading app memory consumption

2006-10-23 Thread Istvan Albert
Roman Petrichev wrote: > try: > url = Q.get() > except Queue.Empty: > break This code will never raise the Queue.Empty exception. Only a non-blocking get does: url = Q.get(block=False) As mentioned before you should post working code if you expect peo

Re: Python 2.5 ; Effbot console ; thank ; pb release.

2006-10-24 Thread Istvan Albert
Martin v. Löwis wrote: > People certainly build it themselves, but then never share. I don't > know why that is - probably, it takes a different mindset to be on > the giving end than on the receiving end of free software. I've seen people share binary builds, for example you can get the windows

Re: Python's CRT licensing on Windows <-- FUD

2006-10-25 Thread Istvan Albert
sturlamolden wrote: > Maybe someone have gone through the trouble and got a clear answer from > Microsoft. As far as companies go the EULA is as clear of an answer as you can possibly hope for. As for the original post, don't bother with it this issue, the chances that MS will start harassing yo

Re: a good programming text editor (not IDE)

2006-06-15 Thread Istvan Albert
Scott David Daniels wrote: > To paraphrase someone else (their identity lost in my mental fog) about > learning VI: > "The two weeks you'll spend hating vi (or vim) as you learn it will > be repaid in another month, ad the rest is pure profit." Time and again I hear this (no shortage o

Re: a good programming text editor (not IDE)

2006-06-16 Thread Istvan Albert
Scott David Daniels wrote: > Surprise, surprise. One hour is not two weeks. I wrote: > pressing Ctrl-1 while editing the source will execute the python on the > current source *and* it displays the output in a lower pane as it runs > *and* it allows me to simultanously edit the file *while* th

new python icons for windows

2006-06-20 Thread Istvan Albert
I've been using the new python icons for windows for about two weeks now and I must say they've turned out to be far less functional than I thought. From purely visual standpoint the new icons look better, the old ones had a certain level of 'cuteness' associated to them .. I could see why that mig

Re: new python icons for windows

2006-06-21 Thread Istvan Albert
[EMAIL PROTECTED] wrote: > > For example it resembles the icon for text files. > > This is intentional: to make it obvious that .py files are the > readable, editable scripts, contrasting with .pyc's binary gunk - I think this is a mistake, it does not seem obious, all it does is just blends in

Re: SWIG problems with gcc and Cygwin?

2006-06-26 Thread Istvan Albert
Michael Yanowitz wrote: > Also, not sure if related but I do have a win32 Python 2.4.3 and > Cygwin Python 2.4.1. Not sure if there are any conflicts. Any advice > in making these two co-exist? SWIG will work with the windows and cygwin python, just make sure you don't mix the various platforms

Re: Looking for a high performance web server written in Python, and supports CGI/FastCGI

2006-07-06 Thread Istvan Albert
Jack wrote: > I will have to install lighttpd or other web servers. do that. If all you need is a webserver there's little reason to have it in python. Just use one of the several high quality open source webservers. -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a high performance web server written in Python, and supports CGI/FastCGI

2006-07-07 Thread Istvan Albert
> >> I will have to install lighttpd or other web servers. > If it is a Python web server, it would be nice to extend it by putting code > right into the web server. The performance should be better than FastCGI > because it removes the cost to send the requests/replies back and forth. you'll nee

Re: multithreading and shared dictionary

2006-07-07 Thread Istvan Albert
Stéphane Ninin wrote: > Is a lock required in such a case ? I believe that assignment is atomic and would not need a lock. yet most of the other dictionary use cases are not threadsafe. For example I suspect that you'd get an error if you were iterating through the dictionary while another threa

Re: multithreading and shared dictionary

2006-07-08 Thread Istvan Albert
Marc 'BlackJack' Rintsch wrote: > It's not in Jython nor IronPython and maybe not forever in > CPython. Whether or not a feature is present in Jython or IronPython does not seem relevant, after all these languages emulate Python, one could argue that it only means that this emulation is incomplet

Re: sqlite 'ownership' problems

2006-09-03 Thread Istvan Albert
rdrink wrote: > created at the cmnd-line, e.g. 'test.db' with a table 'foo', I would > get the error "_sqlite.DatabaseError: no such table: foo". My suspition > was that this is a "feature" of sqlite ('flat file' vs. a dynamic db in > MySQL) where sqlite is 'sensetive' to who creates it... Most l

Re: Twisted vs POS (Plain-old sockets)

2006-09-04 Thread Istvan Albert
Guido Goldstein wrote: > You might have a look at asyncore/asychat in the standard library. > It does the async stuff for you and it's easy to understand and to > use. or Allegra might work http://laurentszyster.be/blog/allegra/ its anti-twisted melodrama comes at no extra charge. i. -- htt

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Istvan Albert
metaperl wrote: > --> python -i > >>> class = "algebra" > File "", line 1 > class = "algebra" > ^ > SyntaxError: invalid syntax Designing a syntax to avoid all possible newbie errors is impractical because as soon as you are finished with one iteration the new newbies will start m

Re: XSLT speed comparisons

2006-09-28 Thread Istvan Albert
Microsoft has put a lot of effort into their XML libraries as they are (or will be) the foundation of most of their software suites. I think you'll be hard pressed to find a library that exceeds it in both breadth of functionality and performance. Istvan -- http://mail.python.org/mailman/listin

Re: Leave the putdowns in the Perl community, the Python world does not need them

2006-09-29 Thread Istvan Albert
metaperl wrote: > I was shocked to see the personal insults hurled in this thread: > http://groups.google.com/group/comp.lang.python/browse_thread/thread/d0758cb9545cad4b Ahhh, no need to overreact, that's just the usual Friday night steel cage match: Fredrik vs "Poster Who is Convinced That The

Re: PATCH: Speed up direct string concatenation by 20+%!

2006-10-03 Thread Istvan Albert
I remember a similar patch from some time ago: http://mail.python.org/pipermail/python-dev/2004-August/046686.html i -- http://mail.python.org/mailman/listinfo/python-list

Re: PATCH: Speed up direct string concatenation by 20+%!

2006-10-03 Thread Istvan Albert
Larry Hastings wrote: > That patch addressed the same general problem, but took a completely > different approach. For the record, this patch (#980695) optimized "x Larry, Forgot to mention this, in case you haven't done so post your original message/patch on the python-dev lists since that's w

Re: Python to use a non open source bug tracker?

2006-10-03 Thread Istvan Albert
Giovanni Bajo wrote: > Does this smell "Bitkeeper fiasco" to anyone else than me? well, no company will spend money/effort/resources unless it benefits them some way. Once that benefit (or the perception of it) disappears the company will cut the lifeline. It's just common business sense. But th

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Istvan Albert
Giovanni Bajo wrote: > I understand your point. OTOH, exactly because the tracker system is a far > lesser importance, it's amazing there is *ever* a need to evaluate non-FLOSS > solutions, when there are so many good free solutions around. Instead of I think you are missing the point. Switching

Re: why would anyone use python when java is there?

2006-11-30 Thread Istvan Albert
gavino wrote: > I want to learn to program and I can't seem to pick a direction. A Learning how to program and learning a programming language are completely different things. The former far more difficult then the latter. There is nothing better than Python to learn how to program because it i

Re: Why not just show the out-of-range index?

2006-12-07 Thread Istvan Albert
Russ wrote: > The message tells you where the error occurred, but it doesn't tell you > what the range and the offending index are. So here is a scenario, what should happen if by accident one uses a 50Mb string as an index? Should it be displayed? i. -- http://mail.python.org/mailman/listinf

Re: Initializing with the correct type

2006-12-07 Thread Istvan Albert
[EMAIL PROTECTED] wrote: > Hi all, > > I'm new to Python and I'm just wordering if my approch is correct. > Here's an example. I'm making sure that the length and types are > correct. Don't worry much about the type of parameters, it turns out passing wrong data into a constructor is a problem tha

Re: A Call to Arms for Python Advocacy

2006-12-07 Thread Istvan Albert
Roy Smith wrote: > I think it also appears to need faster hardware. It's running glacially > slow. runs fine here i. -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-08 Thread Istvan Albert
Mark Tarver wrote: > seems to show that Python is a cut down (no macros) version of Lisp > with a worse performance. or maybe it shows that Lisp is an obfuscated version of Python with lots of parentheses, backward logic, and complicated constructs that run faster. i. -- http://mail.python.org

Re: Large files uploading

2006-12-13 Thread Istvan Albert
Lad wrote: > Or is there another way( besides FTP) how to upload large files to > server? You can upload via http. The primary problem is that the browser don't work well with large uploads (give little feedback on the process, IE may hang etc). You can workaround some limitations by using apple

Re: HTML parsing bug?

2006-01-30 Thread Istvan Albert
> this is a comment in JavaScript, which is itself inside an HTML comment Don't nest HTML comments. Occasionaly it may break the browsers as well. (I remember this from one of the weirdest of bughunts : whenever the number of characters between nested HTML comments was divisible by four the page

Re: HTML parsing bug?

2006-02-02 Thread Istvan Albert
>> this is a comment in JavaScript, which is itself inside an HTML comment > Did you read the post? misread it rather ... -- http://mail.python.org/mailman/listinfo/python-list

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

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-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: 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-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-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: 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

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: 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

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-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: 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: 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.

  1   2   >