Re: Bools and explicitness [was Re: PyWart: The problem with print]

2013-06-06 Thread rusi
On Jun 6, 6:45 am, Chris Angelico ros...@gmail.com wrote: On Thu, Jun 6, 2013 at 11:37 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: What prevents bugs is the skill of the people writing the code, not the compiler. +1 QOTW. In many Indian languages there is a saying: A

Re: Bools and explicitness [was Re: PyWart: The problem with print]

2013-06-06 Thread rusi
On Jun 6, 8:26 pm, Chris Angelico ros...@gmail.com wrote: On Fri, Jun 7, 2013 at 12:09 AM, rusi rustompm...@gmail.com wrote: When we switched from to python (via Scheme and a haskell- predecessor), I dont remember ever getting a segmentation fault. Oh, it's easy to segfault Python. import

Re: Bools and explicitness [was Re: PyWart: The problem with print]

2013-06-06 Thread rusi
On Jun 6, 9:08 pm, Robert Kern robert.k...@gmail.com wrote: On 2013-06-06 16:41, Chris Angelico wrote: Anyway, regardless of your language, there's always some criteria that can't be coded. Suppose the valid input for a function were integers whose square roots are integers but whose cube

Re: Bools and explicitness [was Re: PyWart: The problem with print]

2013-06-06 Thread rusi
that a few do still understand. Haskell is not exception. See below On Thu, Jun 6, 2013 at 1:27 PM, rusi rustompm...@gmail.com wrote: Yes, all programming communities have blind-spots.  The Haskell community's is that Haskell is safe and safe means that errors are caught at compile-time. I

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-06 Thread rusi
On Jun 7, 12:03 am, Lele Gaifax l...@metapensiero.it wrote: snipped You should *read* and *understand* the error message! When you *shout* at the deaf, the non-deaf get deaf wink. -- http://mail.python.org/mailman/listinfo/python-list

Re: Bools and explicitness [was Re: PyWart: The problem with print]

2013-06-06 Thread rusi
On Jun 7, 8:14 am, Mark Janssen dreamingforw...@gmail.com wrote: I am aware of what it means, but Python doesn't really have it (although it may evolve to it with annotations). No polymorphism huh? py len([1, 2, 3])  # len works on lists 3 py len((1, 2))  # and on tuples 2 py

Re: Bools and explicitness [was Re: PyWart: The problem with print]

2013-06-06 Thread rusi
On Jun 7, 8:24 am, rusi rustompm...@gmail.com wrote: On Jun 7, 8:14 am, Mark Janssen dreamingforw...@gmail.com wrote: I am aware of what it means, but Python doesn't really have it (although it may evolve to it with annotations). No polymorphism huh? py len([1, 2, 3

Re: Don't rebind built-in names* - it confuses readers

2013-06-10 Thread rusi
On Jun 11, 5:53 am, Mark Janssen dreamingforw...@gmail.com wrote: There's a subtle difference between a keyword and a built-in.  Good Python style generally avoids masking built-ins but allows it: Right, thank you for reminding me.  My C-mind put them in the same category. -- MarkJ

Re: Don't rebind built-in names* - it confuses readers

2013-06-10 Thread rusi
On Jun 11, 5:14 am, Terry Jan Reedy tjre...@udel.edu wrote: Many long-time posters have advised Don't rebind built-in names*. * Unless you really mean to mask it, or more likely wrap it, such as wrapping print to modify some aspect of its operation than one cannot do with its keyword

Re: Don't rebind built-in names* - it confuses readers

