Re: while True or while 1

2012-01-23 Thread 88888 Dihedral
在 2012年1月24日星期二UTC+8上午4时50分11秒,Andrea Crotti写道: On 01/23/2012 06:05 PM, Evan Driscoll wrote: To play devil's advocate for a moment, if you have the choice between two ways of writing something, A and B, where both are basically the same in terms of difficulty to write, difficulty to

Re: copy on write

2012-01-13 Thread 88888 Dihedral
Ethan Furman於 2012年1月14日星期六UTC+8上午2時40分47秒寫道: Steven D'Aprano wrote: Normally this is harmless, but there is one interesting little glitch you can get: t = ('a', [23]) t[1] += [42] Traceback (most recent call last): File stdin, line 1, in module TypeError: 'tuple' object does

Re: Newbie: Looking for code review on my first Python project.

2012-01-11 Thread 88888 Dihedral
HoneyMonster於 2012年1月12日星期四UTC+8上午5時09分13秒寫道: On Wed, 11 Jan 2012 11:39:48 +, HoneyMonster wrote: On Tue, 10 Jan 2012 18:17:48 -0700, Ian Kelly wrote: On Tue, Jan 10, 2012 at 4:44 PM, HoneyMonster someone@someplace.invalid wrote: Hi, I'm new to Python and recently completed

Re: open office in another language?

2012-01-11 Thread 88888 Dihedral
Open Office suite software users are most non-programmers. Software to be used by non-programmers are different from most free python packages shared by programmers. -- http://mail.python.org/mailman/listinfo/python-list

Re: UnicodeEncodeError in compile

2012-01-10 Thread 88888 Dihedral
Terry Reedy於 2012年1月10日星期二UTC+8下午4時08分40秒寫道: On 1/9/2012 11:24 PM, pyscr...@gmail.com wrote: Using python 3.2 in Windows 7 I am getting the following: compile('pass', r'c:\temp\工具\module1.py', 'exec') UnicodeEncodeError: 'mbcs' codec can't encode characters in position 0--1: invalid

Re: open office in another language?

2012-01-10 Thread 88888 Dihedral
I remembered that the open office was started to promote java long time ago by Sun selling work stations. But the project ended to be practical. -- http://mail.python.org/mailman/listinfo/python-list

Re: decorator problem

2012-01-09 Thread 88888 Dihedral
Chris Rebert於 2012年1月10日星期二UTC+8下午1時15分53秒寫道: On Mon, Jan 9, 2012 at 8:14 PM, contro opinion contro...@gmail.com wrote: test1.py def deco(func): print 'i am in deco' @deco def test():      print 'i am in test' when you run it ,you get : i am in deco test2.py

Re: python philosophical question - strong vs duck typing

