On Friday, January 9, 2015 at 3:47:27 AM UTC-8, mubarak idris wrote:
> Please how can I make an .exe executable app out of my python script easily
http://www.py2exe.org/
--
https://mail.python.org/mailman/listinfo/python-list
Please how can I make an .exe executable app out of my python script easily
--
https://mail.python.org/mailman/listinfo/python-list
On 2015-01-08, Michael Torrie wrote:
> On 01/08/2015 10:02 AM, Steve Hayes wrote:
>> On 08 Jan 2015 12:43:33 GMT, alb...@spenarnc.xs4all.nl (Albert van der Horst)
>> wrote:
>>
>>> I don't trust sudo because it is too complicated. (To the point that
>>> I removed it from my machine.) I do
>>
>> H
On 01/08/2015 10:02 AM, Steve Hayes wrote:
> On 08 Jan 2015 12:43:33 GMT, alb...@spenarnc.xs4all.nl (Albert van der Horst)
> wrote:
>
>> I don't trust sudo because it is too complicated.
>> (To the point that I removed it from my machine.)
>> I do
>
> How do you do that?
>
> I avoided Ubuntu bec
On Fri, Jan 9, 2015 at 4:02 AM, Steve Hayes wrote:
> On 08 Jan 2015 12:43:33 GMT, alb...@spenarnc.xs4all.nl (Albert van der Horst)
> wrote:
>
>>I don't trust sudo because it is too complicated.
>>(To the point that I removed it from my machine.)
>>I do
>
> How do you do that?
>
> I avoided Ubuntu
On 08 Jan 2015 12:43:33 GMT, alb...@spenarnc.xs4all.nl (Albert van der Horst)
wrote:
>I don't trust sudo because it is too complicated.
>(To the point that I removed it from my machine.)
>I do
How do you do that?
I avoided Ubuntu because it had sudo, and then discovered that Fedora had it
as wel
On Thu, 08 Jan 2015 16:31:22 +0200, Marko Rauhamaa wrote:
> alister :
>
>> On Thu, 08 Jan 2015 16:06:16 +0200, Marko Rauhamaa wrote:
>>> An administrator doesn't need the users' passwords for anything but
>>> should be assumed to know them.
>>
>> The administrator may be able to change them but h
alister :
> On Thu, 08 Jan 2015 16:06:16 +0200, Marko Rauhamaa wrote:
>> An administrator doesn't need the users' passwords for anything but
>> should be assumed to know them.
>
> The administrator may be able to change them but he should NEVER know
> them (or need to)!
When you are under an adm
On Thu, 08 Jan 2015 16:06:16 +0200, Marko Rauhamaa wrote:
> Chris Angelico :
>
>> With sudo, you get MUCH finer control. I can grant some user the power
>> to run "sudo eject sr0", but no other commands. I can permit someone to
>> execute any of a large number of commands, all individually logged
Chris Angelico wrote:
> With sudo, you get MUCH finer control.
But it's very hard, almost impossible, to really implement fine-grained
control with sudo. Too many programs provide shell exits.
Well, it's off-topic here.
How about taking this to news:comp.security.unix ?
Ciao, Michael.
--
https
Chris Angelico :
> With sudo, you get MUCH finer control. I can grant some user the power
> to run "sudo eject sr0", but no other commands. I can permit someone
> to execute any of a large number of commands, all individually logged.
I can't remember ever having a need for that. I sometimes use s
In article ,
Chris Angelico wrote:
>On Thu, Jan 8, 2015 at 11:43 PM, Albert van der Horst
> wrote:
>> I don't trust sudo because it is too complicated.
>> (To the point that I removed it from my machine.)
>> I do
>> su
>> ..
>> #
>> su nobody
>>
>> Who needs sudo?
>
>With sudo, you get MUCH finer
On Thu, Jan 8, 2015 at 11:43 PM, Albert van der Horst
wrote:
> I don't trust sudo because it is too complicated.
> (To the point that I removed it from my machine.)
> I do
> su
> ..
> #
> su nobody
>
> Who needs sudo?
With sudo, you get MUCH finer control. I can grant some user the power
to run "
In article ,
Chris Angelico wrote:
>On Sun, Dec 21, 2014 at 5:31 PM, Terry Reedy wrote:
>> Just to be clear, writing to sys.stdout works fine in Idle.
>>>>> import sys; sys.stdout.write('hello ')
>> hello #2.7
>>
>> In 3.4, the
On Fri, 26 Dec 2014 15:13:25 +1100, Steven D'Aprano wrote:
> Deep in the brain, well underneath the level of modern languages and
> consciousness, there is a deeper "machine language" of the brain. If you
> can write instructions in this machine language, you can control
> people's brains. Back
alex23 wrote:
> On 24/12/2014 2:20 AM, Grant Edwards wrote:
>> And even _with_ all the technical jibber-jabber, none of it explained
>> or justified the whole "writing a virus to infect the brain through
>> the optic nerve" thing which might just have well been magick and
>> witches.
>
> While I
On 24/12/2014 9:50 PM, alister wrote:
what feels like 3 or 4 chapters in & it is still trying to set the scene,
an exercise in stylish writing with very little content so far.
even early scifi written for magazines on a per word basis were not this
excessive (because if they were they would proba
On 24/12/2014 2:20 AM, Grant Edwards wrote:
And even _with_ all the technical jibber-jabber, none of it explained
or justified the whole "writing a virus to infect the brain through
the optic nerve" thing which might just have well been magick and
witches.
While I love SNOW CRASH, I do think it
On Tue, 23 Dec 2014 16:20:10 +, Grant Edwards wrote:
> On 2014-12-23, Steven D'Aprano
> wrote:
>> 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
Grant Edwards wrote:
> On 2014-12-23, Steven D'Aprano
> wrote:
>> 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 yo
Rustom Mody wrote:
> On Tuesday, December 23, 2014 9:50:22 PM UTC+5:30, Grant Edwards wrote:
>>
>> And even _with_ all the technical jibber-jabber, none of it explained
>> or justified the whole "writing a virus to infect the brain through
>> the optic nerve" thing which might just have well been
On Tuesday, December 23, 2014 9:50:22 PM UTC+5:30, Grant Edwards wrote:
>
> And even _with_ all the technical jibber-jabber, none of it explained
> or justified the whole "writing a virus to infect the brain through
> the optic nerve" thing which might just have well been magick and
> witches.
Yo
On 2014-12-23, Steven D'Aprano wrote:
> 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 ou
O thats nothing.
Ive eaten cookies. Given by strangers can contain narcotics you know!
Ive even walked on the road. Mines? Youve heard of them right?!? People get
their legs blown off [shivers]
Only computers I dont use -- Just too dangerous.
If cars and bikes can have bombs -- why not a compu
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
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 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
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 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 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
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
for production use.
>
> 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?
>
&g
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 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
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
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.
> >
> &
? :-)
> >
> >
> >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 reaction was "that's awesome"
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
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
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?
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
On Mon, Dec 22, 2014 at 6:46 PM, Steve Hayes wrote:
> But a hacker who can write that kind of stuff can probably bypass any
> safeguards built into the OS.
This isn't magic. You can't just do more of it to get past the
firewalls, like in sci fi. It's much MUCH easier to attack the humans
than the
On Mon, 22 Dec 2014 17:33:10 +1100, Chris Angelico wrote:
>On Mon, Dec 22, 2014 at 5:21 PM, 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 prin
On Mon, Dec 22, 2014 at 5:21 PM, 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
e obfuscated code
>for production use.
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 ha
On 22/12/2014 00:20, mm0fmf wrote:
On 22/12/2014 00:10, Chris Angelico wrote:
Level 0: Why implement your own crypto?!?
Because people who don't understand the concepts behind cryptography
don't understand that the crypto algorithm can be open whilst the
results of applying the algorithm are s
where you deliberately want to write obfuscated code
> for production use.
>
> Any beginner with 3 seconds experience with Python can write:
>
> print "Hello World"
>
Bad Boy -- Stand in the corner for forgetting the '()'
[Good boys use python3]
On a mor
lambda _, __, ___, , _, __, ___, : _
File "C:/Python27/helloworld.py", line 21, in
_))) + (_ << __) + (_ << ___)
OSError: [Errno 9] Bad file descriptor
Yes, because - like most "Hello world" programs - it attempts to write
to stdout. This interfere
On 2014-12-22 00:20, mm0fmf wrote:
> On 22/12/2014 00:10, Chris Angelico wrote:
> > Level 0: Why implement your own crypto?!?
>
> Because people who don't understand the concepts behind
> cryptography don't understand that the crypto algorithm can be open
> whilst the results of applying the algor
On Mon, Dec 22, 2014 at 11:12 AM, Roy Smith wrote:
> In article ,
> Chris Angelico wrote:
>
>> On Mon, Dec 22, 2014 at 10:50 AM, Roy Smith 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). The pers
On 22/12/2014 00:10, Chris Angelico wrote:
Level 0: Why implement your own crypto?!?
Because people who don't understand the concepts behind cryptography
don't understand that the crypto algorithm can be open whilst the
results of applying the algorithm are secure.
There again I always use
In article ,
Chris Angelico wrote:
> On Mon, Dec 22, 2014 at 10:50 AM, Roy Smith 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). The person
> > who wrote some particular bit of the code had decided
On Mon, Dec 22, 2014 at 10:50 AM, Roy Smith 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). The person
> who wrote some particular bit of the code had decided that deliberately
> obfuscating the function
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 use.
Heh. I once worked on a C++ proje
e wrong side of the bed this
morning? :-)
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.
Any beginner with 3 seconds experience with Python can write:
print "Hello Wo
Tony the Tiger :
> 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.
It is, of course, a joke, and there are whole tongue-in-cheek languages
like Brainfuck. However, some similar exercises carry deep meaning.
Take, for example, i
CM :
> On Sunday, December 21, 2014 2:44:50 AM UTC-5, CM wrote:
>> Hello, world!
>> 13
>
> Actually, there is no comma after Hello.
Do you have a patch?
Marko
--
https://mail.python.org/mailman/listinfo/python-list
On Sunday, December 21, 2014 2:44:50 AM UTC-5, CM wrote:
> On Sunday, December 21, 2014 1:45:02 AM UTC-5, Chris Angelico wrote:
> > On Sun, Dec 21, 2014 at 5:31 PM, Terry Reedy wrote:
> > > Just to be clear, writing to sys.stdout works fine in Idle.
> > >>>>
On Sun, Dec 21, 2014 at 6:44 PM, CM wrote:
> Yes, just tested it on the same machine in the terminal and it prints:
>
> Hello, world!
> 13
>
> Not sure what the 13 is all about. Thanks.
Number of bytes output. It's the return value from the output call -
common with
On Sunday, December 21, 2014 1:45:02 AM UTC-5, Chris Angelico wrote:
> On Sun, Dec 21, 2014 at 5:31 PM, Terry Reedy wrote:
> > Just to be clear, writing to sys.stdout works fine in Idle.
> >>>> import sys; sys.stdout.write('hello ')
> > hello #2.7
> &
On Sun, Dec 21, 2014 at 5:31 PM, Terry Reedy wrote:
> Just to be clear, writing to sys.stdout works fine in Idle.
>>>> import sys; sys.stdout.write('hello ')
> hello #2.7
>
> In 3.4, the number of chars? bytes? is returned and written also.
>
> Whether you
_
File "C:/Python27/helloworld.py", line 21, in
_))) + (_ << __) + (_ << ___)
OSError: [Errno 9] Bad file descriptor
Yes, because - like most "Hello world" programs - it attempts to write
to stdout. This interferes with IDLE and the way it cap
hon27/helloworld.py", line 21, in
> _))) + (_ << __) + (_ << ___)
> OSError: [Errno 9] Bad file descriptor
Yes, because - like most "Hello world" programs - it attempts to write
to stdout. This interferes with IDLE and the way it captures output
for the
CM wrote:
> On Saturday, December 20, 2014 7:57:19 AM UTC-5, Steven D'Aprano wrote:
>> Taken from Ben Kurtovic's blog:
>>
>> http://benkurtovic.com/2014/06/01/obfuscating-hello-world.html
[...]
> I ran it in IDLE with Python 2.7.8 and got:
>
> Traceb
On Saturday, December 20, 2014 7:57:19 AM UTC-5, Steven D'Aprano wrote:
> Taken from Ben Kurtovic's blog:
>
> http://benkurtovic.com/2014/06/01/obfuscating-hello-world.html
>
>
>
> (lambda _, __, ___, , _, __, ___, :
> getattr(
&
On Sat, 20 Dec 2014 23:57:08 +1100, Steven D'Aprano wrote:
> Taken from Ben Kurtovic's blog:
>
> http://benkurtovic.com/2014/06/01/obfuscating-hello-world.html
>
>
>
> (lambda _, __, ___, , _, __, ___, :
> getattr(
>
On Sat, 20 Dec 2014 23:57:08 +1100, Steven D'Aprano
wrote:
>Taken from Ben Kurtovic's blog:
>
>http://benkurtovic.com/2014/06/01/obfuscating-hello-world.html
>
>
>
>(lambda _, __, ___, , _, __, ___, :
>getattr(
>
On Saturday, December 20, 2014 6:27:19 PM UTC+5:30, Steven D'Aprano wrote:
> Taken from Ben Kurtovic's blog:
>
> http://benkurtovic.com/2014/06/01/obfuscating-hello-world.html
>
>
>
> (lambda _, __, ___, , _, __, ___, :
> getattr(
&
On 20/12/2014 12:57, Steven D'Aprano wrote:
Taken from Ben Kurtovic's blog:
http://benkurtovic.com/2014/06/01/obfuscating-hello-world.html
(lambda _, __, ___, , _, __, ___, :
getattr(
__import__(True.__class__.__name__[_] + [].__class_
On Sat, Dec 20, 2014 at 11:57 PM, Steven D'Aprano
wrote:
> Taken from Ben Kurtovic's blog:
>
> http://benkurtovic.com/2014/06/01/obfuscating-hello-world.html
Introduction to Functional Programming in Python.
Sadly, it doesn't work on Python 3. Someone needs to port it
Taken from Ben Kurtovic's blog:
http://benkurtovic.com/2014/06/01/obfuscating-hello-world.html
(lambda _, __, ___, , _, __, ___, :
getattr(
__import__(True.__class__.__name__[_] + [].__class__.__name__[__]),
().__class__.__eq__.__class__.__n
On Tue, 2014-11-04 at 23:03 +0630, Veek M wrote:
> okay got it working - thanks Jason! The 3.2 docs are slightly different.
What did you need to do to get it working?
--
https://mail.python.org/mailman/listinfo/python-list
okay got it working - thanks Jason! The 3.2 docs are slightly different.
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Nov 4, 2014 at 11:09 AM, Veek M wrote:
> static PyMethodDef hellomethods[] = {
> {"hello", py_hello, METH_VARARGS, py_hello_doc},
> {NULL, NULL, 0, NULL},
> };
>
> It's basically the METH_VARARGS field that's giving the problem. Switching
static PyMethodDef hellomethods[] = {
{"hello", py_hello, METH_VARARGS, py_hello_doc},
{NULL, NULL, 0, NULL},
};
It's basically the METH_VARARGS field that's giving the problem. Switching
it to NULL gives,
SystemError: Bad call flags in PyCFunction_Call. METH_
0\0\3\0>\0\1\0\0\0\300\7\0\0\0\0\0\0"..., 832)
= 832
fstat(5, {st_mode=S_IFREG|0755, st_size=19217, ...}) = 0
getcwd("/root/github/junk/hello", 128) = 24
mmap(NULL, 2101544, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) =
0x7f215b71c000
mprotect(0x7f215b71d000, 2093056, PROT_N
hread -fPIC -I/usr/include/python3.4 -c pyhello.c -o
build/temp.linux-x86_64-3.4/pyhello.o
pyhello.c:15:5: warning: initialization from incompatible pointer type [enabled
by default]
{"hello", py_hello, METH_NOARGS, py_hello_doc},
^
pyhello.c:15:5: warning: (near initialization fo
Søren wrote:
> import ctypes
Hi, yeah i kind of liked it - still reading the docs though, Beazley has the
Python.h solution so I though I'd try that first.
--
https://mail.python.org/mailman/listinfo/python-list
0\3\0>\0\1\0\0\0\300\7\0\0\0\0\0\0"..., 832)
= 832
fstat(5, {st_mode=S_IFREG|0755, st_size=19217, ...}) = 0
getcwd("/root/github/junk/hello", 128) = 24
mmap(NULL, 2101544, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) =
0x7f65daea5000
mprotect(0x7f65daea6000, 20930
I'm not sure if it fits your needs, but we are very happy with calling c
libs directly from python using ctypes:
https://docs.python.org/2/library/ctypes.html
It requires a few extra lines in Python to handle the parameter and
return types.
import ctypes
result = ctypes.windll.Hello.hello()
On Tue, 2014-11-04 at 16:22 +0630, Veek M wrote:
> https://github.com/Veek/Python/tree/master/junk/hello
> doesn't work.
> I have:
> hello.c which contains: int hello(void);
> hello.h
>
> To wrap that up, i have:
> hello.py -> _hello (c extension) -> pyhello
On Tue, Nov 4, 2014 at 8:52 PM, Veek M wrote:
> https://github.com/Veek/Python/tree/master/junk/hello
> doesn't work.
> I have:
> hello.c which contains: int hello(void);
> hello.h
>
> To wrap that up, i have:
> hello.py -> _hello (c extension) -> pyhello.c -&
https://github.com/Veek/Python/tree/master/junk/hello
doesn't work.
I have:
hello.c which contains: int hello(void);
hello.h
To wrap that up, i have:
hello.py -> _hello (c extension) -> pyhello.c -> method py_hello()
People using this will do:
python3.2>> import hello
pyt
On Mon, Jul 28, 2014 at 5:41 PM, Albert-Jan Roskam
wrote:
>> That's not tuple%tuple, but rather string%tuple. And string%tuple is
>> the older method of formatting an output string from a template and a
>> tuple of values. See
>> https://docs.python.org/2/library/stdtypes.html#string-formatting
101 - 200 of 462 matches
Mail list logo