[RELEASED] Python 3.3.0 release candidate 3

2012-09-24 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team, I'm delighted to announce the third release candidate of Python 3.3.0. This is a preview release, and its use is not recommended in production settings. Python 3.3 includes a range of improvements of the 3.x

Re: Editing Inkscape SVG files with Python?

2012-09-24 Thread Matej Cepl
On 24/09/12 00:53, Steven D'Aprano wrote: Googling for python inkscape comes up with too many hits for Inkscape's plugin system to be much help to me. Aside from suggesting lxml, I would ask So why not to follow the stream and create Inkscape plugin? I have in similar situation created a

[RELEASED] Python 3.3.0 release candidate 3

2012-09-24 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team, I'm delighted to announce the third release candidate of Python 3.3.0. This is a preview release, and its use is not recommended in production settings. Python 3.3 includes a range of improvements of the 3.x

RE: Fastest web framework

2012-09-24 Thread Andriy Kornatskyy
David, Thank you for your comments. Please see my response inline to your questions. Well, lets break down timing something in a more scientific method approach through questioning. What's your processor speed? Please see environment specification at the end of post. Here is a copy just in

Re: [RELEASED] Python 3.3.0 release candidate 3

2012-09-24 Thread Paul Rubin
Georg Brandl ge...@python.org writes: Python 3.3 includes a range of improvements of the 3.x series, as well as easier porting between 2.x and 3.x. Major new features and changes in the 3.3 release series are: [good stuff snipped] This is cool, and Python 3 is finally starting to show some

Re: [RELEASED] Python 3.3.0 release candidate 3

