Re: Who's laughing at my responses, and who's not?

2012-09-24 Thread Ned Deily
In article , Dwight Hutto wrote: > It's a little guy talk, and most seem to be guys. A little, "hey > buddy, this seems like like bullshit", seems ok around here, and it's > a first amendment. It's not OK around here. "Spirited" discussion is fine and to be expected but the Python community

Re: Who's laughing at my responses, and who's not?

2012-09-24 Thread Kushal Das
On Tue, Sep 25, 2012 at 11:22 AM, Dwight Hutto wrote: > It's a little guy talk, and most seem to be guys. A little, "hey > buddy, this seems like like bullshit", seems ok around here, and it's > a first amendment. First amendment does not apply to all the international people here. Everyone shoul

Re: For Counter Variable

2012-09-24 Thread Thomas Rachel
Am 25.09.2012 01:39 schrieb Dwight Hutto: It's not the simpler solution I'm referring to, it's the fact that if you're learning, then you should be able to design the built-in, not just use it. In some simpler cases you are right here. But the fact that you are able to design it doesn't neces

Re: Who's laughing at my responses, and who's not?

2012-09-24 Thread Dwight Hutto
On Tue, Sep 25, 2012 at 1:25 AM, Ethan Furman wrote: > Dwight Hutto wrote: >>> >>> context and cut the potty mouth stuff. >> >> It was meant as a little shop talk, but I forgot there were ladies here as >> well. > > > Not only ladies, but gentlemen. Foul-mouthed "shop talk" is not necessary > to

Re: which a is used?

2012-09-24 Thread Thomas Rachel
Am 25.09.2012 07:22 schrieb Dwight Hutto: No, not really. If you wanna talk shit, I can reflect that, and if you wanna talk politely I can reflect that. I go t attacked first., But not in this thread. Some people read only selectively and see only your verbal assaults, without noticing that

Re: python file API

2012-09-24 Thread Thomas Rachel
Am 25.09.2012 00:37 schrieb Ian Kelly: On Mon, Sep 24, 2012 at 4:14 PM, Chris Angelico wrote: file.pos = 42 # Okay, you're at position 42 file.pos -= 10 # That should put you at position 32 foo = file.pos # Presumably foo is the integer 32 file.pos -= 100 # What should this do? Since ints are

why do this program not fullscreen?

2012-09-24 Thread Levi Nie
the code: import wx app=wx.App() win=wx.Frame(None) win.ShowFullScreen() app.MainLoop() -- http://mail.python.org/mailman/listinfo/python-list

Re: Who's laughing at my responses, and who's not?

2012-09-24 Thread Ethan Furman
Dwight Hutto wrote: Been getting slammed by a few for some insignificant things, so who's laughing at me, and who takes me seriously. I don't claim to be the best, just trying to help. Mis-interpreting posts is not insignificant. Being rude is not insignificant. Refusing to see these things,

Re: python file API

2012-09-24 Thread Thomas Rachel
Am 25.09.2012 04:28 schrieb Steven D'Aprano: By the way, the implementation of this is probably trivial in Python 2.x. Untested: class MyFile(file): @property def pos(self): return self.tell() @pos.setter def pos(self, p): if p< 0: self.seek(p

Re: Who's laughing at my responses, and who's not?

2012-09-24 Thread Ethan Furman
Dwight Hutto wrote: context and cut the potty mouth stuff. It was meant as a little shop talk, but I forgot there were ladies here as well. Not only ladies, but gentlemen. Foul-mouthed "shop talk" is not necessary to teach Python. Practice some self-control, or at least self-editing. ~Et

Re: which a is used?

2012-09-24 Thread Dwight Hutto
>> OH. stirrin up shit and can't stand the smell. > > > Where did he so? > You'd have to read the other posts. And remember that some of these names are A.K.A.'s, they ask respond, and befriend another name through another proxy. -- Best Regards, David Hutto CEO: http://www.hitwebd

Re: which a is used?

2012-09-24 Thread Dwight Hutto
On Tue, Sep 25, 2012 at 1:06 AM, Thomas Rachel wrote: > Am 25.09.2012 03:13 schrieb Dwight Hutto: > > >> Anything else bitch, take time to think about it. > > > And you wonder if people don't like you because of your language? > No, not really. If you wanna talk shit, I can reflect that, and if y

Re: which a is used?

