Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-17 Thread rusi
On Thursday, October 17, 2013 6:09:59 PM UTC+5:30, rusi wrote: On Thursday, October 17, 2013 12:19:02 PM UTC+5:30, Peter Cacioppi wrote: Object oriented programming takes things further, most significantly by introducing the idea that the object reference you are referencing might

Re: Sexism in the Ruby community: how does the Python community manage it?

2013-10-17 Thread rusi
On Thursday, October 17, 2013 5:18:25 PM UTC+5:30, Zero Piraeus wrote: : On Thu, Oct 17, 2013 at 09:20:39AM +, Steven D'Aprano wrote: Oh well. There's only so much I can do at once. I've got bigger troubles than trying to solve Ruby's problems with yahoos, and frankly, if I

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-17 Thread rusi
On Wednesday, October 16, 2013 1:56:27 AM UTC+5:30, zipher wrote: Yes, well clearly we are not having the same thoughts, yet the purpose of the academic establishment is to pin down such terminology and not have these sloppy understandings everywhere. You dig? Heh Mark I am really sorry. I

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-17 Thread rusi
On Thursday, October 17, 2013 11:14:29 PM UTC+5:30, MRAB wrote: On 17/10/2013 18:32, rusi wrote: On Wednesday, October 16, 2013 1:56:27 AM UTC+5:30, zipher wrote: Yes, well clearly we are not having the same thoughts, yet the purpose of the academic establishment is to pin down

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-17 Thread rusi
On Friday, October 18, 2013 7:38:30 AM UTC+5:30, zipher wrote: It's like this. No matter how you cut it, you're going to get back to the computers where you load instructions with switches. At that point, I'll be very much looking in anticipation to your binary-digit lexer. Why stop

Re: How pickle helps in reading huge files?

2013-10-16 Thread rusi
On Wednesday, October 16, 2013 12:35:42 PM UTC+5:30, Stéphane Wirtel wrote: Keep it in memory Thats a strange answer given that the OP says his file is huge. Of course 'huge' may not really be huge -- that really depends on the h/w he's using. --

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-16 Thread rusi
On Wednesday, October 16, 2013 11:27:03 PM UTC+5:30, zipher wrote: Types on the other hand correspond to our classifications and so are things in our minds. That is not how a C programmer views it. They have explicit typedefs that make it a thing for the computer. Speaking as a C

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-16 Thread rusi
On Thursday, October 17, 2013 6:17:57 AM UTC+5:30, Ned Batchelder wrote: On 10/16/13 8:13 PM, Mark Janssen wrote: Who uses object abstraction in C? No one. That's why C++ was invented. Examples from 1. Linux Kernel 2. Python 3. OS/2 But, here it is significant that the user

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-15 Thread rusi
On Tuesday, October 15, 2013 2:20:10 PM UTC+5:30, Steven D'Aprano wrote: If you read the whole python-history blog on blogspot, you'll see that Python's had it's share of mistakes, design failures and other oops! moments. I think that it is a testament to GvR's over-all design that the end

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-15 Thread rusi
On Wednesday, October 16, 2013 1:56:27 AM UTC+5:30, zipher wrote: Objects in programming languages (or 'values' if one is more functional programming oriented) correspond to things in the world. One of the things you're saying there is that values correspond to things in the world. But

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-15 Thread rusi
On Wednesday, October 16, 2013 3:31:06 AM UTC+5:30, Rhodri James wrote: On Tue, 15 Oct 2013 21:26:27 +0100, Mark Janssen wrote: = Rusi, attribution missing from original. Yes. It would help to keep your quotes bound (firstclassly?) to their respective quoters -- Mark Janssen also

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-14 Thread rusi
On Sunday, October 13, 2013 6:34:56 PM UTC+5:30, Roy Smith wrote: To be fair to Larry, there were different design drivers working there. One more thing to be said for perl: I remember when some colleague first told me about perl (I guess early 90s) I was incredulous that the *same* language

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-14 Thread rusi
On Tuesday, October 15, 2013 7:01:37 AM UTC+5:30, zipher wrote: Yes, and all of that is because, the world has not settled on some simple facts. It needs an understanding of type system. It's been throwing terms around, some of which are well-defined, but others, not: there has been

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-14 Thread rusi
On Tuesday, October 15, 2013 8:48:25 AM UTC+5:30, Steven D'Aprano wrote: On Mon, 14 Oct 2013 12:18:59 -0700, John Nagle wrote: No, Python went through the usual design screwups. Look at how painful the slow transition to Unicode was, from just str to Unicode strings, ASCII strings,

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-10 Thread rusi
On Thursday, October 10, 2013 8:04:00 PM UTC+5:30, David wrote: I have never heard the term hypercomplex numbers. I guess you are referring to vectors with more dimensions than two. A three A generalization of quaternions : http://en.wikipedia.org/wiki/Hypercomplex_number

