Re: code review

2012-06-29 Thread Steven D'Aprano
On Thu, 28 Jun 2012 20:58:15 -0700, alex23 wrote: > On Jun 29, 12:57 pm, "Littlefield, Tyler" wrote: >> I was curious if someone wouldn't mind poking at some code. The project >> page is at:http://code.google.com/p/pymud Any information is greatly >> appreciated. > > I couldn't find any actual c

I can't send images to this mail-list

2012-06-29 Thread ??????
hi,all: why can't I send images to python-list@python.org??-- http://mail.python.org/mailman/listinfo/python-list

Re: code review

2012-06-29 Thread Chris Angelico
On Fri, Jun 29, 2012 at 5:31 PM, Steven D'Aprano wrote: > Given that all code contains bugs, that's the best sort of repository! Only in the sense that a cheese shop can be lauded for its cleanliness... But I am somewhat curious to see the OP's actual code. MUDs are my personal specialty. Chris

Re: I can't send images to this mail-list

2012-06-29 Thread Chris Angelico
On Thu, Jun 28, 2012 at 9:34 PM, 梦幻草 wrote: > hi,all: >     why can't I send images to python-list@python.org?? > It's a text-only list. Post your image to some free hosting somewhere and then include a link to it in your message, or - if possible - explain your issue/question in text. Chris Ang

Re: code review

2012-06-29 Thread Serhiy Storchaka
The project page is at: http://code.google.com/p/pymud Any information is greatly appreciated. Do you mean https://github.com/benthomasson/pymud, http://pymud.blogspot.com/ or http://sourceforge.net/projects/pymud/ ? -- http://mail.python.org/mailman/listinfo/python-list

Re: retry many times decorator

2012-06-29 Thread andrea crotti
On the other hand now that I think again even supposing there is a permanent error like MySql completely down, retrying continuosly won't do any harm anyway because the machine will not be able to do anything else anyway, when someone will fix MySql it would restart again without human intervention

Re: retry many times decorator

2012-06-29 Thread Justin Barber
On Friday, June 29, 2012 4:53:43 AM UTC-4, andrea crotti wrote: > On the other hand now that I think again even supposing there is a > permanent error like MySql completely down, retrying continuosly > won't do any harm anyway because the machine will not be able to do > anything else anyway, when

Re: I can't send images to this mail-list

2012-06-29 Thread Ben Finney
Chris Angelico writes: > On Thu, Jun 28, 2012 at 9:34 PM, 梦幻草 wrote: > >     why can't I send images to python-list@python.org?? > > It's a text-only list. I'll take this opportunity to give heartfelt thanks to the administrators for that policy; please keep this a text-only forum. -- \

Re: code review

2012-06-29 Thread Littlefield, Tyler
On 6/29/2012 2:14 AM, Serhiy Storchaka wrote: The project page is at: http://code.google.com/p/pymud Any information is greatly appreciated. Do you mean No, I mean http://code.google.com/p/pymud -- Take care, Ty http://tds-solutions.net The aspen project: a barebones light-weight mud engin

Re: code review

2012-06-29 Thread Littlefield, Tyler
On 6/29/2012 1:31 AM, Steven D'Aprano wrote: On Thu, 28 Jun 2012 20:58:15 -0700, alex23 wrote: On Jun 29, 12:57 pm, "Littlefield, Tyler" wrote: I was curious if someone wouldn't mind poking at some code. The project page is at:http://code.google.com/p/pymud Any information is greatly appreci

Re: Re Following syntax error in Mac OX10.7 Terminal

2012-06-29 Thread David Thomas
On Thursday, June 28, 2012 6:30:42 PM UTC+1, Sergi Pasoev wrote: > You just have to consider that indentation matters in Python, so you > have to type the code in Python interpreter as you have written it > below, that is, press Tab before each line when you are inside the > 'while (or any other li

Re: I can't send images to this mail-list

2012-06-29 Thread Ethan Furman
Ben Finney wrote: Chris Angelico writes: 梦幻草 wrote: why can't I send images to python-list@python.org?? >> It's a text-only list. I'll take this opportunity to give heartfelt thanks to the administrators for that policy; please keep this a text-only forum. +1000 -- http://mail.python

Re: Re Following syntax error in Mac OX10.7 Terminal

2012-06-29 Thread MRAB
On 29/06/2012 16:13, David Thomas wrote: On Thursday, June 28, 2012 6:30:42 PM UTC+1, Sergi Pasoev wrote: You just have to consider that indentation matters in Python, so you have to type the code in Python interpreter as you have written it below, that is, press Tab before each line when you ar

Re: Re Following syntax error in Mac OX10.7 Terminal