2012-09-24 Thread Thomas Rachel
Am 25.09.2012 04:37 schrieb Dwight Hutto: I honestly could not care less what you think about me, but don't use that term. This isn't a boys' club and we don't need your hurt ego driving people away from here. OH. stirrin up shit and can't stand the smell. Where did he so? Thoma

Re: Who's laughing at my responses, and who's not?

2012-09-24 Thread Dwight Hutto
> context and cut the potty mouth stuff. It was meant as a little shop talk, but I forgot there were ladies here as well. -- Best Regards, David Hutto CEO: http://www.hitwebdevelopment.com -- http://mail.python.org/mailman/listinfo/python-list

Re: which a is used?

2012-09-24 Thread Thomas Rachel
Am 25.09.2012 03:47 schrieb Dwight Hutto: But within a class this is could be defined as self.x within the functions and changed, correct? class a(): def __init__(self,a): self.a = a def f(self): print self.a def g(self):

Re: Who's laughing at my responses, and who's not?

2012-09-24 Thread Terry Reedy
On 9/25/2012 12:43 AM, Dwight Hutto wrote: It sounds pretentious, but over the past several days, I've been slammed on every post almost. All because of an argument over me not posting a little context in a conversation, that seemed short and chatty. I was just wondering, if it's just them, or i

Re: Who's laughing at my responses, and who's not?

2012-09-24 Thread Littlefield, Tyler
On 9/24/2012 10:43 PM, Dwight Hutto wrote: It sounds pretentious, but over the past several days, I've been slammed on every post almost. All because of an argument over me not posting a little context in a conversation, that seemed short and chatty. I was just wondering, if it's just them, or i

Re: which a is used?

2012-09-24 Thread Terry Reedy
Revising my answer to your other post. On 9/24/2012 9:13 PM, Dwight Hutto wrote: Anything else bitch, take time to think about it. This is completely bizarre, and uncalled for as an apparent response to Alex. Your next response is too dirty to read, let alone quote. Please desist. If necessa

Re: PHP vs. Python

2012-09-24 Thread tejas . tank . mca
On Thursday, 23 December 2004 03:33:36 UTC+5:30, (unknown) wrote: > Anyone know which is faster? I'm a PHP programmer but considering > getting into Python ... did searches on Google but didn't turn much up > on this. > > Thanks! > Stephen Here some helpful gudance. http://hentenaar.com/seren

Re: Who's laughing at my responses, and who's not?

2012-09-24 Thread Terry Reedy
I am not laughing. Looking back, some of your responses seem sensible. I mostly skip over single word responses, and others that seems content free, whether from you or others. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Who's laughing at my responses, and who's not?

2012-09-24 Thread Dwight Hutto
It sounds pretentious, but over the past several days, I've been slammed on every post almost. All because of an argument over me not posting a little context in a conversation, that seemed short and chatty. I was just wondering, if it's just them, or if it's my netiquette. -- Best Regards, Dav

Re: Who's laughing at my responses, and who's not?

2012-09-24 Thread Tim Roberts
Dwight Hutto wrote: > >Been getting slammed by a few for some insignificant things, so who's >laughing at me, and who takes me seriously. I don't claim to be the >best, just trying to help. > >So who doesn't want me around? Who cares? There are probably hundreds of thousands of people reading th

Re: Memory usage per top 10x usage per heapy

2012-09-24 Thread Junkshops
Just curious; which is it, two million lines, or half a million bytes? I have, in fact, this very afternoon, invented a means of writing a carriage return character using only 2 bits of information. I am prepared to sell licenses to this revolutionary technology for the low price of $29.95 plu

Re: How to limit CPU usage in Python

2012-09-24 Thread Tim Roberts
Paul Rubin wrote: > >Tim Roberts: reasons to want to do this might involve a shared host >where excessive cpu usage affects other users; That's what priorities are for. >...or a computer with >limited power consumption, where prolonged high cpu activity causes >thermal or other problems. OK, I

Re: "9/11 Missing Links" is the video that Jews do not want you to see!

2012-09-24 Thread hamilton
On 9/24/2012 9:35 PM, Suzi Mrezutttii wrote: Google and watch "9/11 Missing Links" before Jews remove it from youtube anytime now! Hey dude, Nice name, "a boy named sue" !!! -- http://mail.python.org/mailman/listinfo/python-list

"9/11 Missing Links" is the video that Jews do not want you to see!