2012-01-07 Thread 88888 Dihedral
Terry Reedy於 2012年1月5日星期四UTC+8上午4時22分03秒寫道: On 1/4/2012 1:37 AM, Terry Reedy wrote: On 1/3/2012 8:04 PM, Devin Jeanpierre wrote: [ An example of a simple dependently typed program: http://codepad.org/eLr7lLJd ] Just got it after a minute delay. A followup now that I have read it.

Re: Nested Function Question

2012-01-07 Thread 88888 Dihedral
GZ於 2012年1月7日星期六UTC+8上午5時46分16秒寫道: Hi, I am reading the documentation of functools.partial (http:// docs.python.org/library/functools.html#functools.partial) and found the following 'reference implementation' of functools.partial. def partial(func, *args, **keywords): def

Re: multiple inheritance from list and other class

2012-01-07 Thread 88888 Dihedral
A list is a container. Chris Angelico於 2012年1月8日星期日UTC+8上午9時27分06秒寫道: On Sun, Jan 8, 2012 at 12:16 PM, lars van gemerden la...@rational-it.com wrote: Hello, I have an error message i do not understand: My code is in essence: b = B([1,2,3,4]) error:    b = B([0,1,2,3,4])

Re: problem to install Flask

2012-01-06 Thread 88888 Dihedral
MRAB於 2012年1月6日星期五UTC+8上午11時05分03秒寫道: On 06/01/2012 02:24, 水静流深 wrote: ~$ sudo easy_install Flask Searching for Flask Reading http://pypi.python.org/simple/Flask/ Reading http://github.com/mitsuhiko/flask/ Best match: Flask 0.8 Downloading

Re: a little help

2012-01-05 Thread 88888 Dihedral
Chris Angelico於 2012年1月5日星期四UTC+8上午7時29分21秒寫道: On Thu, Jan 5, 2012 at 10:25 AM, Andres Soto soto_...@yahoo.com wrote: My situation is the following: I am developing some code. I use the IDLE Editor to write it down. Then, I save it and import it from the command line interface, so it is

Re: virtualenv wrecked my Django+modules install

2012-01-05 Thread 88888 Dihedral
Use co-linux or VMware to do some experiment first. This is better than those old days of workstations or the mainframes from 5 to 10 vendors 20 years ago. -- http://mail.python.org/mailman/listinfo/python-list

Re: .format vs. %

2012-01-04 Thread 88888 Dihedral
alex23於 2012年1月4日星期三UTC+8上午10時26分35秒寫道: 8 Dihedral dihedr...@googlemail.com wrote: This is a good evolution in Python. It is 2012 now and the text I/O part is not as important as 10 years ago. The next move of Python could be easy integration of C++ libraries. You mean like with Py

Re: .format vs. %

2012-01-04 Thread 88888 Dihedral
alex23於 2012年1月5日星期四UTC+8上午8時23分06秒寫道: On Jan 4, 6:25 pm, 8 Dihedral dihedr...@googlemail.com wrote: And what are you contributing to the situation other than misinformation and markov-generated spam? Do you know what can attract newbies to support python? I'm sure other people

Re: .format vs. %

2012-01-03 Thread 88888 Dihedral
davidfx於 2012年1月1日星期日UTC+8上午2時19分34秒寫道: Hello everyone, I just have a quick question about .format and %r %s %d. Should we always be using .format() for formatting strings or %? Example a = 'apples' print I love {0}..format(a) If I wanted to put .format into a variable,

Re: Generating sin/square waves sound

2011-12-30 Thread 88888 Dihedral
Please check PYGAME and Simple Directmedia library. Python is used as the director like role and functions in SDL do most of the jobs in Pygame. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python education survey

2011-12-27 Thread 88888 Dihedral
-- http://mail.python.org/mailman/listinfo/python-list

Re: RSA and Cryptography in PYTHON

2011-12-27 Thread 88888 Dihedral
8 Dihedral於 2011年12月26日星期一UTC+8上午3時58分28秒寫道: Long integer is really excellent in Python. Encoding RSA 2048bits in a simple and elegant way in Python is almost trivial. How about the nontrivial decoding part ? I am getting lousy in the news group in my writing? I mean the non

Re: Python education survey

2011-12-27 Thread 88888 Dihedral
There are Dr.Python, Pycrust and Notepadplus to support writing python programs. IDLE is OK, but if a program failed inside IDLE, then I might have to kill the old IDLE and restart IDLE again. -- http://mail.python.org/mailman/listinfo/python-list

Re: Random string of digits?

2011-12-25 Thread 88888 Dihedral
Roy Smith於 2011年12月26日星期一UTC+8上午1時41分29秒寫道: On Mon, 26 Dec 2011 03:11:56 +1100, Chris Angelico wrote: I prefer not to rely on the source. That tells me what happens, not what's guaranteed to happen. Steven D'Aprano steve+comp@pearwood.info wrote: In this case, the source

RSA and Cryptography in PYTHON

2011-12-25 Thread 88888 Dihedral
Long integer is really excellent in Python. Encoding RSA 2048bits in a simple and elegant way in Python is almost trivial. How about the nontrivial decoding part ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Help about Xlib Library in Python

2011-12-17 Thread 88888 Dihedral
On Saturday, December 17, 2011 11:22:32 PM UTC+8, Alexander Kapps wrote: On 16.12.2011 05:55, 阮铮 wrote: Hi, A question about Xlib Library in Python troubled me for several days and I finally found this email list. I hope someone could answer my question. I think it is easy for

Re: Screen Control Fullscreen ON/OFF

2011-12-15 Thread 88888 Dihedral
On Thursday, December 15, 2011 6:59:04 PM UTC+8, yeet wrote: Hi all, I would like to make fullscreen white and fullscreen black using Python on Linux. With in the specs of the LCD, I want to be able to display fullscreen white and black approximately at 30Hz. Frequency (on/off per second)

Re: What is this widget? -- again

2011-12-15 Thread 88888 Dihedral
On Thursday, December 15, 2011 11:53:55 PM UTC+8, Rick Johnson wrote: On Dec 14, 8:17 pm, Muddy Coder cosmo_...@yahoo.com wrote: Hi Folks, Sorry for the unclear question in last post. Well, I am using Tkinter to do GUI, and I just don't know what kind of widget can let me do annotation

Re: AttributeError in with statement (3.2.2)

2011-12-14 Thread 88888 Dihedral
On Wednesday, December 14, 2011 4:01:24 PM UTC+8, Steven D#39;Aprano wrote: On Wed, 14 Dec 2011 01:29:13 -0500, Terry Reedy wrote: To complement what Eric says below: The with statement is looking for an instance *method*, which by definition, is a function attribute of a *class* (the

Re: AttributeError in with statement (3.2.2)

2011-12-14 Thread 88888 Dihedral
On Thursday, December 15, 2011 12:08:32 AM UTC+8, 8 Dihedral wrote: On Wednesday, December 14, 2011 4:01:24 PM UTC+8, Steven D#39;Aprano wrote: On Wed, 14 Dec 2011 01:29:13 -0500, Terry Reedy wrote: To complement what Eric says below: The with statement is looking for an instance

Re: Dynamic variable creation from string

2011-12-13 Thread 88888 Dihedral
On Tuesday, December 13, 2011 9:35:52 AM UTC+8, Steven D#39;Aprano wrote: On Mon, 12 Dec 2011 15:45:06 -0800, alex23 wrote: On Dec 12, 10:49 pm, 8 Dihedral dihedr...@googlemail.com wrote: This is the way to write an assembler or to roll out a script language to be included in an app

Re: I love the decorator in Python!!!

2011-12-12 Thread 88888 Dihedral
On Monday, December 12, 2011 1:47:52 PM UTC+8, alex23 wrote: On Dec 12, 2:51 pm, 8 Dihedral dihedr...@googlemail.com wrote: To wrap a function properly is different from the 1-line lampda. This is really functional programming. Every function can be decorated to change

Re: Dynamic variable creation from string

2011-12-12 Thread 88888 Dihedral
On Monday, December 12, 2011 3:11:18 PM UTC+8, alex23 wrote: On Dec 8, 3:09 am, Massi mass...@msn.com wrote: in my script I have a dictionary whose items are couples in the form (string, integer values), say D = {'a':1, 'b':2, 'c':3} This dictionary is passed to a function as a

Re: Dynamic variable creation from string

2011-12-12 Thread 88888 Dihedral
On Monday, December 12, 2011 3:11:18 PM UTC+8, alex23 wrote: On Dec 8, 3:09 am, Massi mass...@msn.com wrote: in my script I have a dictionary whose items are couples in the form (string, integer values), say D = {'a':1, 'b':2, 'c':3} This dictionary is passed to a function as a

Re: I love the decorator in Python!!!

2011-12-11 Thread 88888 Dihedral
On Monday, December 12, 2011 11:36:07 AM UTC+8, alex23 wrote: On Dec 9, 8:08 pm, Robert Kern rober...@gmail.com wrote: On 12/9/11 5:02 AM, alex23 wrote: The 3rd party 'decorator' module takes care of issues like docstrings  function signatures. I'd really like to see some of that

Re: I love the decorator in Python!!!

2011-12-10 Thread 88888 Dihedral
Just wrap the exec() to spawn for fun. -- http://mail.python.org/mailman/listinfo/python-list

Re: I love the decorator in Python!!!

2011-12-10 Thread 88888 Dihedral
Wrap functions to yield is somewhat like a sub-threading in Erlang. -- http://mail.python.org/mailman/listinfo/python-list

Re: WeakValueDict and threadsafety

2011-12-10 Thread 88888 Dihedral
On Sunday, December 11, 2011 1:56:38 AM UTC+8, Darren Dale wrote: On Dec 10, 11:19 am, Duncan Booth duncan.bo...@invalid.invalid wrote: Darren Dale dsda...@gmail.com wrote: I'm concerned that this is not actually thread-safe. When I no longer hold strong references to an instance of

Re: I love the decorator in Python!!!

2011-12-09 Thread 88888 Dihedral
On Thursday, December 8, 2011 7:43:12 PM UTC+8, Chris Angelico wrote: On Thu, Dec 8, 2011 at 10:22 PM, K.-Michael Aye kmicha...@gmail.com wrote: I am still perplexed about decorators though, am happily using Python for many years without them, but maybe i am missing something? For example

Re: I love the decorator in Python!!!

2011-12-09 Thread 88888 Dihedral
On Saturday, December 10, 2011 2:28:49 AM UTC+8, 8 Dihedral wrote: On Thursday, December 8, 2011 7:43:12 PM UTC+8, Chris Angelico wrote: On Thu, Dec 8, 2011 at 10:22 PM, K.-Michael Aye kmic...@gmail.com wrote: I am still perplexed about decorators though, am happily using Python

Re: order independent hash?

2011-12-07 Thread 88888 Dihedral
On Wednesday, December 7, 2011 9:28:40 PM UTC+8, Hrvoje Niksic wrote: Chris Angelico ros...@gmail.com writes: 2011/12/5 Hrvoje Niksic hni...@xemacs.org: If a Python implementation tried to implement dict as a tree, instances of classes that define only __eq__ and __hash__ would not be

I love the decorator in Python!!!

2011-12-07 Thread 88888 Dihedral
I use the @ decorator to behave exactly like a c macro that does have fewer side effects. I am wondering is there other interesting methods to do the jobs in Python? A lot people complained that no macro in Python. Cheers to the rule of Python : If there's none then just go ahead and build

Re: Scope of variable inside list comprehensions?

2011-12-06 Thread 88888 Dihedral
On Tuesday, December 6, 2011 2:42:35 PM UTC+8, Rainer Grimm wrote: Hello, try: songs = [Song(id) for id in song_ids] except Song.DoesNotExist: print unknown song id (%d) % id that's is a bad programming style. So it will be forbidden with python 3. The reason

Re: Single key press

2011-12-06 Thread 88888 Dihedral
On Tuesday, December 6, 2011 11:22:18 PM UTC+8, Grant Edwards wrote: On 2011-12-06, Sergi Pasoev s.pa...@gmail.com wrote: I wonder if it is realistic to get a single key press in Python without ncurses or any similar library. Yes. Just put the tty associated with stdin in raw mode and

Re: order independent hash?

2011-12-06 Thread 88888 Dihedral
On Monday, December 5, 2011 7:24:49 AM UTC+8, Ian wrote: On Sun, Dec 4, 2011 at 4:17 PM, 8 Dihedral dihedr...@googlemail.com wrote: Please explain what you think a hash function is, then.  Per Wikipedia, A hash function is any algorithm or subroutine that maps large data sets

Re: order independent hash?

2011-12-05 Thread 88888 Dihedral
On Monday, December 5, 2011 1:50:08 PM UTC+8, Dan Stromberg wrote: Two methods: 1) If you need your hash only once in an infrequent while, then save the elements in a list, appending as needed, and sort prior to hashing, as needed 2) If you need your hash more often, you could keep your