2012-06-29 Thread David Thomas
On Friday, June 29, 2012 4:21:56 PM UTC+1, MRAB wrote: > On 29/06/2012 16:13, David Thomas wrote: > > On Thursday, June 28, 2012 6:30:42 PM UTC+1, Sergi Pasoev wrote: > >> You just have to consider that indentation matters in Python, so you > >> have to type the code in Python interpreter as you ha

Re: Re Following syntax error in Mac OX10.7 Terminal

2012-06-29 Thread Ben Finney
David Thomas writes: > Hi yeah I'm currently learning python 2 at the moment and the tutorial > that I am studying doesn't explain about indentation. You might be better served by the official Python tutorial http://docs.python.org/tutorial/>. If you work through it from beginning to end, doing

Re Re Following syntax error in Mac OX10.7 Terminal

2012-06-29 Thread Sergi Pasoev
> Just discovered this in the tutorial further down. I'm currently > learning Python 2 because there seems to be a lot of tutorials out there > covering Python 2 rather than 3. While deciding which version of Python to learn, a better counsel could be found here: http://wiki.python.org/moin/Pyth

format() not behaving as expected

2012-06-29 Thread Josh English
I have a list of tuples, and usually print them using: print c, " ".join(map(str, list_of_tuples)) This is beginning to feel clunky (but gives me essentially what I want), and I thought there was a better, more concise, way to achieve this, so I explored the new string format and format() funct

Re: ANN: psutil 0.5.0 released

2012-06-29 Thread Giampaolo Rodolà
2012/6/27 Giampaolo Rodolà : > Hi folks, > I'm pleased to announce the 0.5.0 release of psutil: > http://code.google.com/p/psutil/ > > === Major new features === > > - system users > - (Linux, Windows) process CPU affinity (get and set) > - (POSIX) process number of opened file descriptors. > - (Wi

Re: format() not behaving as expected

2012-06-29 Thread MRAB
On 29/06/2012 17:31, Josh English wrote: I have a list of tuples, and usually print them using: print c, " ".join(map(str, list_of_tuples)) This is beginning to feel clunky (but gives me essentially what I want), and I thought there was a better, more concise, way to achieve this, so I explore

Re: format() not behaving as expected

2012-06-29 Thread Steven D'Aprano
On Fri, 29 Jun 2012 09:31:53 -0700, Josh English wrote: > I have a list of tuples, and usually print them using: > > print c, " ".join(map(str, list_of_tuples)) > > This is beginning to feel clunky (but gives me essentially what I want), > and I thought there was a better, more concise, way to a

Re: format() not behaving as expected

2012-06-29 Thread Josh English
On Friday, June 29, 2012 10:02:45 AM UTC-7, MRAB wrote: > > The ".format" method accepts multiple arguments, so the placeholders in > the format string need to specify which argument to format as well as > how to format it (the format specification after the ":"). > > The "format" function, on th

Re: format() not behaving as expected

2012-06-29 Thread Josh English
On Friday, June 29, 2012 10:08:20 AM UTC-7, Steven D'Aprano wrote: > c = (1,3) > s = "{0[0]}" > print s.format(c) > > '1' > > That's not actually the output copied and pasted. You have quotes around > the string, which you don't get if you pass it to the print command. > Mea culp

Re: format() not behaving as expected