2012-09-24 Thread Ramchandra Apte
On Monday, 24 September 2012 12:07:53 UTC+5:30, Paul Rubin wrote: Georg Brandl ge...@python.org writes: Python 3.3 includes a range of improvements of the 3.x series, as well as easier porting between 2.x and 3.x. Major new features and changes in the 3.3 release series are: [good

RE: Fastest web framework

2012-09-24 Thread Andriy Kornatskyy
Alex, Are you on Python Planet? If not, you might want to syndicate your blog there to reach more of the Python web framework crowd. Thank you for your advise. I will send a request for addition to Python Planet. http://feeds.feedburner.com/MindReference Thanks. Andriy

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 PM, Andriy

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

2012-09-24 Thread Joshua Landau
On 24 September 2012 03:42, Terry Reedy tjre...@udel.edu wrote: On 9/23/2012 6:57 PM, Ian Kelly wrote: On Sun, Sep 23, 2012 at 4:24 PM, Joshua Landau joshua.landau...@gmail.com wrote: The docs describe identifiers to have this grammar: identifier ::= xid_start xid_continue* id_start

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:

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

Re: Pass numeric arrays from C extensions to Python

2012-09-24 Thread Grant Edwards
On 2012-09-24, JBT jianbao@gmail.com 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,

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

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 the

Re: Exact integer-valued floats

2012-09-24 Thread wrw
On Sep 22, 2012, at 7:06 PM, Dave Angel d...@davea.name wrote: On 09/22/2012 05:05 PM, Tim Roberts wrote: Dennis Lee Bieber wlfr...@ix.netcom.com 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

Re: Java singletonMap in Python

2012-09-24 Thread Duncan Booth
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info 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: 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/mywiki/PythonPaste for example

Re: Java singletonMap in Python

2012-09-24 Thread 88888 Dihedral
Duncan Booth於 2012年9月25日星期二UTC+8上午1時33分31秒寫道: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info 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

Re: Java singletonMap in Python

2012-09-24 Thread Devin Jeanpierre
On Sun, Sep 23, 2012 at 7:14 PM, Mark Lawrence breamore...@yahoo.co.uk 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

Re: Java singletonMap in Python

2012-09-24 Thread Mark Lawrence
On 24/09/2012 18:33, Duncan Booth wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info 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: 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

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 breamore...@yahoo.co.uk 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: 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

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

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

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 -

Re: metaclass question

2012-09-24 Thread Ian Kelly
On Mon, Sep 24, 2012 at 11:43 AM, Chris Withers ch...@simplistix.co.uk 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

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 ty...@tysdomain.com 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,

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 ty...@tysdomain.com 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,

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 flags

Re: A little morning puzzle

2012-09-24 Thread Dwight Hutto
Ergo: 'enumerate(some_list)' 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

Re: Anyone able to help on installing packages?

2012-09-24 Thread Oscar Benjamin
On 24 September 2012 21:27, John Mordecai Dildy jdild...@gmail.com 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

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

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

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 dwightdhu...@gmail.com 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,

Re: python file API

2012-09-24 Thread Oscar Benjamin
On 24 September 2012 22:35, zipher dreamingforw...@gmail.com wrote: For some time now, I've wanted to suggest a better abstraction for the file 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

Re: python file API

2012-09-24 Thread Chris Kaynor
On Mon, Sep 24, 2012 at 2:49 PM, Dave Angel d...@davea.name 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

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 -

Re: A little morning puzzle

2012-09-24 Thread Dwight Hutto
On Mon, Sep 24, 2012 at 5:18 PM, Ethan Furman et...@stoneleaf.us wrote: Ian Kelly wrote: On Sat, Sep 22, 2012 at 9:44 PM, Dwight Hutto dwightdhu...@gmail.com 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

Re: python file API

2012-09-24 Thread Chris Angelico
On Tue, Sep 25, 2012 at 7:49 AM, Dave Angel d...@davea.name 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

Re: keeping information about players around

2012-09-24 Thread Chris Angelico
On Tue, Sep 25, 2012 at 7:14 AM, Dwight Hutto dwightdhu...@gmail.com 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

Re: For Counter Variable

2012-09-24 Thread Dwight Hutto
On Mon, Sep 24, 2012 at 6:09 PM, Ethan Furman et...@stoneleaf.us 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

Re: keeping information about players around

2012-09-24 Thread Dwight Hutto
On Mon, Sep 24, 2012 at 6:19 PM, Chris Angelico ros...@gmail.com wrote: On Tue, Sep 25, 2012 at 7:14 AM, Dwight Hutto dwightdhu...@gmail.com 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

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

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 d...@davea.name wrote: On 09/24/2012 05:35 PM, zipher wrote: For some time now, I've wanted to suggest a better abstraction for the file type in Python. It currently uses an

Re: python file API

2012-09-24 Thread Ian Kelly
On Mon, Sep 24, 2012 at 4:14 PM, Chris Angelico ros...@gmail.com 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

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 needs

Re: For Counter Variable

2012-09-24 Thread Joshua Landau
On 24 September 2012 23:26, Dwight Hutto dwightdhu...@gmail.com wrote: On Mon, Sep 24, 2012 at 6:09 PM, Ethan Furman et...@stoneleaf.us 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

Re: keeping information about players around

2012-09-24 Thread Chris Angelico
On Tue, Sep 25, 2012 at 8:31 AM, Dwight Hutto dwightdhu...@gmail.com 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

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 dreamingforw...@gmail.com 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

Re: A little morning puzzle

2012-09-24 Thread Ian Kelly
On Mon, Sep 24, 2012 at 4:07 PM, Dwight Hutto dwightdhu...@gmail.com 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

Re: python file API

2012-09-24 Thread Chris Angelico
On Tue, Sep 25, 2012 at 8:37 AM, Ian Kelly ian.g.ke...@gmail.com wrote: On Mon, Sep 24, 2012 at 4:14 PM, Chris Angelico ros...@gmail.com 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

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

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 ian.g.ke...@gmail.com wrote: On Mon, Sep 24, 2012 at 4:14 PM, Chris Angelico ros...@gmail.com 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

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

Re: keeping information about players around

2012-09-24 Thread alex23
On Sep 25, 8:32 am, Dwight Hutto dwightdhu...@gmail.com 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,

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 gelon...@gmail.com 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:

Re: For Counter Variable

2012-09-24 Thread alex23
On Sep 25, 8:58 am, Dwight Hutto dwightdhu...@gmail.com 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

Re: keeping information about players around

2012-09-24 Thread Dwight Hutto
On Mon, Sep 24, 2012 at 7:28 PM, alex23 wuwe...@gmail.com wrote: On Sep 25, 8:32 am, Dwight Hutto dwightdhu...@gmail.com 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:

Re: For Counter Variable

2012-09-24 Thread Dwight Hutto
On Sep 25, 8:26 am, Dwight Hutto dwightdhu...@gmail.com 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

Re: For Counter Variable

2012-09-24 Thread alex23
On Sep 25, 9:39 am, Dwight Hutto dwightdhu...@gmail.com 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

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

Re: which a is used?

2012-09-24 Thread Dwight Hutto
On Mon, Sep 24, 2012 at 7:43 PM, Jayden jayden.s...@gmail.com 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

Re: keeping information about players around

2012-09-24 Thread alex23
On Sep 25, 9:44 am, Dwight Hutto dwightdhu...@gmail.com 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

Re: For Counter Variable

2012-09-24 Thread alex23
On Sep 25, 9:49 am, Dwight Hutto dwightdhu...@gmail.com 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

Re: which a is used?

2012-09-24 Thread Dwight Hutto
On Mon, Sep 24, 2012 at 7:57 PM, Dwight Hutto dwightdhu...@gmail.com wrote: On Mon, Sep 24, 2012 at 7:43 PM, Jayden jayden.s...@gmail.com 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()

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

Re: which a is used?

2012-09-24 Thread alex23
On Sep 25, 9:43 am, Jayden jayden.s...@gmail.com 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'

Re: For Counter Variable

2012-09-24 Thread alex23
On Sep 25, 10:18 am, Dwight Hutto dwightdhu...@gmail.com 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

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 wuwe...@gmail.com wrote: On Sep 25, 9:44 am, Dwight Hutto dwightdhu...@gmail.com 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_

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 gelon...@gmail.com 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 dwightdhu...@gmail.com 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

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

Re: For Counter Variable

2012-09-24 Thread Dwight Hutto
On Mon, Sep 24, 2012 at 8:32 PM, Littlefield, Tyler ty...@tysdomain.com 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.

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

Re: For Counter Variable

2012-09-24 Thread Paul Rubin
alex23 wuwe...@gmail.com 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 expecting dynamic

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

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

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 gelon...@gmail.com 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,

Re: which a is used?

2012-09-24 Thread Dwight Hutto
On Mon, Sep 24, 2012 at 9:18 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info 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 no.email@nospam.invalid def g(): a = 20 f()

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 gelon...@gmail.com 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

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 acl...@aclark.net 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. --

  1   2   3   >