Re: Cookie gets changed when hit comes from a referrer

2013-10-09 Thread rusi
On Thursday, October 10, 2013 6:40:19 AM UTC+5:30, Steven D'Aprano wrote: I have no objection to encouraging people to read the fine manual, and I don't intend to be Nikos' (or anyone else's) unpaid full-time help desk and troubleshooter. But I do think it is simply unfair to treat him more

Re: Formal-ity and the Church-Turing thesis

2013-10-08 Thread rusi
On Tuesday, October 8, 2013 10:49:11 AM UTC+5:30, zipher wrote: I don't have an infinite stack to implement lambda calculus, but... And then But this is not a useful formalism. Any particular Program implements a DFA, even as it runs on a TM. The issue of whether than TM is finite or not

Re: Formal-ity and the Church-Turing thesis

2013-10-08 Thread rusi
On Tuesday, October 8, 2013 6:31:21 PM UTC+5:30, Ravi Sahni wrote: On Tue, Oct 8, 2013 at 11:14 AM, rusi wrote: To explain at length will be too long and OT (off-topic) for this list. I'll just give you a link and you tell me what you make of it: http://sloan.stanford.edu/mousesite

Formal-ity and the Church-Turing thesis

2013-10-07 Thread rusi
On Tuesday, October 8, 2013 5:54:10 AM UTC+5:30, zipher wrote: Now, one can easily argue that I've gone too far to say no one has understood it (obviously), so it's very little tongue-in-cheek, but really, when one tries to pretend that one model of computation can be substituted for another

Re: Formal-ity and the Church-Turing thesis

2013-10-07 Thread rusi
On Tuesday, October 8, 2013 10:46:50 AM UTC+5:30, Ravi Sahni wrote: With due respect Sir, you saying that Turing machine not a machine? Very confusion Sir!!! Thanks Ravi for the 'due respect' though it is a bit out of place on a list like this :-) Thanks even more for the 'very confusion'. I

Re: Database statements via python but database left intact

2013-10-06 Thread rusi
On Sunday, October 6, 2013 2:35:24 PM UTC+5:30, Chris “Kwpolska” Warrick wrote: So, instead of this, maybe we should work on getting psycopg2 to the top result on Googling “python sql”, or even “python mysql” with an anti-MySQL ad? (like vim was doing some time ago on Googling “emacs”) Do you

Re: Tail recursion to while iteration in 2 easy steps

2013-10-04 Thread rusi
On Thursday, October 3, 2013 10:57:48 PM UTC+5:30, Ravi Sahni wrote: On Wed, Oct 2, 2013 at 10:46 AM, rusi wrote: 4. There is a whole spectrum of such optimizaitons -- 4a eg a single-call structural recursion example, does not need to push return address on the stack. It only needs

Re: Tail recursion to while iteration in 2 easy steps

2013-10-02 Thread rusi
On Wednesday, October 2, 2013 1:53:46 PM UTC+5:30, Alain Ketterlin wrote: rusi writes: On Wednesday, October 2, 2013 3:00:41 AM UTC+5:30, Terry Reedy wrote: Part of the reason that Python does not do tail call optimization is that turning tail recursion into while iteration is almost

Re: VERY BASIC HELP

2013-10-01 Thread rusi
On Monday, September 30, 2013 11:20:16 PM UTC+5:30, vignesh.h...@gmail.com wrote: Thank you both so much! I'll be sure to make more pertinent subject lines now :) Thanks for the detailed explanations! Clearly, I've just started learning this language ~20 minutes before I made this post, and

Re: Tail recursion to while iteration in 2 easy steps

2013-10-01 Thread rusi
On Wednesday, October 2, 2013 3:00:41 AM UTC+5:30, Terry Reedy wrote: Part of the reason that Python does not do tail call optimization is that turning tail recursion into while iteration is almost trivial, once you know the secret of the two easy steps. Here it is. What happens for mutual

Re: Functional Programming and python

2013-09-30 Thread rusi
On Tuesday, October 1, 2013 6:11:18 AM UTC+5:30, Steven D'Aprano wrote: On Mon, 30 Sep 2013 19:04:32 +0200, Franck Ditter wrote: 2. Lambda-expression body is limited to one expression. Why ? Nobody has come up with syntax that is unambiguous, would allow multiple statements in an

