'array.array' object has no attribute 'tostring' which 3 got it fixed?

2021-12-21 Thread '2+
hi ;)

got popos installed on my raspberry pi4 and it is currently running python
3.9.7

i get this error when running my script:

'array.array' object has no attribute 'tostring'

this bug seems to be pretty old .. how long should i be waiting to get it
fixed with apt upgrade?

or should i use other attribute instead?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: 'array.array' object has no attribute 'tostring' which 3 got it fixed?

2021-12-21 Thread Chris Angelico
On Tue, Dec 21, 2021 at 9:56 PM '2+  wrote:
>
> hi ;)
>
> got popos installed on my raspberry pi4 and it is currently running python
> 3.9.7
>
> i get this error when running my script:
>
> 'array.array' object has no attribute 'tostring'
>
> this bug seems to be pretty old .. how long should i be waiting to get it
> fixed with apt upgrade?
>
> or should i use other attribute instead?

I'd recommend reading the documentation :)

https://docs.python.org/3/library/array.html#array.array.tobytes

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Call julia from Python: which package?

2021-12-21 Thread Albert-Jan Roskam
   Hi all,
   Thank you very much for your valuable replies! I will definitely do some
   tracing to see where the bottlenecks really are. It's good to know that
   pypy is still alive and kicking, I thought it was stuck in py2.7. I will
   also write a mini program during the holiday to see how this Julia/Python
   interaction might work. The little bit of experience with Julia more or
   less coincides with what Oscar mentioned: a lot of "warm up" time. This is
   actually a py2.7 project that I inherited. I was asked to convert it to
   py3.8.
   Thanks and merry xmas!
   Albert-Jan
-- 
https://mail.python.org/mailman/listinfo/python-list


[Python-announce] Benchmark Smil vs Scikit-image (morphological features)

2021-12-21 Thread Jose-Marcio Martins da Cruz


Hello,

We've done a comparative benchmark (speed and memory usage) with Smil and 
Scikit-Image.

Smil is a mathematical morphology dedicated library of functions. So 
comparisons are done only on this area.

We've been working on Mathematical Morphology for more than 50 years now the discipline was created here at our research 
department in the sixties. Smil inherits the experience of previous libraries and software we've been writing since the 
70's.


In just some few words, Smil can be orders of magnitude faster than Scikit-image (hundreds or even thousands) on some 
operations thanks to parallelization and vectorization (SIMD), depending on the computer architecture.


Smil doesn't replace scikit-image but may be a good complement to scikit-image 
when speed is important.

Benchmark results are available at :
https://smil.cmm.minesparis.psl.eu/smil-vs-skimage

Comments are welcome,

Best regards

José-Marcio



--

 ---
 Jose Marcio MARTINS DA CRUZ, Ph.D.
 Ecole des Mines de Paris
 Centre de Morphologie Mathématique
 https://orcid.org/-0002-2981-7028
 ---
  Mon livre sur le spam : http://amzn.to/LEscRu
 ---

--
https://mail.python.org/mailman/listinfo/python-list


Re: PyCharm settings - per: print('\N{flag: Mauritius}') not supported in py3.9

2021-12-21 Thread Abdur-Rahmaan Janhangeer
Yet another unicode issue XD

Kind Regards,

Abdur-Rahmaan Janhangeer
about  | blog

github 
Mauritius
-- 
https://mail.python.org/mailman/listinfo/python-list


Py_TRASHCAN_SAFE_BEGIN/END in C extension?

2021-12-21 Thread Marco Sulla
In Python 3.7, must Py_TRASHCAN_SAFE_BEGIN - Py_TRASHCAN_SAFE_END be
used in a C extension?

I'm asking because in my C extension I use them in the deallocator
without problems, but users signalled me that they segfault in Python
3.7 on Debian 10. I checked and this is true.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Py_TRASHCAN_SAFE_BEGIN/END in C extension?

2021-12-21 Thread Barry


