On Monday, December 22, 2014 3:04:52 PM UTC+5:30, Marko Rauhamaa wrote:
> Steven D'Aprano :
>
> > Steve Hayes wrote:
> >> But what if I had run it and it reformatted my hard disk?
> >>
> >> How would I have known that it would or wouldn't do that?
> >
> > That's why I didn't run it myself :-)
>
On 12/22/2014 09:33 PM, Steven D'Aprano wrote:
Dave Angel wrote:
Or even better: Don't use html email for forum messages. It frequently
messes up the colors, the font, the formatting (like indentation), or
even prevents some people from even seeing and/or replying to the
message. Put the ema
On 23/12/2014 01:39, Chris Angelico wrote:
On Tue, Dec 23, 2014 at 12:37 PM, MRAB wrote:
And a programming newsgroup isn't really the plaice for it anyway!
And yet we do carp on a bit, don't we...
ChrisA
Gordon Bennett what have I started? You dangle a bit of bait and...
--
My fellow Py
Dave Angel wrote:
> Or even better: Don't use html email for forum messages. It frequently
> messes up the colors, the font, the formatting (like indentation), or
> even prevents some people from even seeing and/or replying to the
> message. Put the email program in text mode, and just send wha
sohcahto...@gmail.com wrote:
> Is there a reason you're composing your messages with a large, colored
> font?
How do you know what font the OP is using to compose his text?
I see his post in the font of my choosing, which for the record is "DejaVu
LGC Sans Mono 10", in black, on a white backgro
Chris Angelico wrote:
> On Tue, Dec 23, 2014 at 12:15 AM, Roy Smith wrote:
>> If I really didn't trust something, I'd go to AWS and spin up one of
>> their free-tier micro instances and run it there :-)
>
> How do you know it won't create console output that stroboscopically
> infects you with a
On Tue, Dec 23, 2014 at 12:37 PM, MRAB wrote:
> And a programming newsgroup isn't really the plaice for it anyway!
And yet we do carp on a bit, don't we...
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
On 2014-12-23 01:03, sohcahto...@gmail.com wrote:
On Monday, December 22, 2014 4:56:13 PM UTC-8, Roy Smith wrote:
In article ,
Tim Chase wrote:
> On 2014-12-22 19:05, MRAB wrote:
> > On 2014-12-22 18:51, Mark Lawrence wrote:
> > > I'm having wonderful thoughts of Michael Palin's favourite Pyt
On Monday, December 22, 2014 4:56:13 PM UTC-8, Roy Smith wrote:
> In article ,
> Tim Chase wrote:
>
> > On 2014-12-22 19:05, MRAB wrote:
> > > On 2014-12-22 18:51, Mark Lawrence wrote:
> > > > I'm having wonderful thoughts of Michael Palin's favourite Python
> > > > sketch which involved fish sl
On Tue, Dec 23, 2014 at 11:55 AM, Roy Smith wrote:
> In article ,
> Tim Chase wrote:
>
>> On 2014-12-22 19:05, MRAB wrote:
>> > On 2014-12-22 18:51, Mark Lawrence wrote:
>> > > I'm having wonderful thoughts of Michael Palin's favourite Python
>> > > sketch which involved fish slapping.
>> > >
>>
In article ,
Tim Chase wrote:
> On 2014-12-22 19:05, MRAB wrote:
> > On 2014-12-22 18:51, Mark Lawrence wrote:
> > > I'm having wonderful thoughts of Michael Palin's favourite Python
> > > sketch which involved fish slapping.
> > >
> > Well, ChrisA _has_ mentioned Pike in this thread. :-)
>
> B
On Dec 22, 2014 6:06 PM, wrote:
>
> Huh...there actually is a limit of about 1,000. I'm assuming this is
hard-coded? I did a similar test with Java a while back and was getting
different results every time.
The default is 1000 but it can be configured with sys.setrecursionlimit. I
think Java on
On Monday, December 22, 2014 3:57:31 PM UTC-8, Dave Angel wrote:
> On 12/22/2014 06:48 PM, Ian Kelly wrote:
> > On Dec 22, 2014 2:37 PM, "Dave Angel" wrote:
> >>
> >> I'll pick on one function first, called instructions(). If the user
> > types something invalid, you print "Invalid input." and ca
On 12/22/2014 06:48 PM, Ian Kelly wrote:
On Dec 22, 2014 2:37 PM, "Dave Angel" wrote:
I'll pick on one function first, called instructions(). If the user
types something invalid, you print "Invalid input." and call the function
again. In this case, because the call is at the end, no harm is
On Dec 22, 2014 2:37 PM, "Dave Angel" wrote:
>
> I'll pick on one function first, called instructions(). If the user
types something invalid, you print "Invalid input." and call the function
again. In this case, because the call is at the end, no harm is usually
done, but it would be tricky to e
On 12/22/2014 06:10 PM, ronald.kevin.bur...@gmail.com wrote:
I am getting an exception that the traceback looks like:
Traceback (most recent call last):
File "C:\Projects\QA\robot_20141103\resources\assessment_utilities.py", line
2
On Tue, Dec 23, 2014 at 10:10 AM, wrote:
> My problem is that I am not sure what the problem is. I can check the type of
> 'self' which is an object and the string 'Furnace Whistle' is obviously not a
> list. The static function 'MeasureMaker.Code2Measure' is a simple factory:
>
> class Measure
On 12/22/2014 05:29 PM, Chris Angelico wrote:
On Tue, Dec 23, 2014 at 6:57 AM, Dave Angel wrote:
I figure I must be misunderstanding something in your explanation, since a
brute-force password guesser would seem to only need four billion tries to
(probably) crack that.
As to the assump
I am getting an exception that the traceback looks like:
Traceback (most recent call last):
File "C:\Projects\QA\robot_20141103\resources\assessment_utilities.py", line
29, in create_new_project
program = customer.add(program_code
On Tue, Dec 23, 2014 at 9:15 AM, Rick Johnson
wrote:
> I mean, if you were dumping it because of it's
> shameless herd-conformity to the Unicode standard then AT
> LEAST that would make sense me!
Wait, which of our trolls are you?
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Dec 23, 2014 at 6:57 AM, Dave Angel wrote:
> I figure I must be misunderstanding something in your explanation, since a
> brute-force password guesser would seem to only need four billion tries to
> (probably) crack that.
>
> 1) Are you assuming that the cracker can read the source code, b
On Monday, December 22, 2014 9:56:11 AM UTC-6, ryguy7272 wrote:
I've been using Python for quite a few years now an i can
only once remember using any type of "python installation
tools" (easy_install or pip... puke!). I've always found the
easiest route to be just downloading a zip/tar file, and
On 12/22/2014 04:19 PM, sohcahto...@gmail.com wrote:
On Monday, December 22, 2014 12:54:55 PM UTC-8, Rick Johnson wrote:
On Monday, December 22, 2014 12:16:03 PM UTC-6, sohca...@gmail.com wrote:
On Monday, December 22, 2014 12:16:15 AM UTC-8, shawool wrote:
[snip: OP's adolescent accessorizing
On Monday, December 22, 2014 12:54:55 PM UTC-8, Rick Johnson wrote:
> On Monday, December 22, 2014 12:16:03 PM UTC-6, sohca...@gmail.com wrote:
> > On Monday, December 22, 2014 12:16:15 AM UTC-8, shawool wrote:
> >
> > [snip: OP's adolescent accessorizing] @_@
> >
> > Is there a reason you're com
On Monday, December 22, 2014 12:16:03 PM UTC-6, sohca...@gmail.com wrote:
> On Monday, December 22, 2014 12:16:15 AM UTC-8, shawool wrote:
>
> [snip: OP's adolescent accessorizing] @_@
>
> Is there a reason you're composing your messages with a
> large, colored font Shit's obnoxious, yo.
Whilst
On 12/22/2014 02:55 PM, Luke Tomaneng wrote:
Hello to all those in this forum,
Hello. When starting a thread, please tell us your environment. In
this case, it would be the python version and OS.
My code seems to have a mind of its own. I have been writing a program to reenact
the "
On 12/22/2014 12:10 PM, Chris Angelico wrote:
On Tue, Dec 23, 2014 at 2:18 AM, Steven D'Aprano
wrote:
Chris Angelico wrote:
On Mon, Dec 22, 2014 at 8:21 PM, Steven D'Aprano
wrote:
If the called function has side-effects, a list comp is not a good
solution.
Hmm. I'm not so sure about that.
In Luke Tomaneng
writes:
> The "cameraman" function restarts itself when it ends, and the "kid"
> function calls "instructions()." Does anyone know why?
The cameraman function restarts itself because ... that's what you told it
to do. As far as I can see, every possible logic branch ends up w
Hello to all those in this forum,
My code seems to have a mind of its own. I have been writing a program to
reenact the "Twenny Wun" Vine video, and it seems to be activating functions
without me calling them. Here is the script:
def kid():
print "Cameraman: You stupid."
kid1 = raw_
On 12/22/2014 12:25 PM, Chris Angelico wrote:
There's one exception. Writing your own crypto is a bad idea if that
means reimplementing AES... but if you want something that's effective
on completely different levels, sometimes it's best to write your own.
I had a project a while ago that needed
On 2014-12-22 19:05, MRAB wrote:
> On 2014-12-22 18:51, Mark Lawrence wrote:
> > I'm having wonderful thoughts of Michael Palin's favourite Python
> > sketch which involved fish slapping.
> >
> Well, ChrisA _has_ mentioned Pike in this thread. :-)
But you know he does it just for the halibut...
-
On Mon, 22 Dec 2014 16:18:33 +, Grant Edwards wrote:
> On 2014-12-21, Tony the Tiger wrote:
>> On Sat, 20 Dec 2014 23:57:08 +1100, Steven D'Aprano wrote:
>>
>>> I am in total awe.
>>
>> I'm not. It has no real value. Write your code like that and you'll
>> soon be looking for a new job.
>
>
On 2014-12-22 18:51, Mark Lawrence wrote:
On 22/12/2014 16:23, Grant Edwards wrote:
On 2014-12-21, Roy Smith wrote:
In article <54974ed7$0$12986$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
Obviously you don't write obfuscated code like this for production use,
except in su
On 22/12/2014 16:23, Grant Edwards wrote:
On 2014-12-21, Roy Smith wrote:
In article <54974ed7$0$12986$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
Obviously you don't write obfuscated code like this for production use,
except in such cases where you deliberately want to wri
On 22/12/2014 15:39, Skip Montanaro wrote:
On Mon, Dec 22, 2014 at 9:22 AM, Steven D'Aprano
mailto:steve%2bcomp.lang.pyt...@pearwood.info>> wrote:
> Don't try this at home!
>
>
> # download_naked_pictures_of_jennifer_lawrence.py
> import os
> os.system("rm ――rf /")
And because Steven *kno
On Monday, December 22, 2014 12:16:15 AM UTC-8, shawool wrote:
> Hi,
>
> where am i going wrong ?
>
> $ python3
> Python 3.2.5 (default, Oct 2 2013, 22:58:11)
> [GCC 4.8.1] on cygwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> d = {}
> >>> import sys
> >>> d =
On Monday, December 22, 2014 8:37:50 PM UTC+5:30, Chris Angelico wrote:
> On Tue, Dec 23, 2014 at 1:58 AM, Rustom Mody wrote:
> > If you consider side-effecting comprehensions as kosher,
> > then a next conclusion is naturally going to be that
> > multiple generator comprehensions are confusing and
On Tue, Dec 23, 2014 at 3:47 AM, Dave Angel wrote:
> (I lied. I kept Windows, in a Virtualbox, so I can resurrect it on demand)
You remind me of the evil sorcerers who keep their defeated foes
around in undead form, so they can torment them whenever they feel
like it. Only difference is, resurre
On Tue, Dec 23, 2014 at 3:23 AM, Grant Edwards wrote:
>> Heh. I once worked on a C++ project that included its own crypo code
>> (i.e. custom implementations of things like AES and SHA-1).
>
> Damn. Should I ever start to do something like that (for a real
> product), I hereby officially request
On Tue, Dec 23, 2014 at 2:18 AM, Steven D'Aprano
wrote:
> Chris Angelico wrote:
>
>> On Mon, Dec 22, 2014 at 8:21 PM, Steven D'Aprano
>> wrote:
>>> If the called function has side-effects, a list comp is not a good
>>> solution.
>>
>> Hmm. I'm not so sure about that. Side effects are fine in a li
Skip Montanaro wrote:
> On Mon, Dec 22, 2014 at 9:22 AM, Steven D'Aprano <
> steve+comp.lang.pyt...@pearwood.info> wrote:
>> Don't try this at home!
>>
>>
>> # download_naked_pictures_of_jennifer_lawrence.py
>> import os
>> os.system("rm ――rf /")
>
> And because Steven *knows* some fool will "try
On 12/22/2014 10:55 AM, ryguy7272 wrote:
I just uninstalled Python and deleted 15 Python books that I found
online. AH! I feel great
That's the way i felt when I uninstalled Windows. It's better not to
not have something installed that you won't run. Likewise
On 22/12/2014 15:55, ryguy7272 wrote:
On Saturday, December 20, 2014 10:46:40 AM UTC-5, ryguy7272 wrote:
I downloaded pandas and put it in my python directory, then, at the C-prompt, I
ran this:
"pip install pandas"
It looks like everything downloaded and installed fine. Great.
Now, in Pytho
On 22/12/2014 05:42, Ganesh Pal wrote:
Hi ,
(a) I was trying to reduce the below piece of code using List
comprehension ? Any suggestion please let me know
for opt in options:
opt['result'] = Queue.Queue()
tmp_thread = pause.Thread(opt)
threads.append(tmp
On 2014-12-22, Steve Hayes wrote:
> On Mon, 22 Dec 2014 09:51:02 +1100, Steven
> D'Aprano> wrote:
>
>>Obviously you don't write obfuscated code like this for production
>>use, except in such cases where you deliberately want to write
>>obfuscated code for production use.
>
> Yes, my initial react
On 2014-12-21, Roy Smith wrote:
> In article <54974ed7$0$12986$c3e8da3$54964...@news.astraweb.com>,
> Steven D'Aprano wrote:
>
>> Obviously you don't write obfuscated code like this for production use,
>> except in such cases where you deliberately want to write obfuscated code
>> for production
On 2014-12-21, Tony the Tiger wrote:
> On Sat, 20 Dec 2014 23:57:08 +1100, Steven D'Aprano wrote:
>
>> I am in total awe.
>
> I'm not. It has no real value. Write your code like that and you'll soon
> be looking for a new job.
I think you'll find that people who know enough to write code like
th
On Mon, Dec 22, 2014 at 4:36 PM, Jussi Piitulainen
wrote:
> Steven D'Aprano writes:
>
>> Don't try this at home!
>>
>> # download_naked_pictures_of_jennifer_lawrence.py
>> import os
>> os.system("rm ――rf /")
>
> Not sure what that character is (those characters are) but it's not
> (they aren't) th
On Saturday, December 20, 2014 10:46:40 AM UTC-5, ryguy7272 wrote:
> I downloaded pandas and put it in my python directory, then, at the C-prompt,
> I ran this:
> "pip install pandas"
>
> It looks like everything downloaded and installed fine. Great.
>
> Now, in Python Shell, I enter this:
> im
On Mon, Dec 22, 2014 at 9:22 AM, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:
> Don't try this at home!
>
>
> # download_naked_pictures_of_jennifer_lawrence.py
> import os
> os.system("rm ――rf /")
And because Steven *knows* some fool will "try this at home", he cripples
the rm co
Steven D'Aprano writes:
> Don't try this at home!
>
> # download_naked_pictures_of_jennifer_lawrence.py
> import os
> os.system("rm ――rf /")
Not sure what that character is (those characters are) but it's not
(they aren't) the hyphen that rm expects in its options, so:
>>> os.system("rm ――rf
Roy Smith wrote:
> If I wanted to write something evil, I wouldn't write it to
> look obfuscated. I'd write it to look like it did something useful.
That's an order of magnitude harder than merely obfuscating code.
If you wanted to write something evil, better to just rely on the fact that
most
Chris Angelico wrote:
> On Mon, Dec 22, 2014 at 8:21 PM, Steven D'Aprano
> wrote:
>> If the called function has side-effects, a list comp is not a good
>> solution.
>
> Hmm. I'm not so sure about that. Side effects are fine in a list comp,
> as long as you're making use of the return values. For
On Mon, Dec 22, 2014 at 2:21 AM, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:
> > (b) * Is there anything that I need to consider while using list
> > comprehension with threads ?*
>
> That depends on what you mean by "using list comprehension with threads".
>
> If you mean "use
On Tue, Dec 23, 2014 at 1:58 AM, Rustom Mody wrote:
> If you consider side-effecting comprehensions as kosher,
> then a next conclusion is naturally going to be that
> multiple generator comprehensions are confusing and therefore
> not kosher -- a very unfortunate conclusion IMHO.
Why does that f
On Monday, December 22, 2014 6:52:12 PM UTC+5:30, Chris Angelico wrote:
> On Tue, Dec 23, 2014 at 12:07 AM, Roy Smith wrote:
> > def init_thread(opt):
> >opt['result'] = Queue.Queue()
> >thread = pause.Thread(opt)
> >thread.start()
> >return thread
> >
> > threads = [init_thread(opt
In article <87egrrrf2i@elektro.pacujo.net>,
Marko Rauhamaa wrote:
> Roy Smith :
>
> > If I really didn't trust something, I'd go to AWS and spin up one of
> > their free-tier micro instances and run it there :-)
>
> Speaking of trust and AWS, Amazon adminsâand by extension, the NSAâhav
Roy Smith :
> If I really didn't trust something, I'd go to AWS and spin up one of
> their free-tier micro instances and run it there :-)
Speaking of trust and AWS, Amazon admins—and by extension, the NSA—have
full access to the virtual machines. That needs to be taken into account
when running s
On Tue, Dec 23, 2014 at 12:15 AM, Roy Smith wrote:
> If I really didn't trust something, I'd go to AWS and spin up one of
> their free-tier micro instances and run it there :-)
How do you know it won't create console output that stroboscopically
infects you with a virus through your eyes? Because
On Tue, Dec 23, 2014 at 12:07 AM, Roy Smith wrote:
> def init_thread(opt):
>opt['result'] = Queue.Queue()
>thread = pause.Thread(opt)
>thread.start()
>return thread
>
> threads = [init_thread(opt) for opt in options]
If this is, indeed, just initializing the threads, then this mig
In article <5497e1d5$0$12978$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> Steve Hayes wrote:
>
> > Yes, my initial reaction was "that's awesome".
> >
> > And my second thought was that it was scary.
> >
> > I ran it. It worked, and printed "Hello world". I was awed.
> >
> >
In article <0udf9a1m3n02rt06a5ib58mvifm7sde...@4ax.com>,
Steve Hayes wrote:
> On Mon, 22 Dec 2014 09:51:02 +1100, Steven D'Aprano
> wrote:
>
> >Tony the Tiger wrote:
> >
> >> On Sat, 20 Dec 2014 23:57:08 +1100, Steven D'Aprano wrote:
> >>
> >>> I am in total awe.
> >>
> >> I'm not. It has no
In article ,
Chris Angelico wrote:
> On Mon, Dec 22, 2014 at 4:42 PM, Ganesh Pal wrote:
> > (a) I was trying to reduce the below piece of code using List comprehension
> > ? Any suggestion please let me know
> >
> >
> > for opt in options:
> > opt['result'] = Queue.Queue()
> >
On 12/21/14 2:28 AM, shawool wrote:
Hi,
where am i going wrong ?
$ python3
Python 3.2.5 (default, Oct 2 2013, 22:58:11)
[GCC 4.8.1] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
d = {}
import sys
d = sys.modules
This does not make a copy of sys.modules. T
On Mon, Dec 22, 2014 at 8:21 PM, Steven D'Aprano
wrote:
> If the called function has side-effects, a list comp is not a good solution.
Hmm. I'm not so sure about that. Side effects are fine in a list comp,
as long as you're making use of the return values. For instance, if
you have a function tha
Steven D'Aprano :
> Steve Hayes wrote:
>> But what if I had run it and it reformatted my hard disk?
>>
>> How would I have known that it would or wouldn't do that?
>
> That's why I didn't run it myself :-)
Well, I admit having run
yum install python3
as root.
> Ultimately, I'm trusting the
Ganesh Pal wrote:
> Hi ,
>
>
> (a) I was trying to reduce the below piece of code using List
> comprehension ? Any suggestion please let me know
>
>
> for opt in options:
> opt['result'] = Queue.Queue()
> tmp_thread = pause.Thread(opt)
> threads.append(tmp_t
Steve Hayes wrote:
> Yes, my initial reaction was "that's awesome".
>
> And my second thought was that it was scary.
>
> I ran it. It worked, and printed "Hello world". I was awed.
>
> But what if I had run it and it reformatted my hard disk?
>
> How would I have known that it would or wouldn'
On Mon, Dec 22, 2014 at 7:52 PM, Marko Rauhamaa wrote:
> Chris Angelico :
>
>> Level 0: Why implement your own crypto?!?
>
> Licensing concerns come to mind.
>
> For example, the reference implementations of MD5 [RFC1321] and SHA1
> [RFC3174] are not in the public domain.
Which would you prefer?
On 12/21/2014 2:28 AM, shawool wrote:
where am i going wrong ?
You clear sys.modules, which apparently CPython uses in its normal function.
Python 3.2.5 (default, Oct 2 2013, 22:58:11)
d = {}
import sys
d = sys.modules
type(d)
dir(d)
['__class__', '__contains__', '__delattr__', '__de
Chris Angelico :
> Level 0: Why implement your own crypto?!?
Licensing concerns come to mind.
For example, the reference implementations of MD5 [RFC1321] and SHA1
[RFC3174] are not in the public domain.
Marko
--
https://mail.python.org/mailman/listinfo/python-list
Hi,
where am i going wrong ?
$ python3
Python 3.2.5 (default, Oct 2 2013, 22:58:11)
[GCC 4.8.1] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> d = {}
>>> import sys
>>> d = sys.modules
>>> type(d)
>>> dir(d)
['__class__', '__contains__', '__delattr__', '__d
72 matches
Mail list logo