https://news.ycombinator.com/item?id=21834408
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, Dec 20, 2019 at 11:16 PM Pankaj Jangid wrote:
>
> https://news.ycombinator.com/item?id=21834408
>
>
Did you just post a blog article, then spam everywhere to try to get
traffic, where your entire blog post is telling people worse ways to
do a time.sleep()?
ChrisA
--
https://mail.python.
Original from miguel grinberg
--
https://mail.python.org/mailman/listinfo/python-list
Hi
I can install collect with pip for python2.7
$ pip install --user collect
Collecting collect
Using cached
https://files.pythonhosted.org/packages/cf/5e/c0f0f51d081665374a2c219ea4ba23fb1e179b70dded96dc16606786d828/collect-0.1.1.tar.gz
Collecting couc
Greetings,
One of my Python scripts basically does the following:
source = tarfile.open(name=tar_archive , mode='r|*')
dest = tarfile.open(fileobj=sys.stdout, mode='w|', format=fmt)
.
.
.
source.close()
dest.close()
In an attempt to move my Python scripts from Python 2.7 to Python 3.6 I
On Sat, Dec 21, 2019 at 2:25 AM Mahmood Naderan via Python-list
wrote:
>
> Hi
>
> I can install collect with pip for python2.7
> $ pip install --user collect
> However, pip3 fails with this error
> $ pip3 install --user collect
> NameError: name 'file' is not defined
>
> I can not figure out
On Sat, Dec 21, 2019 at 2:29 AM Dr Rainer Woitok
wrote:
>
> Greetings,
>
> One of my Python scripts basically does the following:
>
> source = tarfile.open(name=tar_archive , mode='r|*')
> dest = tarfile.open(fileobj=sys.stdout, mode='w|', format=fmt)
>
> .
> .
> .
>
> source.close()
> dest.
On 12/20/2019 04:19 AM, Dr Rainer Woitok wrote:
One of my Python scripts basically does the following:
source = tarfile.open(name=tar_archive , mode='r|*')
dest = tarfile.open(fileobj=sys.stdout, mode='w|', format=fmt)
.
.
.
source.close()
dest.close()
In an attempt to move my Pytho
> On 20 Dec 2019, at 04:33, lampahome wrote:
>
> I tried to receive msg from kernel via netlink of socket.
>
> And I use epoll to receive netlink events whenever it comes from kernel to
> user space.
>
> But I found the performance is poor e.g. epoll costs 90% time of execution
> time after
>> https://news.ycombinator.com/item?id=21834408
> Did you just post a blog article, then spam everywhere to try to get
> traffic, where your entire blog post is telling people worse ways to
> do a time.sleep()?
Blog post is not mine. I have a habit of posting good things to HN. When
I got notific
Ethan,
On Friday, 2019-12-20 07:41:51 -0800, you wrote:
> ...
> In Python 3 `sys.stdout` is a character interface, not bytes.
Does that mean that with Python 3 "Tarfile" is no longer able to write
the "tar" file to a pipe? Or is there now another way to write to a
pipe? And if that new
Eli the Bearded wrote:
> In comp.lang.python, Peter Otten <__pete...@web.de> wrote:
>> Eli the Bearded wrote:
>>> But what caught my eye most, as someone relatively new to Python but
>>> with long experience in C in Perl, is sorting doesn't take a
>
> s/C in /C and/
>
> Ugh.
>
>>> *comparison*
On Sat, Dec 21, 2019 at 5:03 AM Peter Otten <__pete...@web.de> wrote:
> PS: If you are sorting files by size and checksum as part of a deduplication
> effort consider using dict-s instead:
Yeah, I'd agree if that's the purpose. But let's say the point is to
have a guaranteed-stable ordering of fil
Greg Ewing writes:
> You could try creating a set of top-level .pyx stubs, each of
> which just 'include' the real code.
Thank you, will try this approach!
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi m
Ethan Furman writes:
> If you don't get an answer here, you can try the Cython Users group:
Thanks, reposted the same question there.
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapens
Chris Angelico wrote:
> On Sat, Dec 21, 2019 at 5:03 AM Peter Otten <__pete...@web.de> wrote:
>> PS: If you are sorting files by size and checksum as part of a
>> deduplication effort consider using dict-s instead:
>
> Yeah, I'd agree if that's the purpose. But let's say the point is to
> have a
Dr Rainer Woitok wrote:
> Ethan,
>
> On Friday, 2019-12-20 07:41:51 -0800, you wrote:
>
>> ...
>> In Python 3 `sys.stdout` is a character interface, not bytes.
>
> Does that mean that with Python 3 "Tarfile" is no longer able to write
> the "tar" file to a pipe? Or is there now another wa
On Sat, Dec 21, 2019 at 6:01 AM Peter Otten <__pete...@web.de> wrote:
>
> Chris Angelico wrote:
>
> > On Sat, Dec 21, 2019 at 5:03 AM Peter Otten <__pete...@web.de> wrote:
> >> PS: If you are sorting files by size and checksum as part of a
> >> deduplication effort consider using dict-s instead:
>
On Sat, Dec 21, 2019 at 6:13 AM Peter Otten <__pete...@web.de> wrote:
>
> Dr Rainer Woitok wrote:
>
> > Ethan,
> >
> > On Friday, 2019-12-20 07:41:51 -0800, you wrote:
> >
> >> ...
> >> In Python 3 `sys.stdout` is a character interface, not bytes.
> >
> > Does that mean that with Python 3 "Tarfile
On 12/20/2019 2:22 AM, Mahmood Naderan via Python-list wrote:
However, pip3 fails with this error
$ pip3 install --user collect
Collecting collect
Using cached
https://files.pythonhosted.org/packages/cf/5e/c0f0f51d081665374a2c219ea4ba23fb1e179b70dded96dc16606786d828/collect-0.1.1.tar.gz
Coll
> On 20 Dec 2019, at 15:27, Mahmood Naderan via Python-list
> wrote:
>
> Hi
>
> I can install collect with pip for python2.7
> $ pip install --user collect
> Collecting collect
> Using cached
> https://files.pythonhosted.org/packages/cf/5e/c0f0f51d0
On 21/12/19 1:59 am, Stefan Ram wrote:
I would like to add a method to a string.
This is not possible in Python?
It's not possible. Built-in classes can't have methods added
to them.
You can define your own subclass of str and give it whatever
methods you want.
But in your case:
for
I utilized .get_text() + .split() functions and obtain this:
spe=
['$278.86as', 'of', 'Dec', '20,', '2019,', '06:47', 'PST', '-', 'Details']
['4.7', 'inches']
['750', 'x', '1334']
['64', 'GB']
['2', 'GB']
['Apple', 'A11', 'Bionic,', 'Hexa-Core,', '(2x', 'Monsoon', '+', '4x',
'Mistral)']
['5.22', '
On 20Dec2019 21:04, wanghao7...@gmail.com wrote:
I utilized .get_text() + .split() functions and obtain this:
spe=
['$278.86as', 'of', 'Dec', '20,', '2019,', '06:47', 'PST', '-', 'Details']
['4.7', 'inches']
['750', 'x', '1334']
['64', 'GB']
['2', 'GB']
['Apple', 'A11', 'Bionic,', 'Hexa-Core,',
On 21/12/19 6:04 pm, wanghao7...@gmail.com wrote:
I utilized .get_text() + .split() functions and obtain this:
spe=
['$278.86as', 'of', 'Dec', '20,', '2019,', '06:47', 'PST', '-', 'Details']
['4.7', 'inches']
['750', 'x', '1334']
['64', 'GB']
['2', 'GB']
['Apple', 'A11', 'Bionic,', 'Hexa-Core,',
On 21/12/19 2:50 pm, Greg Ewing wrote:
On 21/12/19 1:59 am, Stefan Ram wrote:
I would like to add a method to a string.
This is not possible in Python?
It's not possible. Built-in classes can't have methods added
to them.
You can define your own subclass of str and give it whatever
met
thanks for responding!
Now I've solved this problem!
My former code is:
for j in data:
spe = j.get_text()
l_spe = spe.split()
print(l_spe)
Then I get the result:
['$278.86as', 'of', 'Dec', '20,', '2019,', '06:47', 'PST', '-', 'Details']
['4.7', 'inches']
['750', 'x', '1334']
[
Thanks!
Actually, I neglected that my "print" is in the "for", so I get a group of
lists.
Now I put the "print" out of the iteration then use .extend to append each list
I produce. Finally, print and get my ideal result.
Haha, I'm too naive, so is my English.
--
https://mail.python.org/mailman/
28 matches
Mail list logo