Re: Single key press

2011-12-05 Thread 88888 Dihedral
On Tuesday, December 6, 2011 1:49:55 PM UTC+8, Sergi Pasoev wrote: Hi. I wonder if it is realistic to get a single key press in Python without ncurses or any similar library. In single key press I mean something like j and k in Gnu less program, you press the key and and it is captured by

Re: order independent hash?

2011-12-04 Thread 88888 Dihedral
On Sunday, December 4, 2011 9:41:19 PM UTC+8, Roel Schroeven wrote: Op 2011-12-02 6:48, 8 Dihedral schreef: A hash stores (k,v) pairs specified in the run time with auto memory management build in is not a simple hash function to produce data signatures only clearly in my post

Re: order independent hash?

2011-12-04 Thread 88888 Dihedral
A hash that can hash objects is not a trivial hash function On Monday, December 5, 2011 1:41:14 AM UTC+8, Ian wrote: On Sun, Dec 4, 2011 at 8:39 AM, 8 Dihedral dihedr...@googlemail.com wrote: Thanks for your comments. Are we gonna talk about the way to implement a hash table

Re: order independent hash?

2011-12-04 Thread 88888 Dihedral
On Monday, December 5, 2011 4:13:01 AM UTC+8, Ian wrote: On Sun, Dec 4, 2011 at 11:06 AM, 8 Dihedral dihedr...@googlemail.com wrote: If you want to talk about ways to use dicts, please start a different thread for it.  As has been pointed out several times now, it is off-topic

