Re: [Tutor] Feature or ... after python 2.7

2017-01-25 Thread source liu
On Wed, 25 Jan 2017 at 17:07 Alan Gauld via Tutor wrote: > On 25/01/17 02:55, source liu wrote: > > > 2.7. (2.7.16 if I remembered it correctly), one could run python script > > with perl > > > > $cat test.py > > #!/bin/env python > > print "

[Tutor] Feature or ... after python 2.7

2017-01-25 Thread source liu
Hi,list Yesterday, someone hacked in my server and running some bad thing , but I do find something interesting After I inspected processes, I found if you are using python version above 2.7. (2.7.16 if I remembered it correctly), one could run python script with perl $cat test.py #!/bin/env

Re: [Tutor] differences between map and partial?

2016-09-28 Thread source liu
= THAT'S ALL OF THE CODE Thank you On Wed, Sep 28, 2016 at 3:26 AM, Danny Yoo wrote: > On Tue, Sep 27, 2016 at 2:23 AM, source liu wrote: >> Hi, List >> >> the test code as attached > > > Unfortunately, it didn't attach. If you can inline the c

[Tutor] differences between map and partial?

2016-09-27 Thread source liu
Hi, List the test code as attached first i tried map, and failed, then i turned to partial from functools the latter one works, i wonder if there is unseen tricky from me between them :) this one works print p.map(partial(file_op,lineop=unity),input) this one doesn't work print