2013-06-10 Thread rusi
On Jun 11, 8:02 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Mon, 10 Jun 2013 19:36:44 -0700, rusi wrote: Pascal introduced the idea of block structure -- introduce a name at one level, override it at a lower level. [Ok ALgol introduced, Pascal popularized

Re: Don't rebind built-in names* - it confuses readers

2013-06-11 Thread rusi
On Jun 11, 12:09 pm, Peter Otten __pete...@web.de wrote: Terry Jan Reedy wrote: Many long-time posters have advised Don't rebind built-in names*. I'm in that camp, but I think this old post by Guido van Rossum is worth reading to put the matter into perspective: Not sure what you are saying

Re: Build Python 2.7.5 - Modules missing

2013-06-11 Thread rusi
On Jun 10, 10:51 pm, Walter Hurry walterhu...@lavabit.com wrote: On building Python 2.7.5 I got the following message: Python build finished, but the necessary bits to build these modules  were not found: dl                 imageop            linuxaudiodev spwd               sunaudiodev To

Re: Split a list into two parts based on a filter?

2013-06-11 Thread rusi
On Jun 11, 6:48 pm, Fábio Santos fabiosantos...@gmail.com wrote: What I like so much about it is the .. if .. else .. Within the parenthesis and the append() call outside these parenthesis. You can do this -- which does not mix up functional and imperative styles badly and is as much a 2-liner

Re: PYTHONPATH: dev and prod

2013-06-11 Thread rusi
On Jun 11, 9:28 pm, jacopo jacopo.pe...@gmail.com wrote: I am developing my code in the path: /py/myscripts /py/mylib In order to import mylib, I need to add /py/mylib to PYTHONPATH. Now I want to save a snapshot of the current code in the production directory, I will copy all in:

Re: Split a list into two parts based on a filter?

2013-06-11 Thread rusi
On Jun 11, 10:05 pm, Fábio Santos fabiosantos...@gmail.com wrote: On 11 Jun 2013 17:47, rusi rustompm...@gmail.com wrote: [Of course I would prefer a 3-liner where the body of the for is indented :-) ] Is this an aside comprehension? Eh? Its a for-loop. Same as: for s in songs

Re: Split a list into two parts based on a filter?

