Re: Fastest web framework

2012-09-24 Thread Alec Taylor
Can you throw in web2py? Thanks On Sun, Sep 23, 2012 at 7:19 PM, Andriy Kornatskyy < andriy.kornats...@live.com> wrote: > > I have run recently a benchmark of a trivial 'hello world' application for > various python web frameworks (bottle, django, flask, pyramid, web.py, > wheezy.web) hosted in

RE: Fastest web framework

2012-09-24 Thread Andriy Kornatskyy
Accepted. > Date: Mon, 24 Sep 2012 17:36:25 +1000 > Subject: Re: Fastest web framework > From: alec.tayl...@gmail.com > To: andriy.kornats...@live.com > CC: python-list@python.org > > Can you throw in web2py? > > Thanks > > On Sun, Sep 23, 2012 at 7:19 P

Re: Invalid identifier claimed to be valid by docs (methinks)

2012-09-24 Thread Joshua Landau
On 24 September 2012 03:42, Terry Reedy wrote: > On 9/23/2012 6:57 PM, Ian Kelly wrote: > >> On Sun, Sep 23, 2012 at 4:24 PM, Joshua Landau >> wrote: >> >>> The docs describe identifiers to have this grammar: >>> >>> identifier ::= xid_start xid_continue* >>> id_start ::= >> Lo, >>> Nl,

Re: Fastest web framework

2012-09-24 Thread Tarek Ziadé
On 9/23/12 11:19 AM, Andriy Kornatskyy wrote: I have run recently a benchmark of a trivial 'hello world' application for various python web frameworks (bottle, django, flask, pyramid, web.py, wheezy.web) hosted in uWSGI/cpython2.7 and gunicorn/pypy1.9... you might find it interesting: http://

style-url support for simplekml

2012-09-24 Thread lodeameije
Hi! I love the simplekml package. I have a lot of files and always use an external file for styles. For the moment, I could not find how to implement a style-url without running over the kml file after generating and changing 'manually'(well, it "is" automated) all styles: i.e.: ..

Re: [Python-Dev] [RELEASED] Python 3.3.0 release candidate 3

2012-09-24 Thread Ethan Furman
Mark Lawrence wrote: On 24/09/2012 07:18, Georg Brandl wrote: [snip impressive list of improvements] Yes, but apart from all that, what have the python devs ever done for us? Nothing :) I'll take that kind of nothing any day of the week! ;) ~Ethan~ -- http://mail.python.org/mailman/list

Re: Pass numeric arrays from C extensions to Python

2012-09-24 Thread Grant Edwards
On 2012-09-24, JBT wrote: > I am looking for a way to pass numeric arrays, such as *float a[100]; > double b[200];*, from C extension codes to python. The use case of > this problem is that you have data stored in a particular format, > NASA common data format (CDF) in my case, and there exists a

Re: keeping information about players around

2012-09-24 Thread Jean-Michel Pichavant
- Original Message - > ytHello all: > I've asked for a couple code reviews lately on a mud I've been > working > on, to kind of help me with ideas and a better design. > > I have yet another design question. > In my mud, zones are basically objects that manage a collection of > rooms; For

Re: Python presentations