Re: order independent hash?

2011-12-04 Thread 88888 Dihedral
On Monday, December 5, 2011 7:24:49 AM UTC+8, Ian wrote: On Sun, Dec 4, 2011 at 4:17 PM, 8 Dihedral dihedr...@googlemail.com wrote: Please explain what you think a hash function is, then.  Per Wikipedia, A hash function is any algorithm or subroutine that maps large data sets

Re: order independent hash?

2011-12-03 Thread 88888 Dihedral
On Saturday, December 3, 2011 9:04:49 AM UTC+8, Steven D#39;Aprano wrote: On Fri, 02 Dec 2011 10:18:12 -0800, 8 Dihedral wrote: [...] Dihedral, EVERY SINGLE ONE of your messages is double posted. You are sending to the newsgroup and the mailing list, but they are aliases for each

Re: order independent hash?

2011-12-02 Thread 88888 Dihedral
On Friday, December 2, 2011 5:53:47 PM UTC+8, Hrvoje Niksic wrote: Chris Angelico ros...@gmail.com writes: The hash can grow with (k,v) pairs accumulated in the run time. An auto memory management mechanism is required for a hash of a non-fixed size of (k,v) pairs. That's a hash

Re: Multiprocessing: killing children when parent dies

2011-12-02 Thread 88888 Dihedral
On Friday, December 2, 2011 11:13:34 PM UTC+8, Chris Angelico wrote: On Sat, Dec 3, 2011 at 2:05 AM, Mihai Badoiu mba...@gmail.com wrote: In the multiprocessing module, on a Process p, by just doing p.daemon=1 before p.start(), we can make the child die when the parent exits.  However, the