Re: Understanding how is a function evaluated using recursion

2013-09-29 Thread rusi
On Thursday, September 26, 2013 4:54:22 AM UTC+5:30, Arturo B wrote: So I know what recursion is, but I don't know how is flatten(i) evaluated, what value does it returns? There is a folklore in CS that recursion is hard [To iterate is human, to recurse divine --

Re: Handling 3 operands in an expression without raising an exception

2013-09-28 Thread rusi
On Friday, September 27, 2013 4:13:52 PM UTC+5:30, Dave Angel wrote: You should study APL. Many functions were written in one line, with twenty lines of explanation. The function itself was considered unreadable nonsense. And if a function stopped working, general wisdom was to throw it out,

Re: work develope matrix of difusive concentration

2013-09-26 Thread rusi
On Friday, September 27, 2013 12:43:51 AM UTC+5:30, D.YAN ESCOLAR RAMBAL wrote: Good morning all thanks for your help. Now I`ve a question, if I need create a matrix, method of thomas, ghost nodes, etc.. for developed one aplicative for the ecuation of difusion in 1d, 2d, 3d, 4d. It`s

Re: Understanding how is a function evaluated using recursion

2013-09-25 Thread rusi
On Thursday, September 26, 2013 4:54:22 AM UTC+5:30, Arturo B wrote: So I know what recursion is, but I don't know how is flatten(i) evaluated, what value does it returns? When you are a noob, who do you ask? The gurus. When you are a guru who do you ask? The

Re: Functional Programming and python

2013-09-24 Thread rusi
On Monday, September 23, 2013 11:54:53 PM UTC+5:30, Vito De Tullio wrote: rusi wrote: [Not everything said there is correct; eg python supports currying better [than haskell which is surprising considering that Haskell's surname is [Curry!] AFAIK python does not support currying

Re: Functional Programming and python

2013-09-24 Thread rusi
On Tuesday, September 24, 2013 1:12:51 PM UTC+5:30, Jussi Piitulainen wrote: rusi writes: Without resorting to lambdas/new-functions: With functools.partial one can freeze any subset of a function(callable's) parameters. In Haskell one can only freeze the first parameter

Re: Functional Programming and python

2013-09-24 Thread rusi
On Tuesday, September 24, 2013 8:21:19 PM UTC+5:30, Jussi Piitulainen wrote: Would the type system get in the way of providing some analogous function in Haskell? I don't know. Yes. The haskell curry curry f x y = f (x,y) is really only curry2 curry3 would be curry3 f x y z = f (x,y,z) and so

Re: Functional Programming and python

2013-09-24 Thread rusi
On Tuesday, September 24, 2013 8:56:21 PM UTC+5:30, Chris Angelico wrote: On Wed, Sep 25, 2013 at 1:07 AM, rusi wrote: And this is an old conundrum in programming language design: In C printf is easy to write and NOT put into the language but into external libraries In Pascal

Re: reload and work flow suggestions

2013-09-23 Thread rusi
On Monday, September 23, 2013 2:01:00 PM UTC+5:30, Peter Cacioppi wrote: One thing re: editors and interactive environments. I'm not a huge emacs fan (ducking) and I really like iPython. Heh! Yeah we are an endangered species G enerally N ot U sed E ditor for M iddle A ged C omputer S

Re: reload and work flow suggestions

2013-09-22 Thread rusi
On Sunday, September 22, 2013 3:13:13 AM UTC+5:30, Peter Cacioppi wrote: This is an idea brought over from another post. When I write Python code I generally have 2 or 3 windows open simultaneously. 1) An editor for the actual code. 2) The interactive interpreter. 3) An editor for the

Re: Why do I have to use global so much when using Turtle?

2013-09-22 Thread rusi
On Monday, September 23, 2013 12:27:50 AM UTC+5:30, John Ladasky wrote: All right, never mind! I hacked around this morning, making some changes to parts of my program that I thought were unrelated to my namespace issues. I was paring it down to a minimal example, to post here as Ned

Functional Programming and python

2013-09-22 Thread rusi
Combining your two questions -- Recently: What minimum should a person know before saying I know Python And earlier this On Sunday, August 4, 2013 10:00:35 PM UTC+5:30, Aseem Bansal wrote: If there is an issue in place for improving the lambda forms then that's good. I wanted a link about

Re: python, pythontex and plots