2012-09-24 Thread andrea crotti
For anyone interested, I already moved the slides on github (https://github.com/AndreaCrotti/pyconuk2012_slides) and for example the decorator slides will be generated from this: https://raw.github.com/AndreaCrotti/pyconuk2012_slides/master/deco_context/deco.rst Notice the literalinclude with :py

Re: keeping information about players around

2012-09-24 Thread Jean-Michel Pichavant
- Original Message - > >Pickle everything, use sqllite for your database. When you get > >things > working, then you can start measuring your performances and think > >about > clever implementation > That was a bunch of information; sorry about that. what do you mean > by > using sqlite for

Re: Exact integer-valued floats

2012-09-24 Thread wrw
On Sep 22, 2012, at 7:06 PM, Dave Angel wrote: > On 09/22/2012 05:05 PM, Tim Roberts wrote: >> Dennis Lee Bieber wrote: >>> On 22 Sep 2012 01:36:59 GMT, Steven D'Aprano wrote: For non IEEE 754 floating point systems, there is no telling how bad the implementation could be :( >>> L

Re: Java singletonMap in Python

2012-09-24 Thread Duncan Booth
Steven D'Aprano wrote: > On Mon, 24 Sep 2012 00:14:23 +0100, Mark Lawrence wrote: > >> Purely for fun I've been porting some code to Python and came across >> the singletonMap[1]. I'm aware that there are loads of recipes on >> the web for both singletons e.g.[2] and immutable dictionaries >> e

Re: write to a file two dict()

2012-09-24 Thread inq1ltd
On Sunday, September 23, 2012 10:44:30 AM giuseppe.amatu...@gmail.com wrote: > Hi > Have two dict() of the same length and i want print them to a common file. > > > a={1: 1, 2: 2, 3: 3} > b={1: 11, 2: 22, 3: 33} > > in order to obtain > > 1 1 1 11 > 2 2 2 22 > 3 3 3 33 > > I tried > > output

Re: Does python have built command for package skeleton creation?

2012-09-24 Thread 88888 Dihedral
xliiv於 2012年9月21日星期五UTC+8下午9時13分38秒寫道: > On Friday, September 21, 2012 3:04:02 PM UTC+2, Tarek Ziadé wrote: > > > On 9/21/12 2:14 PM, xliiv wrote: > > > > > > > > > > > > > > Python Paste is probably what you are looking for - see > > > > > > > > > > > > > > http://lucasmanual.com/mywi

Re: Java singletonMap in Python

2012-09-24 Thread 88888 Dihedral
Duncan Booth於 2012年9月25日星期二UTC+8上午1時33分31秒寫道: > Steven D'Aprano wrote: > > > > > On Mon, 24 Sep 2012 00:14:23 +0100, Mark Lawrence wrote: > > > > > >> Purely for fun I've been porting some code to Python and came across > > >> the singletonMap[1]. I'm aware that there are loads of recipes

Re: Java singletonMap in Python

2012-09-24 Thread Devin Jeanpierre
On Sun, Sep 23, 2012 at 7:14 PM, Mark Lawrence wrote: > Purely for fun I've been porting some code to Python and came across the > singletonMap[1]. I'm aware that there are loads of recipes on the web for > both singletons e.g.[2] and immutable dictionaries e.g.[3]. I was wondering > how to comb

Re: Java singletonMap in Python

2012-09-24 Thread Mark Lawrence
On 24/09/2012 18:33, Duncan Booth wrote: Steven D'Aprano wrote: On Mon, 24 Sep 2012 00:14:23 +0100, Mark Lawrence wrote: Purely for fun I've been porting some code to Python and came across the singletonMap[1]. I'm aware that there are loads of recipes on the web for both singletons e.g.[2]

Re: Fastest web framework

2012-09-24 Thread Albert Hopkins
On Sun, 2012-09-23 at 12:19 +0300, Andriy Kornatskyy wrote: > I have run recently a benchmark of a trivial 'hello world' application for > various python web frameworks (bottle, django, flask, pyramid, web.py, > wheezy.web) hosted in uWSGI/cpython2.7 and gunicorn/pypy1.9... you might find > it i

Re: Java singletonMap in Python

2012-09-24 Thread Mark Lawrence
On 24/09/2012 20:22, Devin Jeanpierre wrote: On Sun, Sep 23, 2012 at 7:14 PM, Mark Lawrence wrote: Purely for fun I've been porting some code to Python and came across the singletonMap[1]. I'm aware that there are loads of recipes on the web for both singletons e.g.[2] and immutable dictionari

Re: Does python have built command for package skeleton creation?

2012-09-24 Thread Daniel Nogues
alternatively you can use virtualenv to create virtual environments http://www.virtualenv.org/en/latest/index.html however, if what you want is automated generation of some of the code, you can adopt an IDE or create some macros in your text editor of choice. From: alex23 Date: 24 Septem

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

2012-09-24 Thread Gelonida N
Hi, I'm trying to migrate a project with legacy code from 2.6 (with PIL 1.1.6) to 2.7 with (PIL 1.1.7) The SW should run on Windows. PIL fails with an error concering '_imagingft' This seems to be a known issue. http://code.google.com/p/pythonxy/issues/detail?id=300 and the bug was never clo

RE: Fastest web framework

2012-09-24 Thread Andriy Kornatskyy
Try to see 'Hello World' benchmark as an answer to the question how effective is the framework inside... If computer X boots faster than Y, it means it is more effective in this particular area. If a sportsman runs a distance 1 second faster than other, he got a medal (it is not quite adequat

Re: Anyone able to help on installing packages?

2012-09-24 Thread John Mordecai Dildy
Anyone have Ideas on nose and distribute? -- http://mail.python.org/mailman/listinfo/python-list

metaclass question

2012-09-24 Thread Chris Withers
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 'handle_ARecord' name being reused? cheers, Chris -- Simplistix - Conte

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

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

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

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

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

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

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

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
Propaganda over... -- Best Regards, David Hutto CEO: http://www.hitwebdevelopment.com -- http://mail.python.org/mailman/listinfo/python-list

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

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

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

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

  1   2   >