Re: Multiprocessing: killing children when parent dies

2011-12-02 Thread 88888 Dihedral
Please check Erlang that spawn so easily. And there are Python packages can do the same task. -- http://mail.python.org/mailman/listinfo/python-list

Re: order independent hash?

2011-12-02 Thread 88888 Dihedral
On Friday, December 2, 2011 5:53:47 PM UTC+8, Hrvoje Niksic wrote: Chris Angelico ros...@gmail.com writes: The hash can grow with (k,v) pairs accumulated in the run time. An auto memory management mechanism is required for a hash of a non-fixed size of (k,v) pairs. That's a hash

Re: order independent hash?

2011-12-02 Thread 88888 Dihedral
On Wednesday, November 30, 2011 8:32:39 PM UTC+8, Neal Becker wrote: I like to hash a list of words (actually, the command line args of my program) in such a way that different words will create different hash, but not sensitive to the order of the words. Any ideas? For each word of

Re: python 2.5 and ast

2011-12-02 Thread 88888 Dihedral
On Monday, November 28, 2011 7:45:57 PM UTC+8, Andrea Crotti wrote: I'm happily using the ast module to analyze some code, but my scripts need also to run unfortunately on python 2.5 The _ast was there already, but the ast helpers not yet. Is it ok if I just copy over the source from the ast

