Re: interfacing with x86_64 assembler

2012-09-01 Thread Ramchandra Apte
On Friday, 31 August 2012 19:28:11 UTC+5:30, Grant Edwards wrote: On 2012-08-31, Mark Lawrence breamore...@yahoo.co.uk wrote: On 31/08/2012 14:40, lipska the kat wrote: I was hacking away at some x86_64 assembler today when I found myself obsessively indenting my code by

Re: PipeController v0.1 - experimental tool to simulate simple UNIX-style pipes in Python

2012-09-01 Thread Ramchandra Apte
On Friday, 31 August 2012 03:27:54 UTC+5:30, vasudevram wrote: I wrote PipeController recently to experiment with doing UNIX-style pipes in Python. Blog post about it: http://jugad2.blogspot.in/2012/08/pipecontroller-v01-released-simulating.html The blog post has a link to

Re: Accessing AST at runtime

2012-09-01 Thread Ramchandra Apte
On Sunday, 2 September 2012 08:00:59 UTC+5:30, (unknown) wrote: Hi, I would like to access the AST of a python object at runtime. I mean, if I have this: def f(x): return x*x/2 Is there any way to interrogate the object f to find out the AST of the expression x*x/2 ? Of

Re: interfacing with x86_64 assembler

2012-09-01 Thread Ramchandra Apte
On Sunday, 2 September 2012 06:06:06 UTC+5:30, Chris Angelico wrote: On Sun, Sep 2, 2012 at 10:10 AM, John Ladasky john_lada...@sbcglobal.net wrote: I haven't seen this joke on the Net in years, does anyone still remember it? C combines the power of assembly language with the

Re: py2c - an open source Python to C/C++ is looking for developers

2012-09-01 Thread Ramchandra Apte
On Tuesday, 31 July 2012 18:16:27 UTC+5:30, Stefan Behnel wrote: Stefan Behnel, 31.07.2012 07:23: From a look at the source code, it seems hard to bring it together with anything. It looks very monolithic. Hmm, sorry, I mixed it up with 2c.py, which is yet another of those

Re: py2c - an open source Python to C/C++ is looking for developers

2012-09-02 Thread Ramchandra Apte
That's reason enough for it. Do you plan to port all the standard python modules as well, though? Well, it should be quite easy because most of the _modules are either C accelerator (which there is no need to port) or a C wrapper (which should be trivial to port) --

Re: py2c - an open source Python to C/C++ is looking for developers

2012-09-02 Thread Ramchandra Apte
On Sunday, 2 September 2012 11:18:38 UTC+5:30, Michael Torrie wrote: On 09/01/2012 09:15 PM, Ramchandra Apte wrote: It converts to *pure* C/C++ *without* using Python or its API so that it can be the same speed as C/C++ Sounds like a fun project for you. I hope you learn a lot

Re: py2c - an open source Python to C/C++ is looking for developers

2012-09-02 Thread Ramchandra Apte
On Sunday, 2 September 2012 12:53:35 UTC+5:30, Serhiy Storchaka wrote: On 02.09.12 06:15, Ramchandra Apte wrote: It converts to *pure* C/C++ *without* using Python or its API so that it can be the same speed as C/C++ How is it implemented long integers? py2c has been just started

Re: Flexible string representation, unicode, typography, ...