> On 21 Dec 2021, at 22:08, Marco Sulla  wrote:
> 
> In Python 3.7, must Py_TRASHCAN_SAFE_BEGIN - Py_TRASHCAN_SAFE_END be
> used in a C extension?
> 
> I'm asking because in my C extension I use them in the deallocator
> without problems, but users signalled me that they segfault in Python
> 3.7 on Debian 10. I checked and this is true.

I searched the web for Py_TRASHCAN_SAFE_BEGIN
And that quickly lead me to this bug.

https://bugs.python.org/issue40608.

That gives lots of clues for what might be the problem.
It seems that is a deprecated api.

Barry

> -- 
> https://mail.python.org/mailman/listinfo/python-list
> 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: print('\N{flag: Mauritius}') not supported in py3.9

2021-12-21 Thread dn via Python-list
On 30/11/2021 12.31, Cameron Simpson wrote:
> On 30Nov2021 10:59, DL Neil  wrote:
...

>> I've nominated Kitty as
>> Fedora's default terminal. We'll see how it goes with work-loads beyond
>> raising the flag...
> 
> I'd like to hear how that goes down the track. If I find myself on a 
> Linux desktop again a good terminal emulator would be very welcome.


(given that @A-R has brought this thread back-to-life)


I have been surprised/shocked/horrified/annoyed to discover that the
(Linux) clipboard is not accessible from "Kitty".

Go on, I dare you to remind me that good-old 'dumb-terminals' didn't
have 'clipboards'...
(neither did they have to cope with Unicode, emoticons, or national flags!)


Accordingly, having developed an idea in the REPL (running within
Kitty), could not later copy-paste into a Python module or tutorial text
(nor, next time the situation arises, to be able to illustrate an answer
to a question posted 'here').

Am somewhat in disbelief, and my fingers feel slightly singed. Grump!
(or its seasonal variation: "Grinch")


Am open to further non-terminal, terminal suggestions...

(during my post-op recovery period, am hoping to experiment with another
Linux distro (and Window Manager), which may alter the playing-field...)


Meantime, casting-off the terminal-Grinch, compliments of the season to
you...
-- 
Regards,
=dn
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: print('\N{flag: Mauritius}') not supported in py3.9

2021-12-21 Thread boB Stepp

On 21/12/22 12:14PM, Python wrote:

On 30/11/2021 12.31, Cameron Simpson wrote:

On 30Nov2021 10:59, DL Neil  wrote:

...


I've nominated Kitty as
Fedora's default terminal. We'll see how it goes with work-loads beyond
raising the flag...


I'd like to hear how that goes down the track. If I find myself on a
Linux desktop again a good terminal emulator would be very welcome.



(given that @A-R has brought this thread back-to-life)


I have been surprised/shocked/horrified/annoyed to discover that the
(Linux) clipboard is not accessible from "Kitty".


Huh?  I use kitty and copy to and from the clipboard all the time.
1) ctrl+shift+c Copy to clipboard
2) ctrl+shift+v Paste from the clipboard
3) Using mouse to select text automatically copies it to the primary 
clipboard.
4) Middle-click of mouse to paste from the primary clipboard.


--
Wishing you only the best,
boB Stepp

Speeches are like steer horns -- a point here, a point there and a lot of bull
in between.
-- E. Anderson
--
https://mail.python.org/mailman/listinfo/python-list


Re: Call julia from Python: which package?

2021-12-21 Thread Dan Stromberg
Last I heard, Pypy itself will remain written in a statically typed dialect
of Python that is closest to Python 2.7.  However, what's written in that
language includes JIT-compiled interpreters for both Python 2.x and Python
3.x.

On Tue, Dec 21, 2021 at 9:15 AM Albert-Jan Roskam 
wrote:

>Hi all,
>Thank you very much for your valuable replies! I will definitely do some
>tracing to see where the bottlenecks really are. It's good to know that
>pypy is still alive and kicking, I thought it was stuck in py2.7. I will
>also write a mini program during the holiday to see how this
> Julia/Python
>interaction might work. The little bit of experience with Julia more or
>less coincides with what Oscar mentioned: a lot of "warm up" time. This
> is
>actually a py2.7 project that I inherited. I was asked to convert it to
>py3.8.
>Thanks and merry xmas!
>Albert-Jan
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list