Re: how to fast processing one million strings to remove quotes

2017-08-02 Thread Nick Mellor
On Thursday, 3 August 2017 01:05:57 UTC+10, Daiyue Weng wrote: > Hi, I am trying to removing extra quotes from a large set of strings (a > list of strings), so for each original string, it looks like, > > """str_value1"",""str_value2"",""str_value3"",1,""str_value4""" > > > I like to remove the

Command-line torrent search tool (windows/linux)

2017-08-02 Thread Kryptxy via Python-list
Torrench - A Command-line torrent search tool - For windows and Linux OS The tool fetches torrents from existing torrent-hosting sites. Websites supported: 1. linuxtracker.org - Get linux distros ISO torrents 2. ThePirateBay - Do read usage instructions. Project is in python3, and is completely

Re: how to sort a list of tuples with custom function

2017-08-02 Thread Ho Yeung Lee
https://gist.github.com/hoyeunglee/f371f66d55f90dda043f7e7fea38ffa2 I am near succeed in another way, please run above code when so much black words, it will be very slow so I only open notepad and maximum it without any content then capture screen and save as roster.png and run it, but I discov

Re: first code attempt

2017-08-02 Thread Rick Johnson
On Wednesday, August 2, 2017 at 7:22:56 PM UTC-5, boB Stepp wrote: > You might want to consider joining the Python Tutor list > (https://mail.python.org/mailman/listinfo/tutor). This is meant for > newcomers to Python who have a lot of basic questions. I would second that advice. However, i woul

Re: first code attempt

2017-08-02 Thread boB Stepp
On Wed, Aug 2, 2017 at 4:36 PM, wrote: > Hello, > I am using the workbook Computer Coding by Jon Woodcock, published by DK > WORKBOOKS, to try to learn computer coding. I only get to pages 10 and 11 > in Robot Programs when round robots appear in squares to manipulate them. > Where in the world d

Re: Subclassing dict to modify values

2017-08-02 Thread Matt Wheeler
On Wed, 2 Aug 2017 at 23:26 Ian Pilcher wrote: > YANQ (Yet Another Newbie Question) ... > > I would like to create a subclass of dict that modifies values as they > are inserted. (Effectively I want to do the equivalent of "interning" > the values, although they aren't strings.) > > Do I need to

Re: first code attempt

2017-08-02 Thread Rick Johnson
On Wednesday, August 2, 2017 at 5:34:18 PM UTC-5, bre...@bestweb.net wrote: > Hello, > I am using the workbook Computer Coding by Jon Woodcock, > published by DK WORKBOOKS, to try to learn computer coding. > I only get to pages 10 and 11 in Robot Programs when round > robots appear in squares to ma

first code attempt

2017-08-02 Thread breezy
Hello, I am using the workbook Computer Coding by Jon Woodcock, published by DK WORKBOOKS, to try to learn computer coding. I only get to pages 10 and 11 in Robot Programs when round robots appear in squares to manipulate them. Where in the world do I find robots and squares? I would appreciate you

Subclassing dict to modify values

2017-08-02 Thread Ian Pilcher
YANQ (Yet Another Newbie Question) ... I would like to create a subclass of dict that modifies values as they are inserted. (Effectively I want to do the equivalent of "interning" the values, although they aren't strings.) Do I need to implement any methods other than __setitem__? (I.e. will a

Re: cgiapp versus apache & nginx+fcgiwrap

2017-08-02 Thread Glenn Linderman
On 8/2/2017 1:13 AM, Robin Becker wrote: we always seem to get keys in K even if it is an empty list. Can you treat None and empty list the same? Looking at the envirnment that the cgi script sees I cannot see anything obvious except the expected differences for the two frontend servers.

Re: Will my project be accepted in pypi?

2017-08-02 Thread Vedarth Sharma
There are lots of cool things on PyPI. For instance, check out pytube as well. It's similar to youtube-dl. Cheers, Vedu -- https://mail.python.org/mailman/listinfo/python-list

Re: Get list of attributes from list of objects?

2017-08-02 Thread Ian Kelly
On Wed, Aug 2, 2017 at 11:49 AM, Chris Angelico wrote: > On Thu, Aug 3, 2017 at 3:21 AM, Ian Pilcher wrote: >> Given a list of objects that all have a particular attribute, is there >> a simple way to get a list of those attributes? >> >> In other words: >> >> class Foo(object): >> def __

Re: python in chromebook

2017-08-02 Thread attend
On Thu, 27 Jul 2017 10:03:29 +0900, Byung-Hee HWANG (황병희, 黃炳熙) wrote: > my computer is chromebook. how can i install python in chromebook? > barely i did meet develop mode of chromebook. also i'm new to python. > > INDEED, i want to make python code on my chromebook. > > thanks in avance!!! goo

Re: how to fast processing one million strings to remove quotes

2017-08-02 Thread Peter Otten
Daiyue Weng wrote: > On 2 August 2017 at 19:13, Peter Otten <__pete...@web.de> wrote: > >> Daiyue Weng wrote: >> >> > Hi, I am trying to removing extra quotes from a large set of strings (a >> > list of strings), so for each original string, it looks like, >> > >> > """str_value1"",""str_value2""

Re: Get list of attributes from list of objects?

2017-08-02 Thread Ian Pilcher
On 08/02/2017 12:49 PM, Chris Angelico wrote: On Thu, Aug 3, 2017 at 3:21 AM, Ian Pilcher wrote: You can't eliminate the loop, but you can compact it into a single logical operation: namelist = [foo.name for foo in foolist] That's a "list comprehension", and is an elegant way to process a list

Re: how to fast processing one million strings to remove quotes

2017-08-02 Thread Daiyue Weng
it is getting from an encrypted and snappy file On 2 August 2017 at 19:13, Peter Otten <__pete...@web.de> wrote: > Daiyue Weng wrote: > > > Hi, I am trying to removing extra quotes from a large set of strings (a > > list of strings), so for each original string, it looks like, > > > > """str_valu

Re: how to fast processing one million strings to remove quotes

2017-08-02 Thread Peter Otten
Daiyue Weng wrote: > Hi, I am trying to removing extra quotes from a large set of strings (a > list of strings), so for each original string, it looks like, > > """str_value1"",""str_value2"",""str_value3"",1,""str_value4""" Where did you get that strange list from in the first place? If it is

Re: Get list of attributes from list of objects?

2017-08-02 Thread Terry Reedy
On 8/2/2017 1:21 PM, Ian Pilcher wrote: Given a list of objects that all have a particular attribute, is there a simple way to get a list of those attributes? In other words: class Foo(object): def __init__(self, name): self.name = name foolist = [ Foo('a'), Foo('b'), F

Re: how to fast processing one million strings to remove quotes

2017-08-02 Thread Terry Reedy
On 8/2/2017 1:05 PM, MRAB wrote: On 2017-08-02 16:05, Daiyue Weng wrote: Hi, I am trying to removing extra quotes from a large set of strings (a list of strings), so for each original string, it looks like, """str_value1"",""str_value2"",""str_value3"",1,""str_value4""" I like to remove the s

Re: Get list of attributes from list of objects?

2017-08-02 Thread Chris Angelico
On Thu, Aug 3, 2017 at 3:21 AM, Ian Pilcher wrote: > Given a list of objects that all have a particular attribute, is there > a simple way to get a list of those attributes? > > In other words: > > class Foo(object): > def __init__(self, name): > self.name = name > > foolist =

Re: how to fast processing one million strings to remove quotes

2017-08-02 Thread Daiyue Weng
that works superbly! any idea about how to multi process the task and concatenate results from each process back into a list? On 2 August 2017 at 18:05, MRAB wrote: > On 2017-08-02 16:05, Daiyue Weng wrote: > >> Hi, I am trying to removing extra quotes from a large set of strings (a >> list of s

Get list of attributes from list of objects?

2017-08-02 Thread Ian Pilcher
Given a list of objects that all have a particular attribute, is there a simple way to get a list of those attributes? In other words: class Foo(object): def __init__(self, name): self.name = name foolist = [ Foo('a'), Foo('b'), Foo('c') ] namelist = [] for foo in fooli

Re: how to fast processing one million strings to remove quotes

2017-08-02 Thread MRAB
On 2017-08-02 16:05, Daiyue Weng wrote: Hi, I am trying to removing extra quotes from a large set of strings (a list of strings), so for each original string, it looks like, """str_value1"",""str_value2"",""str_value3"",1,""str_value4""" I like to remove the start and end quotes and extra pair

RE: concurrent-log-handler 0.9.6 released

2017-08-02 Thread Alex Walters
Pypiwin32 exists to allow pywin32 to be installed through pip (thanks to Glyph and the Twisted project for supporting that) > -Original Message- > From: Python-announce-list [mailto:python-announce-list-bounces+tritium- > list=sdamon@python.org] On Behalf Of Preston Landers > Sent: Sun

how to fast processing one million strings to remove quotes

2017-08-02 Thread Daiyue Weng
Hi, I am trying to removing extra quotes from a large set of strings (a list of strings), so for each original string, it looks like, """str_value1"",""str_value2"",""str_value3"",1,""str_value4""" I like to remove the start and end quotes and extra pairs of quotes on each string value, so the r

Event Ticket | Ticket Printing Malaysia | Fifty Percent Print

2017-08-02 Thread Seo Services
Event Ticket Fifty percent print is providing services of voucher printing, Event Ticket Printing in Malaysia. Customers can choose size firstly; select the finishing secondly, a variety of supplement for your options, which can satisfy your needs absolutely. Our journals, organizers, or busine

Re: @lru_cache on functions with no arguments

2017-08-02 Thread Steven D'Aprano
On Tue, 01 Aug 2017 11:05:38 -0400, Terry Reedy wrote: > On 8/1/2017 7:06 AM, Matt Wheeler wrote: >> On Tue, 1 Aug 2017 at 02:32 Terry Reedy wrote: >> >>> On 7/31/2017 7:31 PM, t...@tomforb.es wrote: As part of the Python 3 cleanup in Django there are a fair few uses of >>> @functools.

cgiapp versus apache & nginx+fcgiwrap

2017-08-02 Thread Robin Becker
A client is using servicenow to direct requests to a cgi application. The servicenow mechanism seems to create a whole file json request. For testing purposes the cgi application tries to respond to standard posts as well. The connection part is handled like this F = cgi.FieldStorage(keep_bla

Re: how to sort a list of tuples with custom function

2017-08-02 Thread Peter Otten
Glenn Linderman wrote: > On 8/1/2017 2:10 PM, Piet van Oostrum wrote: >> Ho Yeung Lee writes: >> >>> def isneighborlocation(lo1, lo2): >>> if abs(lo1[0] - lo2[0]) < 7 and abs(lo1[1] - lo2[1]) < 7: >>> return 1 >>> elif abs(lo1[0] - lo2[0]) == 1 and lo1[1] == lo2[1]: >>>