2013-06-11 Thread rusi
On Jun 11, 10:37 pm, Chris Angelico ros...@gmail.com wrote: On Wed, Jun 12, 2013 at 3:23 AM, rusi rustompm...@gmail.com wrote: On Jun 11, 10:05 pm, Fábio Santos fabiosantos...@gmail.com wrote: On 11 Jun 2013 17:47, rusi rustompm...@gmail.com wrote: [Of course I would prefer a 3-liner

Re: PYTHONPATH: dev and prod

2013-06-12 Thread rusi
On Jun 12, 4:10 pm, jacopo jacopo.pe...@gmail.com wrote: this idea seemed perfect but it turned out that you have to execute the module as a package (python -m py.myscripts.any_script) otherwise I get an error on the relative import. Unfortunately I am working in a team and I do not have

Re: PYTHONPATH: dev and prod

2013-06-12 Thread rusi
On Jun 12, 6:29 pm, jacopo jacopo.pe...@gmail.com wrote: 1. How you run -- 'launch' -- the code -- from py and from prod when I have to test I use python any_script.py  but in production there is a c++ program that is able to wrap and run python code (the technical details are a bit beyond

Re: Turnign greek-iso filenames = utf-8 iso

2013-06-12 Thread rusi
On Jun 12, 7:42 pm, Mark Lawrence breamore...@yahoo.co.uk wrote: On 12/06/2013 13:42, Νικόλαος Κούρας wrote: Something you want me to try? I'd suggest suicide but that would no doubt start another stream of questions along the lines of How do I do it?. There's a saying in some Indian

Re: Version Control Software

2013-06-13 Thread rusi
On Jun 13, 11:00 am, cutems93 ms2...@cornell.edu wrote: Thank you everyone for such helpful responses! Actually, I have one more question. Does anybody have experience with closed source version control software? If so, why did you buy it instead of downloading open source software? Does

Re: Version Control Software

2013-06-13 Thread rusi
On Jun 13, 4:26 pm, MRAB pyt...@mrabarnett.plus.com wrote: On 13/06/2013 07:00, cutems93 wrote: Thank you everyone for such helpful responses! Actually, I have one more question. Does anybody have experience with closed source version control software? If so, why did you buy it instead of

Re: Version Control Software

2013-06-13 Thread rusi
On Jun 13, 7:30 am, Ben Finney ben+pyt...@benfinney.id.au wrote: You should be wary of GitHub, a very popular Git hosting site. It uses what amount to proprietary protocols, which encourage using GitHub's specific interface instead of native Git for your operations and hide a lot of the

Re: A certainl part of an if() structure never gets executed.

2013-06-13 Thread rusi
On Jun 12, 8:20 pm, Zero Piraeus sche...@gmail.com wrote: : On 12 June 2013 10:55, Neil Cerutti ne...@norwich.edu wrote: He's definitely trolling. I can't think of any other reason to make it so hard to kill-file himself. He's not a troll, he's a help vampire:  

Re: My son wants me to teach him Python

2013-06-13 Thread rusi
On Jun 13, 12:46 am, John Ladasky john_lada...@sbcglobal.net wrote: Hi folks, My son is 17 years old.  He just took a one-year course in web page design at his high school.  HTML is worth knowing, I suppose, and I think he has also done a little Javascript.  He has expressed an interest in

Re: My son wants me to teach him Python

2013-06-13 Thread rusi
On Jun 13, 6:07 pm, Roy Smith r...@panix.com wrote: In article 545a441b-0c2d-4b1e-82ae-024b011a4...@e1g2000pbo.googlegroups.com,  rusi rustompm...@gmail.com wrote: Python is at least two things, a language and a culture. This is true of all languages.  Hang out on the PHP, Ruby, Python

Re: Wrong website loaded when other requested

2013-06-13 Thread rusi
On Jun 13, 7:28 pm, Chris Angelico ros...@gmail.com wrote: On Fri, Jun 14, 2013 at 12:23 AM, Íéêüëáïò Êïýñáò supp...@superhost.gr wrote: Please suggest something of why this happnes. You remind me of George. http://www.chroniclesofgeorge.com/ ChrisA HA! You are evil -- Chris! --

Re: My son wants me to teach him Python

2013-06-13 Thread rusi
On Jun 13, 9:50 pm, Tomasz Rola rto...@ceti.pl wrote: I've reposted on another list and got this reply. At first I was sceptic a bit, but for the sake of completeness, here goes. Processing language seems to be interesting in its own right. Examples are Java-flavoured, images are ok.

Re: Python biases [was Re: My son wants me to teach him Python]

2013-06-13 Thread rusi
On Jun 14, 5:44 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Thu, 13 Jun 2013 06:37:34 -0700, rusi wrote: Python-the-language has strengths that are undermined by the biases in the culture of Python. This implies that there are strengths in Python-the-language which

Re: Creating a Super Simple WWW Link, Copy, Paste into Spreadsheet Program

2013-06-13 Thread rusi
On Jun 14, 12:28 am, buford.lum...@gmail.com wrote: Hi, I'm new to Python. Would someone be able to write me and/or to show me how to write a simple program that: 1-follows a hyperlink from MS Excel to the internet (one of many links like this,http://www.zipdatamaps.com/76180, for e.g.) and

Re: Don't feed the troll... (was: Re: A few questiosn about encoding)

2013-06-14 Thread rusi
On Jun 14, 3:20 pm, Fábio Santos fabiosantos...@gmail.com wrote: Come on now, this is _so_ obviously trolling, it's not even remotely funny anymore. Why doesn't killfiling work with the mailing list version of the python list? :-( I have skimmed the archives for this month, and I estimate

Re: Don't feed the help-vampire

2013-06-14 Thread rusi
On Jun 14, 4:51 pm, rusi rustompm...@gmail.com wrote: On Jun 14, 3:20 pm, Fábio Santos fabiosantos...@gmail.com wrote: Come on now, this is _so_ obviously trolling, it's not even remotely funny anymore. Why doesn't killfiling work with the mailing list version of the python list

Re: Debugging memory leaks

2013-06-14 Thread rusi
On Jun 13, 6:24 am, writeson doug.farr...@gmail.com wrote: Anyway, my real question is how to go about debugging memory leak problems in Python, particularly for a long running server process written with Twisted. I'm not sure how to use heapy or guppy, and objgraph doesn't tell me enough to

Re: Debugging memory leaks

2013-06-14 Thread rusi
On Jun 14, 1:15 am, Giorgos Tzampanakis giorgos.tzampana...@gmail.com wrote: Am I the only one who thinks this is terrible advice? I would expect a typical desktop app to run for a couple of hours -- maybe a couple of days. Living with a small (enough) leak there may be ok. [In particular I

Re: A certainl part of an if() structure never gets executed.

2013-06-14 Thread rusi
On Jun 14, 6:48 pm, Zero Piraeus sche...@gmail.com wrote: : On 14 June 2013 09:07, Nick the Gr33k supp...@superhost.gr wrote: Thanks for explaining this but i cannot follow its logic at all. My mind is stuck trying to interpret it as an English sentence: if ('Parker' and 'May' and

Re: Wrong website loaded when other requested

2013-06-14 Thread rusi
On Jun 14, 8:37 pm, Nick the Gr33k supp...@superhost.gr wrote: PLEASE SUGGEST SOMETHING! A lollipop maybe? -- http://mail.python.org/mailman/listinfo/python-list

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread rusi
On Jun 14, 9:09 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Fri, 14 Jun 2013 11:14:16 +0100, Robert Kern wrote: On 2013-06-14 10:50, Nick the Gr33k wrote: [snip question] This is all iw ant to know. This is all you need to read:    

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread rusi
On Jun 14, 11:03 pm, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Op 14-06-13 18:09, Steven D'Aprano schreef: On Fri, 14 Jun 2013 11:14:16 +0100, Robert Kern wrote: On 2013-06-14 10:50, Nick the Gr33k wrote: [snip question] This is all iw ant to know. This is all you

Re: Debugging memory leaks

2013-06-14 Thread rusi
On Jun 15, 5:16 am, Ben Finney ben+pyt...@benfinney.id.au wrote: rusi rustompm...@gmail.com writes: On Jun 14, 1:15 am, Giorgos Tzampanakis giorgos.tzampana...@gmail.com wrote: Am I the only one who thinks this is terrible advice? I would expect a typical desktop app to run for a couple

Re: Pattern Search Regular Expression

2013-06-15 Thread rusi
On Jun 15, 3:55 pm, Mark Lawrence breamore...@yahoo.co.uk wrote: On 15/06/2013 11:24, Denis McMahon wrote: On Sat, 15 Jun 2013 10:05:01 +, Steven D'Aprano wrote: On Sat, 15 Jun 2013 02:42:55 -0700, subhabangalore wrote: Dear Group, I am trying to search the following

Re: Debugging memory leaks

2013-06-15 Thread rusi
On Jun 15, 4:23 pm, Ben Finney ben+pyt...@benfinney.id.au wrote: rusi rustompm...@gmail.com writes: On Jun 15, 5:16 am, Ben Finney ben+pyt...@benfinney.id.au wrote: Is a web browser a “typical desktop app”? A filesystem browser? An instant messenger? A file transfer application

Re: Don't feed the troll...

2013-06-15 Thread rusi
On Jun 15, 10:30 pm, Nick the Gr33k supp...@superhost.gr wrote: You are spamming my thread. With you as our spamming-guru, Onward! Sky is the limit! -- http://mail.python.org/mailman/listinfo/python-list

Re: RFD: rename comp.lang.python to comp.support.superhost

2013-06-15 Thread rusi
On Jun 15, 10:29 pm, Nick the Gr33k supp...@superhost.gr wrote: On 15/6/2013 8:11 μμ, Chris “Kwpolska” Warrick wrote: On Fri, Jun 14, 2013 at 5:25 AM, alex23 wuwe...@gmail.com wrote: On Jun 14, 2:24 am, Νικόλαος Κούρας supp...@superhost.gr wrote: iam researchign a solution to this

Re: Don't feed the troll...

2013-06-15 Thread rusi
On Jun 15, 10:52 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Sat, 15 Jun 2013 10:36:00 -0700, rusi wrote: With you as our spamming-guru, Onward! Sky is the limit! If you're going to continue making unproductive, off-topic, inflammatory posts that prolong these already

Re: Version Control Software

2013-06-15 Thread rusi
On Jun 16, 4:14 am, Chris Angelico ros...@gmail.com wrote: On Sun, Jun 16, 2013 at 12:16 AM, Roy Smith r...@panix.com wrote: The advantage of DVCS is that everybody has a full copy of the repo. The disadvantage of the DVCS is that every MUST have a full copy of the repo.  When a repo gets

Re: on git gc --aggressive [was Re: Version Control Software]

2013-06-16 Thread rusi
On Jun 16, 7:09 pm, Jason Swails jason.swa...@gmail.com wrote: On Sat, Jun 15, 2013 at 11:55 PM, rusi rustompm...@gmail.com wrote: On Jun 16, 4:14 am, Chris Angelico ros...@gmail.com wrote: On Sun, Jun 16, 2013 at 12:16 AM, Roy Smith r...@panix.com wrote: The advantage of DVCS

Re: Don't feed the troll...

2013-06-16 Thread rusi
On Jun 16, 12:54 am, ru...@yahoo.com wrote: ... killfile him and shut the fuck up. Ok. Advice taken. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python API

2013-06-17 Thread rusi
On Jun 17, 11:38 am, Ganesh Pandi guruganes...@gmail.com wrote: Hi         What are all the python api, u used in your python programming, we used more api but may we forgot those, so i just want to list down the api we familiar aboutplease add your replies... Maybe you

Re: weird behavior. bug perhaps?

2013-06-18 Thread rusi
On Jun 18, 7:23 pm, zoom z...@yahoo.com wrote: Hi, I have a strange problem here. Perhaps someone would care to help me. In the file test.py I have the following code: from scipy import matrix, tile, mean, shape import unittest class TestSequenceFunctions(unittest.TestCase):      def

Re: weird behavior. bug perhaps?

2013-06-19 Thread rusi
On Jun 18, 8:31 pm, zoom z...@yahoo.com wrote: yes, that's the hing. thanks a lot FYI this happens because   shape(mean(m,1)) (4, 1)   shape(mean(array(m),1)) (4,) thanks again And thank you for the 'Thank you' !! Given the noob-questions the list is currently dealing with, your

Re: Writing Extensions for Python 3 in C

2013-06-19 Thread rusi
On Jun 18, 3:24 pm, Aditya Avinash adityaavinash...@gmail.com wrote: Hi. This is the last place where I want to ask a question. I have searched for lots of tutorials and documentation on the web but, didn't find a decent one to develop extensions for Python 3 using a custom compiler (mingw32,

Re: A Beginner's Doubt

2013-06-19 Thread rusi
On Jun 19, 9:53 pm, Joshua Landau joshua.landau...@gmail.com wrote: Please be aware, Augusto, that Rick is known to be a bit... OTT. Don't take him too seriously (but he's not an idiot either). On 19 June 2013 14:58,  augusto...@gmail.com wrote: Hello! This is my first post in this group

Re: Default Value

2013-06-20 Thread rusi
On Jun 20, 12:38 am, Rick Johnson rantingrickjohn...@gmail.com wrote: On Wednesday, June 19, 2013 2:17:35 PM UTC-5, Ahmed Abdulshafy wrote: I'm reading the Python.org tutorial right now, and I found this part rather strange and incomprehensible to me Important warning: The default value is

Re: Default Value

2013-06-20 Thread rusi
On Jun 20, 6:19 pm, Roy Smith r...@panix.com wrote: In article 447dd1c6-1bb2-4276-a109-78d7a067b...@d8g2000pbe.googlegroups.com,  rusi rustompm...@gmail.com wrote: def f(a, L=[]):     L.append(a)     return L Every language has gotchas. This is one of python's. One of our pre

Re: Default Value

2013-06-20 Thread rusi
You know Rick, you are good at python, you are better at polemics. If only you would cut the crap I would (be able to) agree with you. See below On Jun 20, 7:49 pm, Rick Johnson rantingrickjohn...@gmail.com wrote: On Thursday, June 20, 2013 7:57:06 AM UTC-5, rusi wrote: Every language has

Re: Default Value

2013-06-20 Thread rusi
On Jun 20, 10:19 pm, Chris Angelico ros...@gmail.com wrote: On Fri, Jun 21, 2013 at 3:12 AM, rusi rustompm...@gmail.com wrote: Python (and all the other 'cool' languages) dont have gotchas because someone malevolently put them there. In most cases, the problem is seen too late and the cost

Re: Default Value

2013-06-20 Thread rusi
On Jun 20, 10:57 pm, Ian Kelly ian.g.ke...@gmail.com wrote: If the goal is indeed to make the the functions more functional, then the proper solution would be to keep the binding early but just disallow mutable defaults altogether -- which is tricky to achieve in Python, so we simply emulate

Re: Don't feed the troll...

2013-06-21 Thread rusi
On Friday, June 21, 2013 9:49:01 PM UTC+5:30, Ian wrote: The level of hospitality is already decreasing for me. That's why I'm speaking up. I believe that this can be a point of unanimity -- The level of hospitality having gone down enough, I felt the need to speak up. And with the

Re: Default Value

2013-06-21 Thread rusi
On Saturday, June 22, 2013 6:57:42 AM UTC+5:30, Ian wrote: While we're at it, I would like to petition for a function terminates(f, args) that I can use to determine whether a function will terminate before I actually call it. I was going to say something about this -- viz that in prog.

Re: Default Value

2013-06-21 Thread rusi
On Saturday, June 22, 2013 7:34:18 AM UTC+5:30, MRAB wrote: Pure functional languages don't have mutables, or even variables, but then we're not talking about a pure functional language, we're talking about Python. In which case neither do mathematicians. Do we rewrite the last 1000 years of

Re: Default Value

2013-06-22 Thread rusi
On Saturday, June 22, 2013 8:25:15 AM UTC+5:30, Rick Johnson wrote: On Friday, June 21, 2013 9:32:43 PM UTC-5, rusi wrote: So Rick... I agree with you... all these theoreticians should be burnt at the stake! On a more serious note: many people make similar mistakes eg Haskellers who

Re: Default Value

2013-06-22 Thread rusi
On Saturday, June 22, 2013 8:37:20 PM UTC+5:30, Rick Johnson wrote: So for example, if the use-case contained a statement like: In order to safeguard customer-satisfaction, the ATM's performance shall not degrade beyond 3 seconds response time. So now - according to our methodology - we

Re: Default Value

2013-06-22 Thread rusi
On Saturday, June 22, 2013 8:37:20 PM UTC+5:30, Rick Johnson wrote: I sorry, but FP is not going to wash our sins clean. In fact, if taken too seriously, FP leads to preaching professors, intellectually unstimulated students, and semesters of wasted time that could have been better spent

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

Re: Python development tools

2013-06-23 Thread rusi
On Monday, June 24, 2013 4:48:35 AM UTC+5:30, ru...@yahoo.com wrote: On 06/23/2013 02:40 PM, cutems93 wrote: 1. Automated Refactoring Tools I wish. Here's pydev [python ide in eclipse] http://pydev.org/manual_adv_refactoring.html Note Ive never managed to get it running! --

Re: Making a pass form cgi = webpy framework

2013-06-23 Thread rusi
On Monday, June 24, 2013 10:07:57 AM UTC+5:30, Michael Torrie wrote: On 06/23/2013 07:44 PM, Νίκος wrote: Why use mako's approach which requires 2 files(an html template and the actual python script rendering the data) when i can have simple print statements inside 1 files(my files.py

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

<    4   5   6   7   8   9   10   >