2013-09-22 Thread rusi
Take a look at babel http://www.cs.unm.edu/~eschulte/data/CISE-13-3-SciProg.pdf http://orgmode.org/worg/org-contrib/babel/intro.html Its my impression that babel supports everything and more that pylatex does ...the catch is that its under emacs...!! --

Re: What minimum should a person know before saying I know Python

2013-09-20 Thread rusi
On Friday, September 20, 2013 3:28:00 PM UTC+5:30, Aseem Bansal wrote: I started Python 4 months ago. Largely self-study with use of Python documentation, stackoverflow and google. I was thinking what is the minimum that I must know before I can say that I know Python? I come from a C

Re: What minimum should a person know before saying I know Python

2013-09-20 Thread rusi
On Friday, September 20, 2013 7:09:13 PM UTC+5:30, Robert Kern wrote: On 2013-09-20 12:43, rusi wrote: Stroustrup says he is still learning C++ and I know kids who have no qualms saying they know programming language L (for various values of L) after hardly an hour or two of mostly

Re: lambda - strange behavior

2013-09-20 Thread rusi
On Friday, September 20, 2013 8:51:20 PM UTC+5:30, Kasper Guldmann wrote: I was playing around with lambda functions, but I cannot seem to fully grasp them. I was running the script below in Python 2.7.5, and it doesn't do what I want it to. Are lambda functions really supposed to work that

Re: *.csv to *.txt after adding columns

2013-09-18 Thread rusi
On Wednesday, September 18, 2013 7:12:21 AM UTC+5:30, Bryan Britten wrote: Hey, gang, I've got a problem here that I'm sure a handful of you will know how to solve. I've got about 6 *.csv files that I am trying to open; change the header names (to get rid of spaces); add two new columns,

Re: better and user friendly IDE recommended?

2013-09-17 Thread rusi
On Wednesday, September 11, 2013 7:44:04 PM UTC+5:30, mnishpsyched wrote: Hey i am a programmer but new to python. Can anyone guide me in knowing which is a better IDE used to develop web related apps that connect to DB using python? Just saw this http://www.youtube.com/watch?v=1-dUkyn_fZA

Re: Python GUI?

2013-09-17 Thread rusi
On Thursday, September 12, 2013 10:21:49 PM UTC+5:30, Benjamin Kaplan wrote: The main difference between wx and qt is that qt looks native on every platform while wx *is* native on every platform (it uses native controls wherever possible). This means that wx integrates into the OS better,

Re: Python GUI?

2013-09-17 Thread rusi
On Tuesday, September 17, 2013 9:49:28 PM UTC+5:30, Benjamin Kaplan wrote: On Tue, Sep 17, 2013 at 7:55 AM, rusi wrote: On Thursday, September 12, 2013 10:21:49 PM UTC+5:30, Benjamin Kaplan wrote: The main difference between wx and qt is that qt looks native on every platform

Re: Confessions of a terrible programmer

2013-09-16 Thread rusi
On Friday, September 6, 2013 10:26:07 PM UTC+5:30, Steven D'Aprano wrote: Not specifically about Python, but still relevant: http://blog.kickin-the-darkness.com/2007/09/confessions-of-terrible-programmer.html Nice post -- thanks! Prompted this from me

Re: Editing tabular data