2012-09-24 Thread Suzi Mrezutttii
Google and watch "9/11 Missing Links" before Jews remove it from youtube anytime now! http://joozhatetruth.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: which a is used?

2012-09-24 Thread Dwight Hutto
> I honestly could not care less what you think about me, but don't use > that term. This isn't a boys' club and we don't need your hurt ego > driving people away from here. OH. stirrin up shit and can't stand the smell. Turn and switch technique. "You're so vulgar, and I wasn't."Go ge

Re: python file API

2012-09-24 Thread Mark Adam
On Mon, Sep 24, 2012 at 5:55 PM, Oscar Benjamin wrote: > There are many situations where a little bit of attribute access magic is a > good thing. However, operations that involve the underlying OS and that are > prone to raising exceptions even in bug free code should not be performed > implicitl

Re: keeping information about players around

2012-09-24 Thread Steven D'Aprano
On Tue, 25 Sep 2012 08:19:34 +1000, Chris Angelico wrote: > On Tue, Sep 25, 2012 at 7:14 AM, Dwight Hutto > wrote: >> Also, If this is a browser app I'd go with phpmyadmin, and MySQL >> >> If a tkinter/wxpython/etc app, then maybe sqlite. > > Out of curiosity, why? MySQL isn't magically better f

Re: python file API

2012-09-24 Thread Steven D'Aprano
On Mon, 24 Sep 2012 15:36:20 -0700, zipher wrote: > You raise a valid point: that by abstracting the file pointer into a > position attribute you risk "de-coupling" the conceptual link between > the underlying file and your abstraction in the python interpreter I don't think this argument holds w

Re: which a is used?

2012-09-24 Thread alex23
On Sep 25, 11:13 am, Dwight Hutto wrote: > bitch I honestly could not care less what you think about me, but don't use that term. This isn't a boys' club and we don't need your hurt ego driving people away from here. -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL questions: still supported? Problems on 2.7 for win? alternatives?

2012-09-24 Thread alex23
On Sep 25, 11:46 am, Alex Clark wrote: > Actually, I started it for the Plone community, but have recently > broadened the scope (since most of the contributions came from outside > Plone). You're a saint, thanks for taking this on. -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL questions: still supported? Problems on 2.7 for win? alternatives?

2012-09-24 Thread alex23
On Sep 25, 6:04 am, Gelonida N wrote: > So I'll probably try to install the custom binary, but would like to > know whether anybody has experience with this > build.http://www.lfd.uci.edu/~gohlke/pythonlibs/#pil Sorry, I missed this the first time. I'm using this version successfully under Window

Re: which a is used?

2012-09-24 Thread Dwight Hutto
But within a class this is could be defined as self.x within the functions and changed, correct? class a(): def __init__(self,a): self.a = a def f(self): print self.a def g(self): self.a = 20 print self.a

Re: which a is used?

2012-09-24 Thread Dwight Hutto
On Mon, Sep 24, 2012 at 9:18 PM, Steven D'Aprano wrote: > On Mon, 24 Sep 2012 16:43:24 -0700, Jayden wrote: > >> Dear All, >> >> I have a simple code as follows: >> >> # Begin >> a = 1 >> >> def f(): >> print a >>Paul Rubin >> def g(): >> a = 20 >> f() >> >> g() >> #End >> >> I think

Re: PIL questions: still supported? Problems on 2.7 for win? alternatives?

2012-09-24 Thread Alex Clark
On 2012-09-24 23:38:05 +, alex23 said: On Sep 25, 6:04 am, Gelonida N wrote: This all does not sound very comforting. Why is there no fix on the official site? Has a bug been logged about the issue? The Plone community keeps a fairly up-to-date fork called Pillow, we've had a lot of suc

Re: python file API

2012-09-24 Thread Steven D'Aprano
On Tue, 25 Sep 2012 08:14:01 +1000, Chris Angelico wrote: > Presumably the same way you reference a list element relative to > end-of-list: negative numbers. However, this starts to feel like magic > rather than attribute assignment - it's like manipulating the DOM in > JavaScript, you set an attr

Who's laughing at my responses, and who's not?

2012-09-24 Thread Dwight Hutto
Been getting slammed by a few for some insignificant things, so who's laughing at me, and who takes me seriously. I don't claim to be the best, just trying to help. So who doesn't want me around? -- Best Regards, David Hutto CEO: http://www.hitwebdevelopment.com -- http://mail.python.org/mailma

Re: which a is used?