2012-09-02 Thread Ramchandra Apte
On Sunday, 2 September 2012 17:53:16 UTC+5:30, Mark Lawrence wrote: On 02/09/2012 13:00, Serhiy Storchaka wrote: On 02.09.12 12:52, Peter Otten wrote: Ian Kelly wrote: Rewriting the example to use locale.strcoll instead: sorted(li,

Re: python docs search for 'print'

2012-09-04 Thread Ramchandra Apte
On Tuesday, 4 September 2012 23:29:26 UTC+5:30, David Hoese wrote: A friend made me aware of this: When a python beginner (2.x) quick searches for print on docs.python.org, the print function doesn't even come up in the top 20 results. The print statement isn't even listed as far as

Re: sockets,threads and interupts

2012-09-04 Thread Ramchandra Apte
On Tuesday, 4 September 2012 23:41:13 UTC+5:30, Grant Edwards wrote: On 2012-09-04, MRAB pyt...@mrabarnett.plus.com wrote: On 04/09/2012 16:26, loial wrote: I have threaded python script that uses sockets to monitor network ports. I want to ensure that the socket is closed

Re: Error 32 - Broken Pipe . Please Help!!

2012-09-04 Thread Ramchandra Apte
On Tuesday, 4 September 2012 22:38:03 UTC+5:30, Sreenath k wrote: Error: Exception in thread Thread-1: Traceback (most recent call last): File /usr/lib/python2.7/threading.py, line 551, in __bootstrap_inner self.run() File

Re: python docs search for 'print'

2012-09-04 Thread Ramchandra Apte
On Wednesday, 5 September 2012 09:35:43 UTC+5:30, Terry Reedy wrote: On 9/4/2012 11:22 PM, Ramchandra Apte wrote: I was actually planning to write a bug on this. If you do, find the right place to submit it. bugs.python.org is for issues relating to the cpython repository

Re: python docs search for 'print'

2012-09-05 Thread Ramchandra Apte
On Wednesday, 5 September 2012 15:03:56 UTC+5:30, Terry Reedy wrote: On 9/5/2012 1:22 AM, Ramchandra Apte wrote: On Wednesday, 5 September 2012 09:35:43 UTC+5:30, Terry Reedy wrote: If you do find the right place, you should contribute something to an improvement. The current

Re: is implemented with id ?

2012-09-05 Thread Ramchandra Apte
On Wednesday, 5 September 2012 14:44:23 UTC+5:30, Steven D'Aprano wrote: On Wed, 05 Sep 2012 08:30:31 +0200, Franck Ditter wrote: Hi ! a is b == id(a) == id(b) in builtin classes. Is that true ? Not just for builtin classes, for any objects, provided that they are Seeing

Re: why did the WindowsError occur?

2012-09-05 Thread Ramchandra Apte
On Wednesday, 5 September 2012 13:21:58 UTC+5:30, Mark Lawrence wrote: On 05/09/2012 07:30, Levi Nie wrote: my code: import os os.startfile(r'C:\Program Files\Internet Explorer.exe') the error: os.startfile(r'C:\Program Files\Internet Explorer.exe') WindowsError:

Re: sockets,threads and interupts

2012-09-05 Thread Ramchandra Apte
On Wednesday, 5 September 2012 11:26:16 UTC+5:30, Dieter Maurer wrote: loial jldunn2...@gmail.com writes: I have threaded python script that uses sockets to monitor network ports. I want to ensure that the socket is closed cleanly in all circumstances. This includes if the

Re: Is there a way to configure IDLE to use spaces instead of tabs for indenting?

2012-09-05 Thread Ramchandra Apte
On Saturday, 25 August 2012 04:03:52 UTC+5:30, Alex wrote: I'm new to Python and have been using IDLE 3.2.3 to experiment with code as I learn. Despite being configured to use a 4 space indentation width, sometimes IDLE's smart indentation insists upon using width-8 tabs. From

Re: simple client data base

2012-09-05 Thread Ramchandra Apte
On Monday, 3 September 2012 19:42:21 UTC+5:30, Manatee wrote: Hello all, I am learning to program in python. I have a need to make a program that can store, retrieve, add, and delete client data such as name, address, social, telephone number and similar information. This would be a

Re: Extract Text Table From File

2012-09-05 Thread Ramchandra Apte
On Monday, 27 August 2012 15:42:14 UTC+5:30, Laszlo Nagy wrote: On 2012-08-27 11:53, Huso wrote: Hi, I am trying to extract some text table data from a log file. I am trying different methods, but I don't seem to get anything to work. I am kind of new to python as well. Hence,

Re: sockets,threads and interupts

2012-09-05 Thread Ramchandra Apte
On Wednesday, 5 September 2012 18:34:32 UTC+5:30, Chris Angelico wrote: On Wed, Sep 5, 2012 at 10:54 PM, Ramchandra Apte maniandra...@gmail.com wrote: At least on Linux, if you kill a process using sockets, it takes about 10 seconds for socket to be closed. A program should try to close

Re: sockets,threads and interupts

2012-09-05 Thread Ramchandra Apte
On Wednesday, 5 September 2012 21:29:12 UTC+5:30, Ramchandra Apte wrote: On Wednesday, 5 September 2012 18:34:32 UTC+5:30, Chris Angelico wrote: On Wed, Sep 5, 2012 at 10:54 PM, Ramchandra Apte maniandra...@gmail.com wrote: At least on Linux, if you kill a process using sockets

Re: is implemented with id ?

2012-09-06 Thread Ramchandra Apte
On Thursday, 6 September 2012 12:14:19 UTC+5:30, Steven D'Aprano wrote: On Wed, 05 Sep 2012 14:27:44 -0400, Terry Reedy wrote: On 9/5/2012 8:48 AM, Ramchandra Apte wrote: and a==True should be automatically changed into memory comparison. I have no idea what

Re: python docs search for 'print'

2012-09-06 Thread Ramchandra Apte
On Thursday, 6 September 2012 01:54:45 UTC+5:30, Walter Hurry wrote: On Wed, 05 Sep 2012 15:03:16 -0400, Terry Reedy wrote: On 9/5/2012 8:45 AM, Ramchandra Apte wrote: snip These ever increasing extra blank lines with each quote are obnoxious. Consider using a news reader

Re: is implemented with id ?

2012-09-06 Thread Ramchandra Apte
On Wednesday, 5 September 2012 19:43:30 UTC+5:30, Steven D'Aprano wrote: On Wed, 05 Sep 2012 05:48:26 -0700, Ramchandra Apte wrote: Seeing this thread, I think the is statment should be removed. It has a replacement syntax of id(x) == id(y) A terrible idea. Because

Re: Language workbench written in python3

2012-09-06 Thread Ramchandra Apte
On Thursday, 6 September 2012 02:34:17 UTC+5:30, Nestor Arocha wrote: I'm developing a language workbench written in Python. The idea is to create an environment where grammars and translators can interact easily. https://github.com/nesaro/pydsl any comments, feedback or ideas?

Re: is implemented with id ?

2012-09-06 Thread Ramchandra Apte
, Ramchandra Apte wrote: and a==True should be automatically changed into memory comparison. I have no idea what that means. I interpret this as meaning that a == True should be special-cased by the interpreter as a is True instead of calling a.__eq__. That would

Re: ===== Soft Skills Training In Chennai ======

2012-09-06 Thread Ramchandra Apte
On Thursday, 6 September 2012 11:26:21 UTC+5:30, mike pittenson wrote: Ayus Technologies offers Dot net training in chennai,java/j2ee training in chennai,SEO training in chennai,web designing training in chennai,soft skills training in chennai,Software Testing training in chennai.

Re: Language workbench written in python3

2012-09-06 Thread Ramchandra Apte
On Thursday, 6 September 2012 19:16:38 UTC+5:30, Dave Angel wrote: On 09/06/2012 09:34 AM, Ramchandra Apte wrote: Translator means what precisely? Examples of translators include compilers, assemblers, and interpreters. They also include implementations like cfront, which

Re: Is there a way to configure IDLE to use spaces instead of tabs for indenting?

2012-09-06 Thread Ramchandra Apte
On Thursday, 6 September 2012 19:13:23 UTC+5:30, Alex wrote: Ramchandra Apte wrote: On Saturday, 25 August 2012 04:03:52 UTC+5:30, Alex wrote: I'm new to Python and have been using IDLE 3.2.3 to experiment with code as I learn. Despite being configured to use a 4 space

Re: Language workbench written in python3

2012-09-08 Thread Ramchandra Apte
On Friday, 7 September 2012 01:18:45 UTC+5:30, Nestor Arocha wrote: On Thursday, September 6, 2012 2:53:15 PM UTC+1, Ramchandra Apte wrote: On Thursday, 6 September 2012 19:16:38 UTC+5:30, Dave Angel wrote: On 09/06/2012 09:34 AM, Ramchandra Apte wrote

Re: Looking for an IPC solution

2012-09-08 Thread Ramchandra Apte
On Friday, 7 September 2012 02:25:15 UTC+5:30, Dave Angel wrote: On 09/06/2012 04:33 PM, Dennis Lee Bieber wrote: snip Note that this difference mainly applies to how the processes are themselves are created... How the library wraps shared data is possibly different (I've

Re: Compile python code into a dll

2012-09-10 Thread Ramchandra Apte
On Monday, 10 September 2012 17:45:11 UTC+5:30, Rolf Wester wrote: Hi, I have Python code that I would like to compile into a dll (I have to deliver a C/C++ callable dll and I don't want to reimpelement the Python code in C/C++). It's not for extending Python but I want to call

Re: SAP MM Cupertino, CA

2012-09-10 Thread Ramchandra Apte
On Monday, 10 September 2012 18:51:10 UTC+5:30, Suresh Kumar wrote: Hi, This is Girish, - IT Recruiter from SancroSoft USA Inc. Please respond with updated resume in MS-Word .doc Format with the following details to gir...@sancrosoftusa.com Full Name : Location :

Re: generators as decorators simple issue

2012-09-11 Thread Ramchandra Apte
On Wednesday, 12 September 2012 07:58:10 UTC+5:30, pyjoshsys wrote: I'm trying to call SetName on an object to prevent me from ever having to call it explictly again on that object. Best explained by example. [snip] In your decorator, you are using `yield cls` - it should be `return cls`

Re: Which Version of Python?

2012-09-11 Thread Ramchandra Apte
On Tuesday, 11 September 2012 22:19:08 UTC+5:30, Charles Hottel wrote: I have a lot of programming experience in many different languages and now I want to learn Python. Which version do you suggest I download, Python 2.x or Python 3.x ? Also why should I prefer one over the other?

Re: python CAD libraries?

2012-09-11 Thread Ramchandra Apte
On Tuesday, 11 September 2012 02:40:55 UTC+5:30, Jayden wrote: Are there any python CAD libraries that can (1) build simple 3D primitives solids such as spheres, cylinders and so on (2) perform bool operations on 3D solids (3) better if it has some transformations such has scaling,

Re: Which Version of Python?

2012-09-12 Thread Ramchandra Apte
On Wednesday, 12 September 2012 14:04:56 UTC+5:30, alex23 wrote: On 12 Sep, 16:31, Mark Lawrence breamore...@yahoo.co.uk wrote: Perhaps this will sway youhttp://docs.python.org/dev/whatsnew/3.3.html There is no longer an equivalent document for the Python 1.x or 2.x series of

Re: Which Version of Python?

2012-09-12 Thread Ramchandra Apte
On Wednesday, 12 September 2012 14:11:56 UTC+5:30, Ramchandra Apte wrote: On Wednesday, 12 September 2012 14:04:56 UTC+5:30, alex23 wrote: On 12 Sep, 16:31, Mark Lawrence breamore...@yahoo.co.uk wrote: Perhaps this will sway youhttp://docs.python.org/dev/whatsnew/3.3.html

Re: avoid the redefinition of a function

2012-09-12 Thread Ramchandra Apte
On Wednesday, 12 September 2012 18:26:36 UTC+5:30, Jabba Laci wrote: Hi, I have an installer script that contains lots of little functions. It has an interactive menu and the corresponding function is called. Over time it grew long and when I want to add a new function, I should

Re: python2.7 lack necessary bit to build module

2012-09-13 Thread Ramchandra Apte
On Thursday, 13 September 2012 14:17:29 UTC+5:30, 钟驰宇 wrote: I'm in ubuntu10.04 and I decide to compile python2.7 from source myself to build a GAE app.As a result,when I done with make command,it comes out with the following warning: Python build finished, but the necessary bits to build

Re: How to limit CPU usage in Python

2012-09-21 Thread Ramchandra Apte
you On Saturday, 22 September 2012 05:14:15 UTC+5:30, Cameron Simpson wrote: On 20Sep2012 12:53, Terry Reedy tjre...@udel.edu wrote: | On 9/20/2012 12:46 PM, Terry Reedy wrote: | On 9/20/2012 11:12 AM, Rolando Cañer Roblejo wrote: | Is it possible for me to put a limit in the amount

Re: Python 3.3 and .pyo files

2012-09-22 Thread Ramchandra Apte
On Saturday, 22 September 2012 18:51:01 UTC+5:30, Steven D'Aprano wrote: On Fri, 21 Sep 2012 22:46:08 -0400, Terry Reedy wrote: On 9/21/2012 5:10 AM, Marco wrote: I was trying to import a pyo module in Python 3.3, but Python does not find it: You appear to be trying to

Re: portable way of locating an executable (like which)

2012-09-22 Thread Ramchandra Apte
On Friday, 21 September 2012 02:37:01 UTC+5:30, gelonida wrote: I'd like to implement the equivalent functionality of the unix command /usr/bin/which The function should work under Linux and under windows. Did anybody already implement such a function. If not, is there a

Re: Functional way to compare things inside a list

2012-09-22 Thread Ramchandra Apte
On Saturday, 22 September 2012 12:50:08 UTC+5:30, Andrew Berg wrote: On 2012.09.22 02:08, Jamie Paul Griffin wrote: I find this intriguing, I had no idea bots existed to post to mailing lists in this way. What's the point of them? To amuse their owners is my guess. --

Re: Seome kind of unblocking input

2012-09-23 Thread Ramchandra Apte
On Saturday, 22 September 2012 01:24:46 UTC+5:30, Dennis Lee Bieber wrote: On Fri, 21 Sep 2012 02:13:28 -0700 (PDT), janis.judvai...@gmail.com declaimed the following in gmane.comp.python.general: Since I'm using threads and pipes everything works ok, except that when i call

Re: Client Needs---QA Manual Tester at Sacramento, CA

2012-09-23 Thread Ramchandra Apte
On Saturday, 22 September 2012 04:09:55 UTC+5:30, ram dev wrote: Good Day, We have an urgent Contract Openings in Folsom, CA Looking forward to submit your resume for below mentioned Requirement… If you are interested, Please forward your latest resume along with location and pay

Re: Seome kind of unblocking input

2012-09-23 Thread Ramchandra Apte
On Sunday, 23 September 2012 23:20:37 UTC+5:30, Dennis Lee Bieber wrote: On Sun, 23 Sep 2012 18:13:57 +0100, Mark Lawrence breamore...@yahoo.co.uk declaimed the following in gmane.comp.python.general: On 23/09/2012 16:49, Ramchandra Apte wrote: You can clear the buffer

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

2012-09-23 Thread Ramchandra Apte
On Monday, 24 September 2012 09:59:12 UTC+5:30, Terry Reedy wrote: On 9/23/2012 11:59 PM, alex23 wrote: On Sep 21, 10:14 pm, xliiv tymoteusz.jankow...@gmail.com wrote: On Friday, September 21, 2012 1:08:23 PM UTC+2, Tarek Ziadé wrote: Python Paste is probably what you are looking for

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: Who's laughing at my responses, and who's not?

2012-09-25 Thread Ramchandra Apte
On Tuesday, 25 September 2012 10:40:02 UTC+5:30, Terry Reedy wrote: 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

Re: Article on the future of Python

2012-09-26 Thread Ramchandra Apte
On Tuesday, 25 September 2012 21:05:01 UTC+5:30, Steven D'Aprano wrote: On Tue, 25 Sep 2012 09:26:19 -0400, Kevin Walzer wrote: On 9/25/12 4:15 AM, Mark Lawrence wrote: Hi all, I though this might be of interest.

Re: [python-list] python application file format

2012-09-26 Thread Ramchandra Apte
On Wednesday, 26 September 2012 18:29:14 UTC+5:30, Benjamin Jessup wrote: Hello all, What do people recommend for a file format for a python desktop application? Data is complex with 100s/1000s of class instances, which reference each other. Write the file with struct

Re: new-style class or old-style class?

2012-09-26 Thread Ramchandra Apte
On Tuesday, 25 September 2012 20:14:05 UTC+5:30, Jayden wrote: In learning Python, I found there are two types of classes? Which one are widely used in new Python code? Is the new-style much better than old-style? Thanks!! Next time just Google your questions. :-) Good luck with Python --

Re: [Python-Dev] [RELEASED] Python 3.3.0

2012-09-29 Thread Ramchandra Apte
On Saturday, 29 September 2012 18:55:36 UTC+5:30, eliben wrote: On Sat, Sep 29, 2012 at 5:18 AM, Georg Brandl ge...@python.org wrote: On behalf of the Python development team, I'm delighted to announce the Python 3.3.0 final release. Yay :) +1 --

Re: Should one always add super().__init__() to the __init__?

2012-09-29 Thread Ramchandra Apte
On Saturday, 29 September 2012 18:57:48 UTC+5:30, Ramchandra Apte wrote: Should one always add super().__init__() to the __init__? The reason for this is the possibility of changing base classes (and forgetting to update the __init__). This is my first post so I may be breaching nettique

Should one always add super().__init__() to the __init__?

2012-09-29 Thread Ramchandra Apte
Should one always add super().__init__() to the __init__? The reason for this is the possibility of changing base classes (and forgetting to update the __init__). -- http://mail.python.org/mailman/listinfo/python-list

Re: [python-list] python application file format

2012-09-29 Thread Ramchandra Apte
On Saturday, 29 September 2012 02:05:07 UTC+5:30, Prasad, Ramit wrote: Benjamin Jessup wrote: Hello all, What do people recommend for a file format for a python desktop application? Data is complex with 100s/1000s of class instances, which reference each other.

Re: For Counter Variable

2012-09-29 Thread Ramchandra Apte
On Tuesday, 25 September 2012 05:48:22 UTC+5:30, David 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

Re: [RELEASED] Python 3.3.0

2012-09-29 Thread Ramchandra Apte
On Saturday, 29 September 2012 19:08:25 UTC+5:30, Stefan Behnel wrote: Georg Brandl, 29.09.2012 14:18: On behalf of the Python development team, I'm delighted to announce the Python 3.3.0 final release. [...] * PEP 380, syntax for delegating to a subgenerator (yield from)

Re: using * to make a list of lists with repeated (and independent) elements

2012-09-29 Thread Ramchandra Apte
On Thursday, 27 September 2012 04:14:42 UTC+5:30, Tim Chase wrote: On 09/26/12 17:28, 8 Dihedral wrote: 8 Dihedral於 2012年9月27日星期四UTC+8上午6時07分35秒寫道: In these conditions, how to make this list [[0,0,0],[0,0,0]] with * without this behavior? a = [[0]*3 for i in

Re: How to investigate web script not running?

2012-09-29 Thread Ramchandra Apte
On Friday, 28 September 2012 18:45:41 UTC+5:30, Gilles wrote: On Fri, 28 Sep 2012 14:16:22 +0200, Michael Ross g...@ross.cx wrote: Do it the other way around: # cgitb before anything else import cgitb cgitb.enable() # so this error will be caught from fcgi import

Re: Should one always add super().__init__() to the __init__?

2012-09-29 Thread Ramchandra Apte
On Saturday, 29 September 2012 22:47:20 UTC+5:30, Steven D'Aprano wrote: On Sat, 29 Sep 2012 06:27:47 -0700, Ramchandra Apte wrote: Should one always add super().__init__() to the __init__? The reason for this is the possibility of changing base classes (and forgetting to update

Re: Should one always add super().__init__() to the __init__?

2012-09-29 Thread Ramchandra Apte
On Sunday, 30 September 2012 09:53:45 UTC+5:30, Steven D'Aprano wrote: On Sat, 29 Sep 2012 20:14:10 -0700, Ramchandra Apte wrote: I forgot something: I meant super().__init__() or similar What about it? Please try to remember that we can't read your mind and don't know

Re: python file API

2012-09-30 Thread Ramchandra Apte
On Tuesday, 25 September 2012 03:05:16 UTC+5:30, 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

Re: Slicing iterables in sub-generators without loosing elements

2012-10-02 Thread Ramchandra Apte
On Monday, 1 October 2012 13:47:50 UTC+5:30, Mark Lawrence wrote: On 01/10/2012 01:58, 8 Dihedral wrote: Your question seems vague to me. If you know you are storing only immutable tuples in a list, then the way to iterate is simple. Does Python have a magic method

Re: parse an environment file

2012-10-02 Thread Ramchandra Apte
On Tuesday, 2 October 2012 21:34:04 UTC+5:30, xDog Walker wrote: On Monday 2012 October 01 08:35, Hans Mulder wrote: AFAIK, there is no Python module that can read shell syntax. The stdlib's shlex might be that module. -- Yonder nor sorghum stenches shut ladle gulls stopper

Re: How to apply the user's HTML environment in a Python programme?

2012-10-02 Thread Ramchandra Apte
On Monday, 1 October 2012 19:49:27 UTC+5:30, BobAalsma wrote: Op vrijdag 21 september 2012 16:15:30 UTC+2 schreef Joel Goldstick het volgende: On Fri, Sep 21, 2012 at 9:58 AM, BobAalsma wrote: Op vrijdag 21 september 2012 15:36:11 UTC+2 schreef Jerry Hill het volgende:

Re: Slicing iterables in sub-generators without loosing elements

2012-10-02 Thread Ramchandra Apte
On Tuesday, 2 October 2012 22:13:20 UTC+5:30, Mark Lawrence wrote: On 02/10/2012 17:12, Ramchandra Apte wrote: On Monday, 1 October 2012 13:47:50 UTC+5:30, Mark Lawrence wrote: On 01/10/2012 01:58, 8 Dihedral wrote: Your question seems vague to me. If you know you

Re: final question: logging to stdout and updating files

2012-10-04 Thread Ramchandra Apte
On Thursday, 4 October 2012 08:41:35 UTC+5:30, Littlefield, Tyler wrote: pHello all: I've seen frameworks like django reload files when it detects that they've been changed; how hard would it be to make my engine reload files that it detects were changed? I'm also curious how hard it

Re: How to print html in python the normal way

2012-10-04 Thread Ramchandra Apte
On Thursday, 4 October 2012 17:00:57 UTC+5:30, Chris Angelico wrote: On Thu, Oct 4, 2012 at 9:24 PM, ashishjain@gmail.com wrote: am I missing something. The first thing you're missing is more detail in your question. My crystal ball tells me you're using some kind of web

Re: design question:game skill system

2012-10-04 Thread Ramchandra Apte
On Wednesday, 3 October 2012 14:19:57 UTC+5:30, Jean-Michel Pichavant wrote: - Original Message - Hello all: I'm looking at a skill/perk system, where the player builds up his char by using perk points to add abilities. Each perk is under a category, and generally

Re: final question: logging to stdout and updating files

2012-10-04 Thread Ramchandra Apte
even if it causes bugs - Ramchandra Apte, 2001- -- http://mail.python.org/mailman/listinfo/python-list

Re: notmm is dead!

2012-10-05 Thread Ramchandra Apte
On Thursday, 4 October 2012 23:40:47 UTC+5:30, Etienne Robillard wrote: Dear list, Due to lack of energy and resources i'm really sad to announce the removal of notmm from pypi and bitbucket. I deleted also my account from bitbucket as it was not really useful for me. notmm will

Re: sum function

2012-10-05 Thread Ramchandra Apte
On Friday, 5 October 2012 07:31:24 UTC+5:30, Mike wrote: I agree with you, Ian. Thanks for all the help. Now I get the below error. File test.py, line 17, in module total = sum(float(col.value) for r in iter(next_r, None) for col in r[0].columns.itervalues()) File

Re: When was the last time you did something for the first time?

2012-10-05 Thread Ramchandra Apte
On Friday, 5 October 2012 16:33:52 UTC+5:30, The Matchmaker wrote: What do you want to talk about today? Nothing. -- http://mail.python.org/mailman/listinfo/python-list

Re: final question: logging to stdout and updating files

2012-10-05 Thread Ramchandra Apte
On Thursday, 4 October 2012 19:30:26 UTC+5:30, Steven D'Aprano wrote: On Thu, 04 Oct 2012 06:34:28 -0700, Ramchandra Apte wrote: Optimize code always even if it causes bugs - Ramchandra Apte, 2001- Well, you've just added yourself into my list of people whose advice should

Re: sum function

2012-10-05 Thread Ramchandra Apte
On Friday, 5 October 2012 19:09:15 UTC+5:30, Mike wrote: On Thursday, October 4, 2012 4:52:50 PM UTC-4, Mike wrote: Hi All, I am new to python and am getting the data from hbase. I am trying to do sum on the column as below scanner =

Re: notmm is dead!

2012-10-05 Thread Ramchandra Apte
On Saturday, 6 October 2012 08:29:02 UTC+5:30, Michael Torrie wrote: On 10/05/2012 07:43 PM, 8 Dihedral wrote: I think it is OK to have some string attatched in those open source projects. What are you talking about? What string? Nowadays the software industry is just

Re: Executing untrusted scripts in a sandboxed environment

2012-10-06 Thread Ramchandra Apte
On Saturday, 6 October 2012 04:00:08 UTC+5:30, Robin Krahl wrote: Hi all, I need to execute untrusted scripts in my Python application. To avoid security issues, I want to use a sandboxed environment. This means that the script authors have no access to the file system. They may only

Re: Executing untrusted scripts in a sandboxed environment

2012-10-06 Thread Ramchandra Apte
On Saturday, 6 October 2012 12:49:29 UTC+5:30, Chris Angelico wrote: On Sat, Oct 6, 2012 at 8:22 AM, Robin Krahl m...@robin-krahl.de wrote: Hi all, I need to execute untrusted scripts in my Python application. To avoid security issues, I want to use a sandboxed environment. This

Re: sum function

2012-10-06 Thread Ramchandra Apte
On Saturday, 6 October 2012 02:09:56 UTC+5:30, Dave Angel wrote: On 10/05/2012 04:09 PM, Mike wrote: Terry, I am not using the mail client. I am just posting on the site. And which site would that be (that you're using)? There are a few. I'm guessing you use

Re: try/except KeyError vs if name in ...

2012-10-06 Thread Ramchandra Apte
On Sunday, 7 October 2012 01:12:56 UTC+5:30, Terry Reedy wrote: On 10/6/2012 7:36 AM, Dave Angel wrote: The distinction in performance between the success and failure modes of the try/catch isn't nearly as large as one of the other responses might lead you to believe. For

Re: I am just trying to find out if there is any relevant/current research in the production of a generic quality assurance tool for my PhD.

2012-10-06 Thread Ramchandra Apte
On Sunday, 7 October 2012 00:13:58 UTC+5:30, Darryl Owens wrote: I am currently starting my PhD in software quality assurance and have been doing a lot of reading round this subject. I am just trying to find out if there is any relevant/current research in the production of a generic quality

Re: I am just trying to find out if there is any relevant/current research in the production of a generic quality assurance tool for my PhD.

2012-10-06 Thread Ramchandra Apte
On Sunday, 7 October 2012 10:32:45 UTC+5:30, rusi wrote: On Oct 7, 9:15 am, Ramchandra Apte maniandra...@gmail.com wrote: On Sunday, 7 October 2012 00:13:58 UTC+5:30, Darryl Owens  wrote: I am currently starting my PhD in software quality assurance and have been doing a lot

Re: Private methods

2012-10-10 Thread Ramchandra Apte
On Wednesday, 10 October 2012 18:38:04 UTC+5:30, Roy Smith wrote: In article 1krpdak.u0qy9e1a4knspn%real-not-anti-spam-addr...@apple-juice.co.uk, real-not-anti-spam-addr...@apple-juice.co.uk (D.M. Procida) wrote: Mark Lawrence breamore...@yahoo.co.uk wrote: On

Re: for-loop on cmd-line

2012-10-11 Thread Ramchandra Apte
On Thursday, 11 October 2012 18:44:44 UTC+5:30, Chris Angelico wrote: On Thu, Oct 11, 2012 at 11:16 PM, D'Arcy J.M. Cain da...@druid.net wrote: On Thu, 11 Oct 2012 13:24:22 +0200 Gisle Vanem gva...@broadpark.no wrote: Hello list. I'm a newbie when it comes to Python. I'm

Re: [ANN] pylint 0.26 / logilab-astng 0.24.1

2012-10-11 Thread Ramchandra Apte
On Monday, 8 October 2012 19:50:18 UTC+5:30, Sylvain Thénault wrote: Hi all, I'm very pleased to announce new releases of Pylint and underlying ASTNG library, respectivly 0.26 and 0.24.1. The great news is that both bring a lot of new features and some bug fixes, mostly provided

Re: better way for ' '.join(args) + '\n'?

2012-11-03 Thread Ramchandra Apte
On Saturday, 27 October 2012 03:12:31 UTC+5:30, Tycho Andersen wrote: On Fri, Oct 26, 2012 at 05:36:50PM -0400, Dave Angel wrote: On 10/26/2012 05:26 PM, Tycho Andersen wrote: Assuming it's the length of the list that's the problem, not the length of the strings in the list...

Re: Simple Question regarding running .py program

2012-11-13 Thread Ramchandra Apte
On Tuesday, 13 November 2012 08:15:45 UTC+5:30, Caroline Hou wrote: On Monday, 12 November 2012 21:25:08 UTC-5, Dave Angel wrote: On 11/12/2012 09:02 PM, Caroline Hou wrote: Hi all! I just started learning Python by myself and I have an extremely simple

Re: only .exe

2012-11-24 Thread Ramchandra Apte
On Saturday, 24 November 2012 17:06:57 UTC+5:30, bakie wrote: in the last question I try how to run py script with pycharm . thank dear bro ... and then I wanna have that program with .exe ( standalone installer ) . How can i do that ? I tried with two ways 1) py2exe

Re: Confused compare function :)

2012-12-08 Thread Ramchandra Apte
On Thursday, 6 December 2012 17:44:17 UTC+5:30, Chris Angelico wrote: On Thu, Dec 6, 2012 at 10:47 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Not so. Which one is faster will depend on how often you expect to fail. If the keys are nearly always present, then:

Re: why does dead code costs time?

2012-12-09 Thread Ramchandra Apte
On Wednesday, 5 December 2012 22:10:51 UTC+5:30, Bruno Dupuis wrote: On Wed, Dec 05, 2012 at 04:15:59PM +, Neil Cerutti wrote: On 2012-12-05, Bruno Dupuis python.ml.bruno.dup...@lisael.org wrote: Hi, I'm interested in compilers optimizations, so I study python

Re: why does dead code costs time?

2012-12-12 Thread Ramchandra Apte
On Sunday, 9 December 2012 22:17:09 UTC+5:30, Mark Lawrence wrote: On 09/12/2012 14:11, Ramchandra Apte wrote: peehole haha Double spaced crap from you again not so haha. -- Cheers. Mark Lawrence. haha. What does Cheers mean? -- http://mail.python.org/mailman/listinfo

Re: compile python 3.3 with bz2 support on RedHat 5.5

2012-12-21 Thread Ramchandra Apte
On Friday, 21 December 2012 12:05:57 UTC+5:30, Isml wrote: hi, everyone:     I want to compile python 3.3 with bz2 support on RedHat 5.5 but fail to do that. Here is how I do it:     1、download bzip2 and compile it(make、make -f Makefile_libbz2_so、make install)     2、chang to python 3.3

Re: Password hash

2012-12-25 Thread Ramchandra Apte
On Monday, 24 December 2012 08:08:12 UTC+5:30, Robert Montgomery wrote: I am writing a script that will send an email using an account I set up in gmail. It is an smtp server using tls on port 587, and I would like to use a password hash in the (python) script for login rather than

Re: On-topic: alternate Python implementations

2012-08-04 Thread Ramchandra Apte
The first time I did reply not 'reply all', so I'm posting again. ;-) I think Cython is a Python implementation because you can only use the Python features, not the extra features. C++ is different because of the different rules (C was in a time of assembly and costly computers, C++ was made in

Re: avlhqw avlhqeavlhqino ovfqalmw avlhqei avlhqeaivscunqw

2012-08-04 Thread Ramchandra Apte
Is this spam? If not, can you please explain the message better (I don't get it) and *Please* change the title, it look like spam. On 3 August 2012 21:58, Martin Michael Musatov musatovatattdot...@gmail.com wrote: Thanks to technology, a memorandum of understanding (thanks from Tel Aviva / s,

Re: conditional running of code portion

2012-08-04 Thread Ramchandra Apte
Try pypreprocessor http://code.google.com/p/pypreprocessor/ . Better idea: You should be using the logginghttp://docs.python.org/library/logging.htmlmodule if you want to print debug information quickly.It uses threads and is optimized to run fast. On 5 August 2012 09:46, JW Huang

Re: when an iterable object is exhausted or not

2012-08-04 Thread Ramchandra Apte
An important use of range repeating. one_to_10 = range(1,10) one_to_5 = range(1,5) for x in one_to_5: for x in one_to_10:pass if range wasn't repeatable, range would have to be called 5 times compared with 1! On 5 August 2012 07:43, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:

  1   2   3   4   5   >