2013-09-03 Thread rusi
On Friday, August 2, 2013 12:05:53 PM UTC+5:30, Ben Finney wrote: Skip Montanaro writes: I really love Emacs, however... […] This is clearly a case where choosing the proper tool is important. I agree that using a spreadsheet to edit a 3x5 CSV file is likely overkill (might just as

Re: Editor Ergonomics [was: Important features for editors]

2013-07-06 Thread rusi
On Saturday, July 6, 2013 7:40:39 PM UTC+5:30, Skip Montanaro wrote: The fact that rms has crippling RSI should indicate that emacs' ergonomics is not right. Kind of a small sample size, don't you think? Hopefully we can kill this meme that Emacs is somehow worse for your wrists than other

Re: Important features for editors

2013-07-05 Thread rusi
On Thursday, July 4, 2013 1:37:10 PM UTC+5:30, Göktuğ Kayaalp wrote: Programmability comes to my mind, before anything else. I'd suggest to find out about designs of Emacs and Vi(m). There's one reason I prefer emacs -- and I guess some people prefer Idle -- the interpreter and editor are

Re: Important features for editors

2013-07-05 Thread rusi
On Saturday, July 6, 2013 10:05:14 AM UTC+5:30, Joshua Landau wrote: I never got why Vi doesn't support Ctrl-C by default -- it's not like it's a used key-combination and it would have helped me so many times when I was younger. Dunno what you are referring to. Out here C-c gets vi out of

Re: Important features for editors

2013-07-04 Thread rusi
On Thursday, July 4, 2013 7:03:19 PM UTC+5:30, Steve Simmons wrote: Boy oh boy! You really are a slow learner Nicos. You have just offered to commit a crime and to include dozens of others in that crime ON A PUBLIC FORUM. Please think before you post. For the record Steve, let me say, I

Re: Python list code of conduct

2013-07-03 Thread rusi
On Wednesday, July 3, 2013 6:09:35 AM UTC+5:30, Ben Finney wrote: Dennis Lee Bieber writes: So who would enforce any rules? Ideally, this community is healthy enough for us to enforce the code of conduct of our host, through social convention among us all. Thanks Ben for that. Lets not

Re: python adds an extra half space when reading from a string or list

2013-07-03 Thread rusi
On Wednesday, July 3, 2013 3:15:15 PM UTC+5:30, Chris Angelico wrote: If my boss gave a random stranger from a mailing list the root password to one of our servers, I would say to his face that he had betrayed his (our) customers' trust. I would say it with strong emphasis and a raised tone,

Re: Why is CPython 2.5 a dependency for Jython 2.5?

2013-07-03 Thread rusi
On Wednesday, July 3, 2013 5:52:12 PM UTC+5:30, Steven D'Aprano wrote: Does anyone know why CPython 2.5 is a dependency for Jython 2.5.1+ on Debian squeeze? Not exactly answering your question... The debian dependencies can be fairly 'conservative' which means all kinds of stuff is pulled in

Re: Why is CPython 2.5 a dependency for Jython 2.5?

2013-07-03 Thread rusi
On Wednesday, July 3, 2013 5:52:12 PM UTC+5:30, Steven D'Aprano wrote: I'm running a box with Debian squeeze, and I just ran: sudo aptitude install jython which ended up installing Python 2.5: BTW trying to install jython out here gave me this list (which does not seem to have this

Re: python adds an extra half space when reading from a string or list

2013-07-03 Thread rusi
On Wednesday, July 3, 2013 7:42:19 PM UTC+5:30, feedth...@gmx.de wrote: Any questions? YES! Who is that hiding behind 'FeedTheTroll' ? Well thanks anyways :-) I was thinking of doing that but could not find my oxygen mask needed to wade into the steaming pile of ... --

Re: python adds an extra half space when reading from a string or list

2013-07-03 Thread rusi
On Wednesday, July 3, 2013 10:31:23 PM UTC+5:30, ru...@yahoo.com wrote: Are the existence of laws against beating people up negated because you told them in advance? Or negated because they deserve the beating? One of the fundamental purpose of laws is to legalize what you call

Re: python adds an extra half space when reading from a string or list

2013-07-03 Thread rusi
On Thursday, July 4, 2013 6:38:31 AM UTC+5:30, Oscar Benjamin wrote: And also, let's end this and all the related discussions about trolling and how to deal with trolls. I can see how some are annoyed by Νίκος and his posts but I for one am *much more* concerned/bothered by the surrounding

Re: python adds an extra half space when reading from a string or list

2013-07-02 Thread rusi
A plague is raging in the town A rat scampers into the room. People are harried --- A RAT! Rurpy: Rats are living beings dont you know?! Never kill a living being! Its not humanitarian, er rattatitarian. (200 more posts on humanitarianism, veganism, rattatitarianism etc) Alex: Hear Hear! But

Re: Python - forking an external process?

2013-07-02 Thread rusi
On Wednesday, July 3, 2013 9:17:29 AM UTC+5:30, Victor Hooi wrote: Hi, I have a Python script where I want to run fork and run an external command (or set of commands). For example, after doing xyz, I then want to run ssh to a host, handover control back to the user, and have my script

Re: Python - forking an external process?

2013-07-02 Thread rusi
On Wednesday, July 3, 2013 9:41:32 AM UTC+5:30, Victor Hooi wrote: Also, what's this improvement you mentioned? See thread http://mail.python.org/pipermail/python-list/2013-June/650550.html -- http://mail.python.org/mailman/listinfo/python-list

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread rusi
On Monday, July 1, 2013 7:31:18 PM UTC+5:30, Walter Hurry wrote: Please...enough. Polite request: consider killfiling him and having done with it. It is irritating to see all the responses even though I killfiled him long ago. Whilst I realise, of course, that it is entirely your

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread rusi
On Monday, July 1, 2013 9:04:11 PM UTC+5:30, Steven D'Aprano wrote: And no, i do not want to piss off people like you, who have spend time helping me. Too late. I asked you to stop flaming on-list, and you didn't. I am now kill-filing you for a month. Feel grateful that it is not permanent,

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread rusi
On Monday, July 1, 2013 10:26:21 PM UTC+5:30, Joshua Landau wrote: So yes, Antoon Pardon and Nikos, please stop. You are not representing the list. This 'and' is type-wrong. I haven't followed any of the other arguments, true, but you two in particular are causing a lot of trouble for the

Re: PYTHONPATH and module names

2013-07-01 Thread rusi
On Monday, July 1, 2013 11:59:35 PM UTC+5:30, Tobiah wrote: So today, I created a file called 'formatter.py', and my program broke. It turned out that I was also import 'gluon' from web2py, which in turn, somewhere, imported the regular python formatter.py with which I was not familiar.

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread rusi
On Tuesday, July 2, 2013 12:46:40 AM UTC+5:30, Joshua Landau wrote: On 1 July 2013 19:29, rusi wrote: On Monday, July 1, 2013 10:26:21 PM UTC+5:30, Joshua Landau wrote: So yes, Antoon Pardon and Nikos, please stop. You are not representing the list. This 'and' is type-wrong. I don't

Re: python adds an extra half space when reading froma string or list -- back to the question

2013-07-01 Thread rusi
On Tuesday, July 2, 2013 1:32:44 AM UTC+5:30, Dave Angel wrote: But what was the expected output? And who cares? The code made no sense, was incomplete, and the posted question was nonsensical. Yes in this specific instance all this is probably true. I believe however, that Joel's intent in

Re: PYTHONPATH and module names

2013-07-01 Thread rusi
On Tuesday, July 2, 2013 1:24:30 AM UTC+5:30, Tobiah wrote: Are you familiar with absolute and relative imports: http://docs.python.org/release/2.5/whatsnew/pep-328.html Doesn't seem to work: Python 2.7.3 (default, May 10 2012, 13:31:18) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux2 Type

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread rusi
On Monday, July 1, 2013 8:36:53 PM UTC+5:30, Neil Cerutti wrote: On 2013-07-01, rusi wrote: 1. Kill-filing/spam-filtering are tools for spam. Nikos is certainly not spamming in the sense of automated sending out of cooked mail to zillions of recipients/lists. His posts are definite

Re: Closures in leu of pointers?

2013-06-30 Thread rusi
On Sunday, June 30, 2013 10:38:01 AM UTC+5:30, Chris Angelico wrote: On Sun, Jun 30, 2013 at 2:32 PM, Terry Reedy wrote: One of the reasons I switched to Python was to not have to do that, or hardly ever. For valid code, an new declaration is hardly needed. Parameters are locals. If the

Re: Closures in leu of pointers?

2013-06-30 Thread rusi
On Sunday, June 30, 2013 2:23:35 AM UTC+5:30, Terry Reedy wrote: If, in the general case, the compiler requires two passes to understand a function body, then *so do people*#. This requirement is what trips up people who are either not used to the idea of two-pass compilation or do

Re: Closures in leu of pointers?

2013-06-30 Thread rusi
On Sunday, June 30, 2013 4:52:24 PM UTC+5:30, Steven D'Aprano wrote: On Sun, 30 Jun 2013 01:56:25 -0700, rusi wrote: Now having such passes is one thing. Defining the language in terms of them quite another... I don't believe that Python's behaviour is defined in terms of the number

Re: Issues compiling hunspell from source on windows

2013-06-30 Thread rusi
On Sunday, June 30, 2013 9:24:46 PM UTC+5:30, Akshay Kayastha wrote: Hi I am trying to compile a python module called hunspell from the following [source](https://pypi.python.org/pypi/hunspell). According to http://docs.python.org/2/extending/windows.html you need to use the same compiler

Re: Looking for a name for a deployment framework...

2013-06-30 Thread rusi
On Sunday, June 30, 2013 7:08:51 AM UTC+5:30, Chris Angelico wrote: On Wed, Jun 26, 2013 at 9:40 PM, Roy Smith wrote: for host in hosts: deploy(the_code).remote() For further hack delight, require a patch Submitted for this code restrict itself To five feet, neither more nor less;

Re: Closures in leu of pointers?

2013-06-29 Thread rusi
On Saturday, June 29, 2013 10:32:01 PM UTC+5:30, Antoon Pardon wrote: Op 29-06-13 16:02, Michael Torrie schreef: The real problem here is that you don't understand how python variables work. And in fact, python does not have variables. It has names that bind to objects. I don't

Re: Closures in leu of pointers?

2013-06-29 Thread rusi
On Sunday, June 30, 2013 12:21:35 AM UTC+5:30, Steven D'Aprano wrote: On Sat, 29 Jun 2013 19:02:01 +0200, Antoon Pardon wrote: We might as well say that C doesn't have variables, it has names pointing to memory locations or value containers or something like that. AFAICS there is no

Re: Making a pass form cgi = webpy framework

2013-06-28 Thread rusi
On Friday, June 28, 2013 3:45:27 PM UTC+5:30, Νίκος wrote: Στις 28/6/2013 12:35 μμ, ο/η Robert Kern έγραψε: I see, your explanation started to make things clearer to me. What is the easiest and simplest web framework you advise me to use? Here's a picture of the web-development scene as I

Re: Why is the argparse module so inflexible?

2013-06-28 Thread rusi
On Saturday, June 29, 2013 7:06:37 AM UTC+5:30, Ethan Furman wrote: On 06/27/2013 03:49 PM, Steven D'Aprano wrote: [rant] I think it is lousy design for a framework like argparse to raise a custom ArgumentError in one part of the code, only to catch it elsewhere and call sys.exit. At the

Re: FACTS: WHY THE PYTHON LANGUAGE FAILS.

2013-06-27 Thread rusi
On Thursday, June 27, 2013 12:35:14 PM UTC+5:30, Russel Walker wrote: On Thursday, June 27, 2013 6:19:18 AM UTC+2, Thrinaxodon wrote: snipped I was hoping to have a good laugh. :| Although I wouldn't call it hostile. I think the python community is being educated in how to spam and troll at

looking for a linguistical/semiotic quote

2013-06-27 Thread rusi
I am looking for a quote (from Whorf/Sapir/Wittgenstein/Humboldt dunno... that 'school') It goes something like this: What characterizes a language is not what we can say in it but what we must -- like it or not -- say. A demo of this is D Hofstadter's

Re: looking for a linguistical/semiotic quote

2013-06-27 Thread rusi
On Thursday, June 27, 2013 4:49:23 PM UTC+5:30, Chris Angelico wrote: On Thu, Jun 27, 2013 at 9:14 PM, rusi wrote: I am looking for a quote (from Whorf/Sapir/Wittgenstein/Humboldt dunno... that 'school') It goes something like this: What characterizes a language is not what we can

Re: looking for a linguistical/semiotic quote

2013-06-27 Thread rusi
On Thursday, June 27, 2013 5:40:39 PM UTC+5:30, Vlastimil Brom wrote: Hi, I belive, the author is Roman Jakobson, see the respective post about this very question: http://linguistlist.org/issues/9/9-32.html Thanks! There seem to be several variations, Another remarkable linguist

Re: How to make a web framework

2013-06-27 Thread rusi
On Thursday, June 27, 2013 8:44:36 PM UTC+5:30, Fábio Santos wrote: On 27 Jun 2013 14:49, gamesb...@gmail.com wrote: I've used web frameworks, but I don't know how they work. Is there anywhere that I can learn how this all works from scratch? Write CGI scripts. It is the most raw way to

Re: Is this PEP-able? fwhile

2013-06-26 Thread rusi
On Wednesday, June 26, 2013 6:03:39 PM UTC+5:30, Steven D'Aprano wrote: On Tue, 25 Jun 2013 12:39:53 -0400, jimjhb wrote: I just checked and MISRA-C 2012 now allows gotos in specific, limited circumstances. I think it was the MISRA-C 1998 standard that caused all this trouble.

Re: Is this PEP-able? fwhile

2013-06-26 Thread rusi
On Tuesday, June 25, 2013 10:09:53 PM UTC+5:30, jim...@aol.com wrote: I just checked and MISRA-C 2012 now allows gotos in specific, limited circumstances. I think it was the MISRA-C 1998 standard that caused all this trouble. So if MISRA now allows goto, why not Python :) Not sure who

Re: Limit Lines of Output

2013-06-26 Thread rusi
On Wednesday, June 26, 2013 8:54:56 PM UTC+5:30, Joshua Landau wrote: On 25 June 2013 22:48, Gene Heskett wrote: On Tuesday 25 June 2013 17:47:22 Joshua Landau did opine: I did not. I guess Joshua is saying that saying ≠ opining [Or is he opining?] --

Re: Is this PEP-able? fwhile

2013-06-25 Thread rusi
On Tuesday, June 25, 2013 4:44:44 AM UTC+5:30, alex23 wrote: I'd probably just go with a generator expression to feed the for loop: for X in (i for i in ListY if conditionZ): Nice idiom -- thanks Yes it does not correspond to a takewhile (or break in the control

Re: io module and pdf question

2013-06-25 Thread rusi
On Tuesday, June 25, 2013 9:48:44 AM UTC+5:30, jyou...@kc.rr.com wrote: 1. Is there another way to get metadata out of a pdf without having to install another module? 2. Is it safe to assume pdf files should always be encoded as latin-1 (when trying to read it this way)? Is there a chance

Re: Is this PEP-able? fwhile

2013-06-25 Thread rusi
On Tuesday, June 25, 2013 9:30:54 PM UTC+5:30, Ian wrote: In my experience the sorts of people who preach one exit point are also all about defining preconditions and postconditions and proving that the postconditions follow from the preconditions. I think that the two are linked, because the

Re: io module and pdf question

2013-06-25 Thread rusi
I guess the string constant 'XYZ:colorlist' needs to be a byte-string -- use b prefix? Dunno for sure. Black hole for me -- unicode! -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie EOL while scanning string literal

2013-06-25 Thread rusi
On Wednesday, June 26, 2013 5:35:50 AM UTC+5:30, willle...@gmail.com wrote: thanks man you answered my questions very clear, btw do you know of a place where I can learn python I know some tutorials but are 2. something and I'm using 3.3 and I've been told they are different. If you are a

Re: Python development tools

2013-06-24 Thread rusi
On Monday, June 24, 2013 11:04:48 AM UTC+5:30, cutems93 wrote: Alright. Thanks everyone for your responses. I just want to know what tools are GENERALLY used by professional developers. I am helping somebody who wants to know about software that he might use in his project. He does not know

Re: Python development tools

2013-06-24 Thread rusi
On Monday, June 24, 2013 11:50:38 AM UTC+5:30, Ben Finney wrote: rusi writes: I dont know what you mean my 'scripting' Any time someone has shown me a “Python script”, I don't see how it's different from what I'd call a “Python program”. So I just mentally replace “scripting

Re: Loop Question

2013-06-24 Thread rusi
On Monday, June 24, 2013 5:42:51 PM UTC+5:30, christ...@gmail.com wrote: Here is my code...I'm using 2.7.5 username=raw_input(Please enter your username: ) password=raw_input(Please enter your password: ) if username == john doe and password == fopwpo: print Login Successful else:

Re: Making a pass form cgi = webpy framework

2013-06-24 Thread rusi
On Monday, June 24, 2013 1:02:51 PM UTC+5:30, Νίκος wrote: And also in my pelatologio.py and other script i use if statements to check if user submitted data or not so to print them on screen and then exit, like modularization. foe example: if( log ): name = log print

Re: Is this PEP-able? fwhile

2013-06-24 Thread rusi
On Tuesday, June 25, 2013 3:08:57 AM UTC+5:30, Chris Angelico wrote: On Tue, Jun 25, 2013 at 5:52 AM, wrote: (NOTE: Many people are being taught to avoid 'break' and 'continue' at all costs... Why? Why on earth should break/continue be avoided? Because breaks and continues are just

Re: Python development tools

2013-06-24 Thread rusi
On Tuesday, June 25, 2013 4:41:22 AM UTC+5:30, Ben Finney wrote: rusi writes: I dont however think that the two philosophies are the same. See http://www.tcl.tk/doc/scripting.html That essay constrasts “scripting” versus “system programming”, a useful (though terminologically confusing

Re: Python development tools

2013-06-24 Thread rusi
On Tuesday, June 25, 2013 8:09:19 AM UTC+5:30, MRAB wrote: And convenience for the programmer. Manipulating long texts using variable-length strings? Yes, I know it's inefficient, but it's still faster than doing it by hand! Well... did not say it because it tends to be emotionally

Re: Python development tools

2013-06-23 Thread rusi
On Monday, June 24, 2013 5:58:03 AM UTC+5:30, Steven D'Aprano wrote: On Sun, 23 Jun 2013 13:40:07 -0700, cutems93 wrote: What else do I need? You don't *need* any of these. You only *need* two things to write Python code: something to edit text files, and the Python interpreter to check

<    1   2   3   4   5   6   7   8   9   10   >