2012-09-24 Thread Steven D'Aprano
On Mon, 24 Sep 2012 16:43:24 -0700, Jayden wrote: > Dear All, > > I have a simple code as follows: > > # Begin > a = 1 > > def f(): > print a > > def g(): > a = 20 > f() > > g() > #End > > I think the results should be 20, but it is 1. Would you please tell me > why? You are exp

Re: For Counter Variable

2012-09-24 Thread Paul Rubin
alex23 writes: > To highlight the vast gulf between what you think you are and what you > actually produce. By now I think we're in the DNFTT zone. -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory usage per top 10x usage per heapy

2012-09-24 Thread Dave Angel
On 09/24/2012 05:59 PM, MrsEntity wrote: > Hi all, > > I'm working on some code that parses a 500kb, 2M line file Just curious; which is it, two million lines, or half a million bytes? > line by line and saves, per line, some derived strings into various data > structures. I thus expect that m

Re: which a is used?

2012-09-24 Thread Dwight Hutto
Anything else bitch, take time to think about it. -- Best Regards, David Hutto CEO: http://www.hitwebdevelopment.com -- http://mail.python.org/mailman/listinfo/python-list

Re: For Counter Variable

2012-09-24 Thread Dwight Hutto
On Mon, Sep 24, 2012 at 8:32 PM, Littlefield, Tyler wrote: > On 9/24/2012 6:25 PM, Dwight Hutto wrote: >>> >>> To highlight the vast gulf between what you think you are and what you >>> actually produce. >> >> I produce working code, and if it works, then I don't just think...I know. >> >> Working

Re: For Counter Variable

2012-09-24 Thread Littlefield, Tyler
On 9/24/2012 6:25 PM, Dwight Hutto wrote: To highlight the vast gulf between what you think you are and what you actually produce. I produce working code, and if it works, then I don't just think...I know. Working code != good code. Just an observation. Also, I've noticed a vast differences be

Re: For Counter Variable

2012-09-24 Thread Oscar Benjamin
On 25 September 2012 01:17, Dwight Hutto wrote: > > Is the animated GIF on your website under 60MB yet? > yeah a command line called convert, and taking out a few jpegs used to > convert, and I can reduce it to any size, what's the fucking point of > that question other than ignorant rhetoric, th

Re: PIL questions: still supported? Problems on 2.7 for win? alternatives?

2012-09-24 Thread cjgohlke
On Monday, September 24, 2012 4:38:05 PM UTC-7, alex23 wrote: > On Sep 25, 6:04 am, Gelonida N wrote: > > > This all does not sound very comforting. Why is there no fix on the > > > official site? > > > > Has a bug been logged about the issue? > See issue #1 at

Re: keeping information about players around

2012-09-24 Thread Dwight Hutto
On Mon, Sep 24, 2012 at 7:52 PM, alex23 wrote: > On Sep 25, 9:44 am, Dwight Hutto wrote: >> What DB are you recommending, check out sqlite's: >> >> http://www.cvedetails.com/vulnerability-list/vendor_id-9237/Sqlite.html > > Are you _seriously_ comparing _four_ vulnerabilities to 60+? > Even less

Re: For Counter Variable

2012-09-24 Thread Dwight Hutto
> To highlight the vast gulf between what you think you are and what you > actually produce. I produce working code, and if it works, then I don't just think...I know. -- Best Regards, David Hutto CEO: http://www.hitwebdevelopment.com -- http://mail.python.org/mailman/listinfo/python-list

Re: For Counter Variable

2012-09-24 Thread Dwight Hutto
> Is the animated GIF on your website under 60MB yet? yeah a command line called convert, and taking out a few jpegs used to convert, and I can reduce it to any size, what's the fucking point of that question other than ignorant rhetoric, that you know is easily fixable? -- Best Regards, David H

Re: For Counter Variable

2012-09-24 Thread alex23
On Sep 25, 10:18 am, Dwight Hutto wrote: > what's the fucking point of that question To highlight the vast gulf between what you think you are and what you actually produce. -- http://mail.python.org/mailman/listinfo/python-list

Re: which a is used?

2012-09-24 Thread alex23
On Sep 25, 9:43 am, Jayden wrote: > Dear All, > > I have a simple code as follows: > > # Begin > a = 1 > > def f(): >     print a > > def g(): >     a = 20 >     f() > > g() > #End > > I think the results should be 20, but it is 1. Would you please tell me why? Because you don't declare 'a' in 'f