2012-06-29 Thread MRAB
On 29/06/2012 18:19, Josh English wrote: On Friday, June 29, 2012 10:02:45 AM UTC-7, MRAB wrote: The ".format" method accepts multiple arguments, so the placeholders in the format string need to specify which argument to format as well as how to format it (the format specification after the ":"

Re: 转发:Re:how can I implement "cd" like shell in Python?

2012-06-29 Thread Chris Withers
On 28/06/2012 12:39, 梦幻草 wrote: thanks !But this method can not change the directory of the main process.For example: the current directory is "/home/work/local/scripts",this directory have a python script file "cd.py" after executing the script cd.py by "python cd.py ..",the current work direct

Re: code review

2012-06-29 Thread Alister
On Fri, 29 Jun 2012 09:03:22 -0600, Littlefield, Tyler wrote: > On 6/29/2012 1:31 AM, Steven D'Aprano wrote: >> On Thu, 28 Jun 2012 20:58:15 -0700, alex23 wrote: >> >>> On Jun 29, 12:57 pm, "Littlefield, Tyler" wrote: I was curious if someone wouldn't mind poking at some code. The proje

Re: code review

2012-06-29 Thread MRAB
On 29/06/2012 20:41, Alister wrote: On Fri, 29 Jun 2012 09:03:22 -0600, Littlefield, Tyler wrote: On 6/29/2012 1:31 AM, Steven D'Aprano wrote: On Thu, 28 Jun 2012 20:58:15 -0700, alex23 wrote: On Jun 29, 12:57 pm, "Littlefield, Tyler" wrote: I was curious if someone wouldn't mind poking at

Re: I can't send images to this mail-list

2012-06-29 Thread Mark Lawrence
On 29/06/2012 16:26, Ethan Furman wrote: Ben Finney wrote: Chris Angelico writes: 梦幻草 wrote: why can't I send images to python-list@python.org?? >> It's a text-only list. I'll take this opportunity to give heartfelt thanks to the administrators for that policy; please keep this a text

Re: code review

2012-06-29 Thread Martin P. Hellwig
On Friday, 29 June 2012 20:41:11 UTC+1, Alister wrote: > On Fri, 29 Jun 2012 09:03:22 -0600, Littlefield, Tyler wrote: > > > On 6/29/2012 1:31 AM, Steven D'Aprano wrote: > >> On Thu, 28 Jun 2012 20:58:15 -0700, alex23 wrote: > >> > >>> On Jun 29, 12:57 pm, "Littlefield, Tyler" wrote: > I wa

Re: code review

2012-06-29 Thread Alister
On Fri, 29 Jun 2012 13:27:54 -0700, Martin P. Hellwig wrote: > On Friday, 29 June 2012 20:41:11 UTC+1, Alister wrote: >> On Fri, 29 Jun 2012 09:03:22 -0600, Littlefield, Tyler wrote: >> >> > On 6/29/2012 1:31 AM, Steven D'Aprano wrote: >> >> On Thu, 28 Jun 2012 20:58:15 -0700, alex23 wrote: >> >

Re: code review

2012-06-29 Thread Littlefield, Tyler
I am no expert but from what have picked up so far from x import is frowned upon in most cases also this section in main strikes me as a bit odd and convoluted w = world() serv = server(client) w.server = serv serv.world = w I think you are cross referencing classes & would be better to investi

Re: I can't send images to this mail-list

2012-06-29 Thread Dave Angel
On 06/29/2012 06:59 PM, Dennis Lee Bieber wrote: > On Fri, 29 Jun 2012 21:13:09 +0100, Mark Lawrence > declaimed the following in > gmane.comp.python.general: > >> On 29/06/2012 16:26, Ethan Furman wrote: >>> Ben Finney wrote: Chris Angelico writes: > ??? wrote: >> why can't I sen

Re: Re Following syntax error in Mac OX10.7 Terminal

2012-06-29 Thread Andrew Berg
On 6/29/2012 10:58 AM, David Thomas wrote: > Just discovered this in the tutorial further down. I'm currently learning > Python 2 because there seems to be a lot of tutorials out there covering > Python 2 rather than 3. The latest edition (3rd?) of Programming Python by Mark Lutz covers py3k (it

Re: code review

2012-06-29 Thread Steven D'Aprano
On Fri, 29 Jun 2012 19:41:11 +, Alister wrote: > also this section in main strikes me as a bit odd and convoluted > > w = world() > serv = server(client) > w.server = serv > serv.world = w > > I think you are cross referencing classes & would be better to > investigate inheri

Re: code review

2012-06-29 Thread Terry Reedy
On 6/29/2012 4:49 PM, Littlefield, Tyler wrote: I am no expert but from what have picked up so far from x import is frowned upon in most cases from x import * # frowned on by many as reader will not necessarily know what that imports, conflicts are possible, and if you import * twice, reader m

Re: code review

2012-06-29 Thread Terry Reedy
On 6/29/2012 4:43 PM, Alister wrote: from x import * is frowned upon, however, from x import y is fine IMHO. well I said I was no expert & picking things up. re investigation I see your reasoning and yes it was the from X import * I was thinking of. Although a simple import X retaining the n

Re: I can't send images to this mail-list

2012-06-29 Thread Dan Sommers
On Fri, 29 Jun 2012 21:59:41 -0400 Dave Angel wrote: > On 06/29/2012 06:59 PM, Dennis Lee Bieber wrote: > > On Fri, 29 Jun 2012 21:13:09 +0100, Mark Lawrence > > declaimed the following in > > gmane.comp.python.general: > > > >> On 29/06/2012 16:26, Ethan Furman wrote: > >>> Ben Finney wrote: >

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-29 Thread rusi
On Jun 10, 3:36 pm, Arnaud Delobelle wrote: > On 10 June 2012 07:16, rusi wrote: > > > This is worth a read in this > > context:http://osteele.com/archives/2004/11/ides > > Interesting! I definitely fall nicely at one extreme of this > dichotomy.  Every time I've tried to use an IDE, it's made