Re: order independent hash?

2011-12-01 Thread 88888 Dihedral
On Wednesday, November 30, 2011 8:47:13 PM UTC+8, Peter Otten wrote: Neal Becker wrote: I like to hash a list of words (actually, the command line args of my program) in such a way that different words will create different hash, but not sensitive to the order of the words. Any ideas?

Re: order independent hash?

2011-12-01 Thread 88888 Dihedral
On Thursday, December 1, 2011 11:52:46 PM UTC+8, Dave Angel wrote: On 12/01/2011 10:35 AM, 8 Dihedral wrote: On Wednesday, November 30, 2011 8:47:13 PM UTC+8, Peter Otten wrote: Neal Becker wrote: I like to hash a list of words (actually, the command line args of my program

Re: order independent hash?

2011-12-01 Thread 88888 Dihedral
On Friday, December 2, 2011 12:18:29 AM UTC+8, Chris Angelico wrote: On Fri, Dec 2, 2011 at 2:52 AM, Dave Angel d...@davea.name wrote: On 12/01/2011 10:35 AM, 8 Dihedral wrote: I knew a hash can replace a bi-directional linked list. The value  can be a multi-field string  to be parsed

Re: order independent hash?

2011-12-01 Thread 88888 Dihedral
On Friday, December 2, 2011 1:00:10 PM UTC+8, Chris Angelico wrote: On Fri, Dec 2, 2011 at 3:29 PM, 8 Dihedral dihedr...@googlemail.com wrote: I clear my point a hash is a collection of (key, value) pairs that have well defined methods and behavior to be used in programming

Re: Executing .pyc using python c api

2011-11-29 Thread 88888 Dihedral
On Tuesday, November 29, 2011 5:02:31 PM UTC+8, Ulrich Eckhardt wrote: Am 29.11.2011 08:34, schrieb Mrinalini Kulkarni: I need to run .pyc files using python c api. if i do PyImport_Import it executes the script. However, i need to pass a set of variables and their values which will be

Re: my new project, is this the right way?

2011-11-28 Thread 88888 Dihedral
On Sunday, November 27, 2011 4:49:14 PM UTC+8, 8 Dihedral wrote: On Sunday, November 27, 2011 4:29:52 PM UTC+8, 8 Dihedral wrote: On Sunday, November 27, 2011 12:03:26 PM UTC+8, Matt Joiner wrote: Sounds like you want a key-value store. If it's a lot of data, you may still want

Re: my new project, is this the right way?

2011-11-27 Thread 88888 Dihedral
On Sunday, November 27, 2011 12:03:26 PM UTC+8, Matt Joiner wrote: Sounds like you want a key-value store. If it's a lot of data, you may still want a database, I think it's just relational databases that you're trying to avoid? On Sun, Nov 27, 2011 at 10:41 AM, 8 Dihedral dihedr

Re: my new project, is this the right way?

2011-11-27 Thread 88888 Dihedral
On Sunday, November 27, 2011 4:29:52 PM UTC+8, 8 Dihedral wrote: On Sunday, November 27, 2011 12:03:26 PM UTC+8, Matt Joiner wrote: Sounds like you want a key-value store. If it's a lot of data, you may still want a database, I think it's just relational databases that you're trying

Re: my new project, is this the right way?

2011-11-26 Thread 88888 Dihedral
On Saturday, November 26, 2011 1:01:34 AM UTC+8, rusi wrote: On Nov 14, 3:41 pm, Tracubik affdfs...@b.com wrote: Hi all, i'm developing a new program. Mission: learn a bit of database management Idea: create a simple, 1 window program that show me a db of movies i've seen with few (10)

Re: my new project, is this the right way?

2011-11-26 Thread 88888 Dihedral
On Sunday, November 27, 2011 10:49:20 AM UTC+8, Roy Smith wrote: In article mailman.3067.1322361...@python.org, Dave Angel d...@davea.name wrote: If you're using Python, you already have a fast hash library, in the dictionary class. And yes, if a problem doesn't need the full

Re: python shell that saves history of typed in commands that will persist between reboots

2011-11-25 Thread 88888 Dihedral
Except that, intriguingly, I'm also using an ActiveState distro and it neither adds Ctrl-D nor prevents history. But I'm fairly sure that pyreadline does both of those things. TJG In python I can spawn a process to run python byte code that will produce a file with results. Easy to avoid

Re: suitability of python

2011-11-24 Thread 88888 Dihedral
On Friday, November 25, 2011 8:51:10 AM UTC+8, Terry Reedy wrote: On 11/24/2011 7:31 AM, Rudra Banerjee wrote: Dear friends, I am a newbie in python and basically i use python for postprocessing like plotting, data manipulation etc. Based on ease of programming on python I am wondering if

Re: decorators and closures

2011-11-22 Thread 88888 Dihedral
On Monday, November 21, 2011 10:44:34 PM UTC+8, Andrea Crotti wrote: With one colleague I discovered that the decorator code is always executed, every time I call a nested function: def dec(fn): print(In decorator) def _dec(): fn() return _dec def nested():

Re: file extension while saving Python files

2011-11-09 Thread 88888 Dihedral
In testing and debug it is better that a program can be easily modified and easy to set break point and dump values. Thus an interpreter environment is more convenient. But in the final version a compiler can speed up a lot! -- http://mail.python.org/mailman/listinfo/python-list

Re: Database access benchmarks for use in web-frameworks - How does Python compare?

2011-11-04 Thread 88888 Dihedral
I suggest that the use of dynamical page forwarding to different severs which run the same software package. This can be done in python! -- http://mail.python.org/mailman/listinfo/python-list

Re: leftover pyc files

2011-11-04 Thread 88888 Dihedral
Uhn, thanks for the easy way Just delete all *.pyc recursively. spend another 5-20 minutes to recompile all to get everything sync.. That is trivial! -- http://mail.python.org/mailman/listinfo/python-list

Re: Fast recursive generators?

2011-10-29 Thread 88888 Dihedral
I am thinking the bye code compiler in python can be faster if all known immutable instances up to the executionare compiled immutable objects to be assigned. -- http://mail.python.org/mailman/listinfo/python-list

Re: webapp development in pure python

2011-10-27 Thread 88888 Dihedral
OK, lets start a framework in using python in the server side and the client side. (1). requirements of the server side first: 1. sending HTML, XML documents to be displayed in the browsers of the clients and receiving for user inputs are easy in modpython, django, and etc. 2.

Re: python logging multiple processes to one file (via socket server)

2011-10-27 Thread 88888 Dihedral
Well, please check the byte code compiled results. This is useful. I know that a lot people are working on increasing the speed of execution scripts written in python, say, psyco, pyrex for packages released! -- http://mail.python.org/mailman/listinfo/python-list

Re: webapp development in pure python

2011-10-26 Thread 88888 Dihedral
I am thinking one has to distinguish between programs for database servers of the commercial applications in banks or insurance companies that cant be hacked in low costs, and experiments to chunk out database servers for games and videos all over the world! --

Re: Creating very similar functions with different parameters

2011-10-25 Thread 88888 Dihedral
Thanks for the debug modes in functional programing! Everything functional is true in CS at least in the theroy! -- http://mail.python.org/mailman/listinfo/python-list

Re: compare range objects

2011-10-23 Thread 88888 Dihedral
To compare two instances of objects defined by others in the same class or in derived classes from the same base class is an old problem in OOP. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to isolate a constant?

2011-10-22 Thread 88888 Dihedral
Thank you for the good trick for a static class owned property. Someone might object this but this is really useful. -- http://mail.python.org/mailman/listinfo/python-list

Re: non-standard module location (again)

2011-10-21 Thread 88888 Dihedral
1. Define a new class with an instance of the foo class included so that one can use all foo's properties and add new attributes. 2. Derive a new class from foo that extends its properties with the properties in foo accessible. -- http://mail.python.org/mailman/listinfo/python-list

Re: compare range objects

2011-10-20 Thread 88888 Dihedral
The range() in python is an iterable generator that returns an object ref/id. The xrange() is different. -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop through a dict changing keys

2011-10-17 Thread 88888 dihedral
Uh, sounds reasonable, if one loops over an index variable that could be altered during the loop execution then the loop may not end as expected. -- http://mail.python.org/mailman/listinfo/python-list

Re: Opportunity missed by Python ?

2011-10-15 Thread 88888 dihedral
Conversion utilities are used to ease the burdens for programmers to translate source scripts and codes into different languages or even the same language with revisions. Check for translators for C, C++, PASCAL, BASIC, and FORTRAN and also SWIG, PYREX, CYTHON, JYTHON and etc.. --

Re: Opportunity missed by Python ?

2011-10-15 Thread 88888 dihedral
The undetected recursive call loop in some states that can be hacked or would hang and crush! Every program has to be run in a VM is just one solution but that will slow down a lot. -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop through a dict changing keys

2011-10-15 Thread 88888 dihedral
Is there an FAQ available here? Please check the PYTHON official site and the active state PYTHON examples first, also check the PLEAC comparisons of a lot programming languages first! - Nothing is more thrilling to

Re: 1/2 evaluates to 0

2011-10-14 Thread 88888 dihedral
How about fractions to be computed in hundreds or even thousands of digits in precision? OK, just write programs to compute PI and the Euler number in hundreds or even thousands of digits to test various kind of programming languages. This is a sophomore school home work for gifted

Re: Opportunity missed by Python ?

2011-10-13 Thread 88888 dihedral
As long as there are tools to translate scripts or source code between the two languages. More new evolved powerful programming languages arenot problems at all for experienced programmers. -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-ideas] Implement comparison operators for range objects

2011-10-13 Thread 88888 dihedral
How about iterable objects supported in python? Is a countable object iterable definitely? Also the tail recursion technique is useful for the same function with few arguments that calls itself. The lisp compiler would emit machine codes with fast jumps and passing arguments in registers or

Re: Python Migration Error: TypeError: exceptions must be old-style classes or derived from BaseException, not str

2011-10-10 Thread 88888 dihedral
I am thinking with the power of python evolving in different versions, if a feature is not desired in the new version, then the new version could also provide some script tools, of course in python, to convert codes in old styles into new styles automatically. --

Re: Thread handling issue

2011-10-09 Thread 88888 dihedral
TRY to get BOA with wxpython! Please check the example for the UI part in BOA. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is it possible to create C-style main function in Python? (for teaching purposes)

2011-10-09 Thread 88888 dihedral
I do not think C is not good for functional programming, but C is hard to debug if one has to write programs to reload functional pointers and data structures that will grow in the run time for the possible cases. Thus, I love Python! -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3