Re: keeping information about players around

2012-09-24 Thread Littlefield, Tyler
On 9/24/2012 3:14 PM, Dwight Hutto wrote: I have yet another design question. In my mud, zones are basically objects that manage a collection of rooms; For example, a town would be it's own zone. It holds information like maxRooms, the list of rooms as well as some other data like player owners a

Re: which a is used?

2012-09-24 Thread Dwight Hutto
On Mon, Sep 24, 2012 at 7:57 PM, Dwight Hutto wrote: > On Mon, Sep 24, 2012 at 7:43 PM, Jayden wrote: >> Dear All, >> >> I have a simple code as follows: >> >> # Begin >> a = 1 >> >> def f(): >> print a >> >> def g(): >> a = 20 >> f() this prints a from calling f() function call pri

Re: For Counter Variable

2012-09-24 Thread alex23
On Sep 25, 9:49 am, Dwight Hutto wrote: > Rolling> your own version of an existing function from scratch is _not_ the > > "professional" approach. > > Yes it is, if you don't know the builtin, and everyone has memory flaws. Let me break this down for you in simple terms. Code represents experien

Re: keeping information about players around

2012-09-24 Thread alex23
On Sep 25, 9:44 am, Dwight Hutto wrote: >  What DB are you recommending, check out sqlite's: > > http://www.cvedetails.com/vulnerability-list/vendor_id-9237/Sqlite.html Are you _seriously_ comparing _four_ vulnerabilities to 60+? > Maybe just a parsed file with data, and accessing data that you

Re: Memory usage per top 10x usage per heapy

