Re: avoid the redefinition of a function

2012-09-12 Thread D'Arcy Cain
On Wed, 12 Sep 2012 14:56:12 +0200 Jabba Laci jabba.l...@gmail.com wrote: This will call the 2nd function. Now my functions are called step_ID (like step_27(), step_28(), etc.). How to avoid the danger of redefinition? Now, when I write a new function, I search for its name to see if it's

Re: avoid the redefinition of a function

2012-09-12 Thread D'Arcy Cain
On Wed, 12 Sep 2012 18:56:46 +0200 Jabba Laci jabba.l...@gmail.com wrote: (5) install mc You can type just 5 as user input and step_5() is called automatically. If I use descriptive names like install_java() then selecting a menu point would be more difficult. And I don't want users to type

Re: avoid the redefinition of a function

2012-09-12 Thread D'Arcy Cain
On Wed, 12 Sep 2012 16:37:11 -0400 Terry Reedy tjre...@udel.edu wrote: assures one that the test is being run. (I don't always test first, but I once discovered a test not being run when I modified it in a way that should have made it fail, but it didn't.) 1. Write the test 2. Run the test -

Re: avoid the redefinition of a function

2012-09-12 Thread D'Arcy Cain
On Wed, 12 Sep 2012 18:04:51 GMT Alister alister.w...@ntlworld.com wrote: No No NO! you cant just pass user input to system calls without validating it first (google sql injection for examples of the damage unsanitised input can cause, it is not just as SQL problem) http://xkcd.com/327/ --

Re: avoid the redefinition of a function

2012-09-12 Thread D'Arcy Cain
On Wed, 12 Sep 2012 17:45:52 -0500 Tim Chase python.l...@tim.thechases.com wrote: On 09/12/12 16:47, D'Arcy Cain wrote: And run all of your tests every day. You will sleep better at night. Though I usually try to do test-driven development, I confess a fondness for Titus Brown's Stupidity

Re: Is that safe to use ramdom.random() for key to encrypt?

2012-06-20 Thread D'Arcy Cain
On 12-06-20 11:18 AM, elvis-85...@notatla.org.uk wrote: On 2012-06-17, Jon Clementsjon...@googlemail.com wrote: Whatever you do - *do not* attempt to write your own algorithm. very true As they say, random number generation is too important to be left to chance. :-) -- D'Arcy J.M. Cain

Re: [newbie] Equivalent to PHP?

2012-06-12 Thread D'Arcy Cain
On 12-06-12 06:36 AM, Gilles wrote: I enjoy writing scripts in Python much more than PHP, but with so many sites written in PHP, I need to know what major benefits there are in choosing Python (or Ruby, ie. not PHP). I think that you just answered your own question in the first line of that

Re: [newbie] Equivalent to PHP?

2012-06-12 Thread D'Arcy Cain
On 12-06-12 07:57 PM, Gilles wrote: On Tue, 12 Jun 2012 07:42:56 -0400, D'Arcy Cainda...@druid.net wrote: I guess I am in the minority then. I do plan to turn one of my larger projects into a standalone web server some day but so far writing simple Python CGI scripts has served me fine. I

Re: Smallest/cheapest possible Python platform?

2012-05-26 Thread D'Arcy Cain
On 12-05-26 05:32 PM, Paul Rubin wrote: Roy Smithr...@panix.com writes: It sounds like I can run one on 300mA @ 5V. For my application, I'll have about 10 A-h available at 12V (motorcycle battery). OK, the RPi should be fine power-wise in that case, though I wouldn't consider something with

Re: How do I find out what file an import is using?

2012-05-09 Thread D'Arcy Cain
On 12-05-09 01:52 PM, Rob Richardson wrote: I am trying to work with a Python script someone else wrote. The script includes the line from Level3Utils import * I need to look at the functions that are included in that import. In an effort to identify exactly which file is being

Re: f python?

2012-04-08 Thread D'Arcy Cain
On 04/08/12 09:11, HoneyMonster wrote: Well, I certainly shall not be reading - or even seeing - any more of his drivel. Yes you will. There is always someone willing to include his entire messages for a one line reply. It's always September somewhere. -- D'Arcy J.M. Cain da...@druid.net

Re: No os.copy()? Why not?

2012-04-03 Thread D'Arcy Cain
On 03/28/12 16:12, John Ladasky wrote: I'm looking for a Python (2.7) equivalent to the Unix cp command. Since the equivalents of rm and mkdir are in the os module, I figured I look there. I haven't found anything in the documentation. I am also looking through the Python source code in os.py

Re: your feedback to my first project please

2012-01-11 Thread D'Arcy Cain
On 12-01-08 02:46 PM, patr...@bierans.de wrote: Thanks for the feedback! You're welcome. D'Arcy wrote: [code examples] But I will keep some of my underscores for private attributes and methods. And I googled: dim was basic. I know too many languages and start mixing the keywords - shame on

Re: your feedback to my first project please

2012-01-07 Thread D'Arcy Cain
On 12-01-07 07:10 AM, patr...@bierans.de wrote: It's my first script in python and I'd like to know if my way of coding so far is right and if YOU have some little tips for me or if you can point my nose on some things I've missed so far. Looks pretty good overall. I have a little armchair

Re: python philosophical question - strong vs duck typing

2012-01-03 Thread D'Arcy Cain
On 12-01-03 01:13 PM, Sean Wolfe wrote: Hello everybody, I'm a happy pythonista newly subscribed to the group. Welcome. The question is, given this possibility, would this get us closer to being able to compile down to a language like C or C++? That's a question. The question is do you

Re: MOST COMMON QUESTIONS ASKED BY NON-MUSLIMS ?????????

2012-01-03 Thread D'Arcy Cain
On 12-01-03 01:24 PM, gene heskett wrote: The solution is to chop the link between google.groups and this list. But that subject has been declared verboten. Too much inconvenience to ask the googlers to subscribe to the real list I guess. Because my spamassassin Perhaps they just need to be

Re: MOST COMMON QUESTIONS ASKED BY NON-MUSLIMS ?????????

2012-01-03 Thread D'Arcy Cain
On 12-01-03 02:24 PM, Benjamin Kaplan wrote: :0 Hir * ^List-Id:.*python-list.python.org * ^From:.*@gmail.com * ^Newsgroups:.* /dev/null -- Wouldn't that just kill everything sent from a gmail account? That's not the same thing as Google Groups. The mailing list posts, at least, have an

<    1   2