2012-09-24 Thread Junkshops
Hi Tim, thanks for the response. - check how you're reading the data: are you iterating over the lines a row at a time, or are you using .read()/.readlines() to pull in the whole file and then operate on that? I'm using enumerate() on an iterable input (which in this case is the fileh

Re: For Counter Variable

2012-09-24 Thread Dwight Hutto
Propaganda over... -- Best Regards, David Hutto CEO: http://www.hitwebdevelopment.com -- http://mail.python.org/mailman/listinfo/python-list

Re: which a is used?

2012-09-24 Thread Dwight Hutto
On Mon, Sep 24, 2012 at 7:43 PM, Jayden wrote: > Dear All, > > I have a simple code as follows: > > # Begin > a = 1 > > def f(): > print a > > def g(): > a = 20 > f() > > g() > #End > > I think the results should be 20, but it is 1. Would you please tell me why? > > Thanks a lot! > > -

Re: For Counter Variable

2012-09-24 Thread Dwight Hutto
>> Well if you're learning then the builtin might be more like how we >> answer students questions here, than those doing work. > > STOP SAYING THIS NONSENSE. > > Using a pre-defined function is _not_ the "student" approach. What are talking about, I suggested they roll there own in several respons

which a is used?

2012-09-24 Thread Jayden
Dear All, I have a simple code as follows: # Begin a = 1 def f(): print a def g(): a = 20 f() g() #End I think the results should be 20, but it is 1. Would you please tell me why? Thanks a lot! -- http://mail.python.org/mailman/listinfo/python-list

Re: For Counter Variable

2012-09-24 Thread alex23
On Sep 25, 9:39 am, Dwight Hutto wrote: > It's not the simpler solution I'm referring to, it's the fact that if > you're learning, then you should be able to design the built-in, not > just use it. Garbage. I don't need to be able to build a SQLAlchemy to use it. I don't need to be able to build

Re: For Counter Variable

2012-09-24 Thread Dwight Hutto
On Sep 25, 8:26 am, Dwight Hutto wrote: > It's a function usage. Not to be too serious, there are usually > simpler solutions, and built in functions. `enumerate` _is_ a built-in function. Please provide an example of a "simpler solution". It's not the simpler solution I'm referring to, it's the

Re: keeping information about players around

2012-09-24 Thread Dwight Hutto
On Mon, Sep 24, 2012 at 7:28 PM, alex23 wrote: > On Sep 25, 8:32 am, Dwight Hutto wrote: >> No, but phpmyadmin is a great GUI for MySQL > > If you're recommending MySQL use on the basis of phpmyadmin, you > should also make sure to mention: > http://www.phpmyadmin.net/home_page/security/ > > Grea

Re: For Counter Variable

2012-09-24 Thread alex23
On Sep 25, 8:58 am, Dwight Hutto wrote: > Well if you're learning then the builtin might be more like how we > answer students questions here, than those doing work. STOP SAYING THIS NONSENSE. Using a pre-defined function is _not_ the "student" approach. Rolling your own version of an existing f

Re: PIL questions: still supported? Problems on 2.7 for win? alternatives?

2012-09-24 Thread alex23
On Sep 25, 6:04 am, Gelonida N wrote: > This all does not sound very comforting. Why is there no fix on the > official site? Has a bug been logged about the issue? The Plone community keeps a fairly up-to-date fork called Pillow, we've had a lot of success using that locally: http://pypi.python

Re: keeping information about players around

2012-09-24 Thread alex23
On Sep 25, 8:32 am, Dwight Hutto wrote: > No, but phpmyadmin is a great GUI for MySQL If you're recommending MySQL use on the basis of phpmyadmin, you should also make sure to mention: http://www.phpmyadmin.net/home_page/security/ Great GUI, maybe. Huge security hole, absolutely. Most organisati

Re: Memory usage per top 10x usage per heapy

2012-09-24 Thread Tim Chase
On 09/24/12 16:59, MrsEntity wrote: > I'm working on some code that parses a 500kb, 2M line file line > by line and saves, per line, some derived strings into various > data structures. I thus expect that memory use should > monotonically increase. Currently, the program is taking up so > much memo

Re: python file API

2012-09-24 Thread Chris Kaynor
On Mon, Sep 24, 2012 at 3:37 PM, Ian Kelly wrote: > On Mon, Sep 24, 2012 at 4:14 PM, Chris Angelico wrote: >> file.pos = 42 # Okay, you're at position 42 >> file.pos -= 10 # That should put you at position 32 >> foo = file.pos # Presumably foo is the integer 32 >> file.pos -= 100 # What should th

Re: A little morning puzzle

2012-09-24 Thread Dwight Hutto
The posted code produces neither a set nor any keys; > it prints out the same predetermined non-key value multiple times. This shows multiple dicts, with the same keys, and shows different values, and some with the same, and that is, in my opinion what the OP asked for: a = {} a['dict'] = 1 b =

Re: python file API

2012-09-24 Thread Mark Lawrence
On 24/09/2012 22:35, zipher wrote: For some time now, I've wanted to suggest a better abstraction for the type in Python. It currently uses an antiquated C-style interface for moving around in a file, with methods like tell() and seek(). But after attributes were introduced to Python, it se

Re: keeping information about players around

2012-09-24 Thread Dwight Hutto
> is just a way of generating that. Any language works on the back > end... and PHP isn't the best :) Python does quite well at that task; > I have a tiny little Python script that uses a web browser as its > front ent. This stems from my limited usage of python in the browser(I usually use it for

Re: python file API

2012-09-24 Thread Chris Angelico
On Tue, Sep 25, 2012 at 8:37 AM, Ian Kelly wrote: > On Mon, Sep 24, 2012 at 4:14 PM, Chris Angelico wrote: >> file.pos = 42 # Okay, you're at position 42 >> file.pos -= 10 # That should put you at position 32 >> foo = file.pos # Presumably foo is the integer 32 >> file.pos -= 100 # What should th

Re: A little morning puzzle

2012-09-24 Thread Ian Kelly
On Mon, Sep 24, 2012 at 4:07 PM, Dwight Hutto wrote: > They stated: > > I have a list of dictionaries. They all have the same keys. I want to find > the > set of keys where all the dictionaries have the same values. Suggestions? > > No, to me it meant to find similar values in several dicts wi

Re: python file API

2012-09-24 Thread Oscar Benjamin
On 24 September 2012 23:41, Mark Adam wrote: > > seek() and tell() can raise exceptions on some files. Exposing pos as an > > attribute and allowing it to be manipulated with attribute access gives > the > > impression that it is always meaningful to do so. > > It's a good point, python already

Re: For Counter Variable

2012-09-24 Thread Dwight Hutto
> *How* would one implement this better, more simply (for the user, not the > implementator) or in a more readable manner? Chose *any* one of those. Well if you're learning then the builtin might be more like how we answer students questions here, than those doing work. Write out the algorithmic

Re: keeping information about players around

2012-09-24 Thread Chris Angelico
On Tue, Sep 25, 2012 at 8:31 AM, Dwight Hutto wrote: > And in the end it's usually html, php, css, javascript in the browser, > atleast for me it is. I'm just starting to utilize python in that > area, so excuse the naivety. In the browser it's HTML, CSS, JavaScript (ECMAScript, etc, etc); PHP is

Re: For Counter Variable

2012-09-24 Thread Joshua Landau
On 24 September 2012 23:26, Dwight Hutto wrote: > On Mon, Sep 24, 2012 at 6:09 PM, Ethan Furman wrote: > > jimbo1qaz wrote: > >> > >> On Sunday, September 23, 2012 9:36:19 AM UTC-7, jimbo1qaz wrote: > >>> > >>> Am I missing something obvious, or do I have to manually put in a > counter > >>> in

Re: keeping information about players around

2012-09-24 Thread Dwight Hutto
>> Out of curiosity, why? MySQL isn't magically better for everything >> where data ends up displayed in a web browser. > > No, but phpmyadmin is a great GUI for MySQL > Meaning, it gives a great web app, that sqlite doesn't have...yet. It's the tools around MySQL for me, that gives it the umph it

Re: python file API

2012-09-24 Thread Ian Kelly
On Mon, Sep 24, 2012 at 4:14 PM, Chris Angelico wrote: > file.pos = 42 # Okay, you're at position 42 > file.pos -= 10 # That should put you at position 32 > foo = file.pos # Presumably foo is the integer 32 > file.pos -= 100 # What should this do? Since ints are immutable, the language specifies

Re: python file API

2012-09-24 Thread Dave Angel
(forwarding to the list) On 09/24/2012 06:23 PM, Mark Adam wrote: > On Mon, Sep 24, 2012 at 4:49 PM, Dave Angel wrote: >> On 09/24/2012 05:35 PM, zipher wrote: >>> For some time now, I've wanted to suggest a better abstraction for the >>> type in Python. It currently uses an antiquated C-style

Re: python file API

2012-09-24 Thread zipher
You raise a valid point: that by abstracting the file pointer into a position attribute you risk "de-coupling" the conceptual link between the underlying file and your abstraction in the python interpreter, but I think the programmer can take responsibility for maintaining the abstraction. Th

Re: keeping information about players around

2012-09-24 Thread Dwight Hutto
On Mon, Sep 24, 2012 at 6:19 PM, Chris Angelico wrote: > On Tue, Sep 25, 2012 at 7:14 AM, Dwight Hutto wrote: >> Also, If this is a browser app I'd go with phpmyadmin, and MySQL >> >> If a tkinter/wxpython/etc app, then maybe sqlite. > > Out of curiosity, why? MySQL isn't magically better for eve

Re: For Counter Variable

2012-09-24 Thread Dwight Hutto
On Mon, Sep 24, 2012 at 6:09 PM, Ethan Furman wrote: > jimbo1qaz wrote: >> >> On Sunday, September 23, 2012 9:36:19 AM UTC-7, jimbo1qaz wrote: >>> >>> Am I missing something obvious, or do I have to manually put in a counter >>> in the for loops? That's a very basic request, but I couldn't find an

Re: keeping information about players around

2012-09-24 Thread Chris Angelico
On Tue, Sep 25, 2012 at 7:14 AM, Dwight Hutto wrote: > Also, If this is a browser app I'd go with phpmyadmin, and MySQL > > If a tkinter/wxpython/etc app, then maybe sqlite. Out of curiosity, why? MySQL isn't magically better for everything where data ends up displayed in a web browser. Unless yo

Re: For Counter Variable

2012-09-24 Thread Ethan Furman
jimbo1qaz wrote: On Sunday, September 23, 2012 9:36:19 AM UTC-7, jimbo1qaz wrote: Am I missing something obvious, or do I have to manually put in a counter in the for loops? That's a very basic request, but I couldn't find anything in the documentation. Ya, they should really give a better w

Re: python file API

2012-09-24 Thread Chris Angelico
On Tue, Sep 25, 2012 at 7:49 AM, Dave Angel wrote: > On 09/24/2012 05:35 PM, zipher wrote: >> Let file-type have an attribute .pos for position. Now you can get rid of >> the seek() and tell() methods and manipulate the file pointer more easily >> with standard arithmetic operations. >> >

Re: A little morning puzzle

2012-09-24 Thread Dwight Hutto
On Mon, Sep 24, 2012 at 5:18 PM, Ethan Furman wrote: > Ian Kelly wrote: >> >> On Sat, Sep 22, 2012 at 9:44 PM, Dwight Hutto >> wrote: >>> >>> Why don't you all look at the code(python and C), and tell me how much >>> code it took to write the functions the other's examples made use of >>> to comp

Memory usage per top 10x usage per heapy

2012-09-24 Thread MrsEntity
Hi all, I'm working on some code that parses a 500kb, 2M line file line by line and saves, per line, some derived strings into various data structures. I thus expect that memory use should monotonically increase. Currently, the program is taking up so much memory - even on 1/2 sized files - tha

Re: python file API

2012-09-24 Thread Chris Kaynor
On Mon, Sep 24, 2012 at 2:49 PM, Dave Angel wrote: > > And what approach would you use for positioning relative to > end-of-file? That's currently done with an optional second parameter to > seek() method. > I'm not advocating for or against the idea, but that could be handled the same way index

Re: python file API

2012-09-24 Thread Oscar Benjamin
On 24 September 2012 22:35, zipher wrote: > For some time now, I've wanted to suggest a better abstraction for the > type in Python. It currently uses an antiquated C-style interface > for moving around in a file, with methods like tell() and seek(). But > after attributes were introduced to P

Re: A little morning puzzle

2012-09-24 Thread Ethan Furman
Ian Kelly wrote: On Sat, Sep 22, 2012 at 9:44 PM, Dwight Hutto wrote: Why don't you all look at the code(python and C), and tell me how much code it took to write the functions the other's examples made use of to complete the task. Just because you can use a function, and make it look easier,

Re: python file API

2012-09-24 Thread Dave Angel
On 09/24/2012 05:35 PM, zipher wrote: > For some time now, I've wanted to suggest a better abstraction for the > type in Python. It currently uses an antiquated C-style interface for moving > around in a file, with methods like tell() and seek(). But after attributes > were introduced to Pyth

python file API

2012-09-24 Thread zipher
For some time now, I've wanted to suggest a better abstraction for the type in Python. It currently uses an antiquated C-style interface for moving around in a file, with methods like tell() and seek(). But after attributes were introduced to Python, it seems it should be re-addressed. Let f

Re: Anyone able to help on installing packages?

2012-09-24 Thread Dwight Hutto
You could just take the python code, and put it in the site packages file. Depends on the package. -- Best Regards, David Hutto CEO: http://www.hitwebdevelopment.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Anyone able to help on installing packages?

2012-09-24 Thread Oscar Benjamin
On 24 September 2012 21:27, John Mordecai Dildy wrote: > Anyone have Ideas on nose and distribute? Your post has no context and simply asks a very vague question. Had you explained what you tried and what happened and perhaps shown an error message I might have been able to answer your question

Re: A little morning puzzle

2012-09-24 Thread Dwight Hutto
> Ergo: 'enumerate()' is the correct suggestion over manually > maintaining your own index, despite it ostensibly being "more" code > due to its implementation. But, therefore, that doesn't mean that the coder can just USE a function, and not be able to design it themselves. So 'correct suggestion

Re: keeping information about players around

2012-09-24 Thread Dwight Hutto
> I have yet another design question. > In my mud, zones are basically objects that manage a collection of rooms; > For example, a town would be it's own zone. > It holds information like maxRooms, the list of rooms as well as some other > data like player owners and access flags. > The access flag

Re: request for another code review

2012-09-24 Thread Littlefield, Tyler
On 9/23/2012 9:48 PM, alex23 wrote: On Sep 23, 6:14 am, "Littlefield, Tyler" wrote: I've gotten a bit farther into my python mud, and wanted to request another code review for style and the like. Are you familiar with codereview.stackexchange.com ? I actually wasn't, thanks! (This isn't

Re: request for another code review

2012-09-24 Thread Littlefield, Tyler
On 9/23/2012 9:48 PM, alex23 wrote: On Sep 23, 6:14 am, "Littlefield, Tyler" wrote: I've gotten a bit farther into my python mud, and wanted to request another code review for style and the like. Are you familiar with codereview.stackexchange.com ? I actually wasn't, thanks! (This isn't

Re: metaclass question

2012-09-24 Thread Ian Kelly
On Mon, Sep 24, 2012 at 11:43 AM, Chris Withers wrote: > Hi All, > > Is there a metaclass-y way I could cause the following: > > class TheParser(Parser): > def handle_ARecord(self): > pass > def handle_ARecord(self): > pass > > ...to raise an exception as a result of the 'h

  1   2   >