Re: Trying to use pyinstaller under python 3.11, and, recently started receiving error message about specific module/distribution

2024-04-01 Thread Jacob Kruger via Python-list
Found many, many mentions of errors, with some of the same keywords, 
but, no resolutions that match my exact issue at all.



As in, most of them are mentioning older versions of python, and, mainly 
different platforms - mac and linux, but, various google searches have 
not mentioned much of using it on windows, and having it just stop working.



Now did even try shifting over to python 3.12, but, still no-go.


If launch pyinstaller under python 3.10 on this exact same machine, 
pyinstaller runs - just keep that older version hovering around for a 
couple of occasional tests, partly since some of my target environments 
are still running older versions of python, but anyway.



Also, not really relevant, but, cx_freeze is perfectly able to generate 
executables for this same code, but, then not combining all output into 
a single file - will stick to that for now, but, not always as 
convenient, and, still wondering what changed here.



Jacob Kruger
+2782 413 4791
"Resistance is futile!...Acceptance is versatile..."


On 2024/03/31 14:51, Barry wrote:



On 31 Mar 2024, at 13:24, Jacob Kruger via Python-list  
wrote:

pkg_resources.DistributionNotFound: The 'altgraph' distribution was not found 
and is required by the application

I think I have seen this error being discussed before…

A web search for pyinstaller and that error leads to people discussing why it 
happens it looks like.

Barry



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


Re: A missing iterator on itertools module?

2024-04-01 Thread Mark Bourne via Python-list

Stefan Ram wrote:

ast  wrote or quoted:

Why did you renamed itertools as _itertools ?


   Assume I have a module A.py:

import math
def f(): pass

   . Assume I have an additional module B.py:

import A

   . Now, when I'm editing "B.py" in IDLE and type "A.", IIRC
   IDLE will offer me two possible completions: "A.math" and
   "A.f". The "A.math" makes no sense to me.


`import math` imports the `math` module and binds it to `math` in the 
global namespace of the `A` module.  Since it doesn't have a leading 
underscore, by default it's considered to be a public attribute of the 
`A` module, and IDLE is offering all the public attributes of the `A` 
module for completion.



I want it to go
   away. Therefore, I rewrite A.py as:

import math as _math
def f(): pass

   . Now, Idle will only offer the completion "A.f".

   So, I sometimes use this "import math as _math" style. But then,
   it is simpler for me to /always/ use this style; after all: you
   can't know whether someone eventually will import your module!


You can explicitly declare the public interface of a module by defining 
`__all__`, listing the names which should be considered part of the 
module's public interface; see:

- https://docs.python.org/3/reference/simple_stmts.html#the-import-statement
- https://peps.python.org/pep-0008/#public-and-internal-interfaces

Although `from A import *` is generally discouraged, if `A` defines 
`__all__` then only the names listed in `__all__` are bound in the 
importing module's namespace.  Otherwise, all names from `A` which don't 
have a leading underscore are considered to be public and bound in the 
importing module.


I don't use IDLE, but it may be that it also uses `__all__` to determine 
a module's public API.  In that case, setting `__all__ = ["f"]` in `A` 
should prevent it from offering `math` as a completion (nor any other 
name that's not in the `__all__` list).


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


Re: Making 'compiled' modules work with multiple python versions on Linux

2024-04-01 Thread Left Right via Python-list
It sounds weird that symbols from Limited API are _missing_ (I'd
expect them to be there no matter what library version you link with).
But, I haven't done this myself, so, what do I know?  It would help
though to see the actual error.

That aside: why do you want to do this? One side effect of doing what
you want will be the "weird" name of your wheel archive. Weird in a
sense that virtually nobody does that.  And when virtually nobody does
something, you are almost guaranteed to be the first to find bugs, and
then be the one whose bug reports are shoved into the backlog and
never looked at again.

You, kind of, are already walking into the world of pain trying to
make Python binary packages, and then you also want them to be
cross-platform, and then you want them to be usable by different
versions of Python... Unless it's for your own amusement, I'd just
have a package per version of Python. Maintenance-wise it's going to
be a lot easier.

On Fri, Mar 29, 2024 at 10:13 AM Barry via Python-list
 wrote:
>
>
>
> > On 28 Mar 2024, at 16:13, Olivier B. via Python-list 
> >  wrote:
> >
> > But on Linux, it seems that linking to libpython3.so instead of
> > libpython3.11.so.1.0 does not have the same effect, and results in
> > many unresolved python symbols at link time
> >
> > Is this functionality only available on Windows?
>
> Python limited API works on linux, but you do not link against the .so on 
> linux I recall.
>
> You will have missed that libpython3.so is a symlink to libpython3.11.so.10.
>
> Windows build practices do not translate one-to-one to linux, or macOS.
>
> Barry
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


xkcd.com/353 ( Flying with Python )

2024-04-01 Thread HenHanna via Python-list



https://xkcd.com/353/  ( Flying with  Python )




https://xkcd.com/1306/
 what does  SIGIL   mean?



Other  xkcd   that you like?
--
https://mail.python.org/mailman/listinfo/python-list


Re: xkcd.com/353 ( Flying with Python )

2024-04-01 Thread HenHanna via Python-list

Greg Ewing wrote:


On 30/03/24 7:21 pm, HenHanna wrote:

https://xkcd.com/1306/
  what does  SIGIL   mean?



I think its' a Perl term, referring to the $/@/# symbols in front of
identifiers.
 
 
 
   thanks!


 https://www.explainxkcd.com/wiki/index.php/1306:_Sigil_Cycle
--
https://mail.python.org/mailman/listinfo/python-list


Re: xkcd.com/353 ( Flying with Python )

2024-04-01 Thread Johanne Fairchild via Python-list
HenHanna  writes:

> https://xkcd.com/1306/
>  what does  SIGIL   mean?

  A glyph used in magic. Or, for Perl, the symbol in front of a variable
  name, such as $, @, and %.

  Source: 
  https://perldoc.perl.org/perlglossary#sigil

  Sigil is noun. Definitions:

  A seal; a signet.
  A sign or an image considered magical.
  A seal; a signature.

  Source:
  The American Heritage® Dictionary of the English Language, 
  5th Edition.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: xkcd.com/353 ( Flying with Python )

2024-04-01 Thread Blue-Maned_Hawk via Python-list
HenHanna wrote:

> https://xkcd.com/1306/
>   what does  SIGIL   mean?

I'd define a sigil as a mandatory symbol used to indicate the properties 
of a name.


-- 
Blue-Maned_Hawk│shortens to Hawk│/blu.mɛin.dʰak/│he/him/his/himself/Mr.
blue-maned_hawk.srht.site
“Do you know what you are?”  “Confused?”
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Multiplication

2024-04-01 Thread Piergiorgio Sartor via Python-list

On 01/04/2024 10.40, Stefan Ram wrote:

 Q: How can I multiply two variables in Python? I tried:
 
a = 2

b = 3
print( ab )

 but it did not work.

 A: No, this cannot work. To multiply, you need the multiplication
 operator. You can import the multiplication operator from "math":

 Code example:

from math import *

a = 2
b = 3
print( a * b )


I guess the operator "*" can be imported from any module... :-)

bye,

--

piergiorgio

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


Re: xkcd.com/353 ( Flying with Python )

2024-04-01 Thread HenHanna via Python-list

Johanne Fairchild wrote:


HenHanna  writes:



https://xkcd.com/1306/
 what does  SIGIL   mean?



  A glyph used in magic. Or, for Perl, the symbol in front of a variable
  name, such as $, @, and %.



  Source:   https://perldoc.perl.org/perlglossary#sigil



  Sigil is noun. Definitions:



  A seal; a signet.
  A sign or an image considered magical.
  A seal; a signature.



  Source:  The American Heritage® Dictionary of the English Language, 5th 
Edition.



 
 


omg...Sigil  is a real word???


The word "sigil" comes from the Latin term "sigillum," which means "little sign."  This Latin root is also 
the source of our English word "seal," making "sigil" and "seal" doublets.

 https://en.wiktionary.org/wiki/sigil



__words that we use in Programming   but not Found in a 
real dictionary :

  Camel case ,   int,char,   min,   len,  def,   elseif  


cons, defun,  cond,  goto,
--
https://mail.python.org/mailman/listinfo/python-list


Re: xkcd.com/353 ( Flying with Python )

2024-04-01 Thread inhahe via Python-list
On Mon, Apr 1, 2024 at 1:26 PM HenHanna via Python-list <
[email protected]> wrote:

> Johanne Fairchild wrote:
>
> > HenHanna  writes:
>
> >> https://xkcd.com/1306/
> >>  what does  SIGIL   mean?
>
> >   A glyph used in magic. Or, for Perl, the symbol in front of a variable
> >   name, such as $, @, and %.
>
> >   Source:   https://perldoc.perl.org/perlglossary#sigil
>
> >   Sigil is noun. Definitions:
>
> >   A seal; a signet.
> >   A sign or an image considered magical.
> >   A seal; a signature.
>
> >   Source:  The American Heritage® Dictionary of the English
> Language, 5th Edition.
>
>
>
>
>
> omg...Sigil  is a real word???
>
>
> The word "sigil" comes from the Latin term "sigillum," which means "little
> sign."  This Latin root is also the source of our English word "seal,"
> making "sigil" and "seal" doublets.
>
>   https://en.wiktionary.org/wiki/sigil
>
>
>
I understand "sigil" as referring to symbols occultists make up and use to
aid in their magick.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Multiplication

2024-04-01 Thread Joel Goldstick via Python-list
On Mon, Apr 1, 2024 at 1:26 PM Piergiorgio Sartor via Python-list
 wrote:
>
> On 01/04/2024 10.40, Stefan Ram wrote:
> >  Q: How can I multiply two variables in Python? I tried:
> >
> > a = 2
> > b = 3
> > print( ab )
> >
> >  but it did not work.
> >
> >  A: No, this cannot work. To multiply, you need the multiplication
> >  operator. You can import the multiplication operator from "math":
> >
> >  Code example:
> >
> > from math import *
> >
> > a = 2
> > b = 3
> > print( a * b )
>
> I guess the operator "*" can be imported from any module... :-)
>
> bye,
>
> --
>
> piergiorgio
>
> --
> https://mail.python.org/mailman/listinfo/python-list

>>> a = 3
>>> b = 5
>>> print(a*b)
15
>>>


No import is necessary.


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


Re: xkcd.com/353 ( Flying with Python )

2024-04-01 Thread PA via Python-list



> On Mar 30, 2024, at 22:09, Johanne Fairchild via Python-list 
>  wrote:
> 
>  Sigil is noun. Definitions:
> 
>  A seal; a signet.
>  A sign or an image considered magical.
>  A seal; a signature.


Creating Sigils
The origin and design process informing Urbit's generative user avatar system, 
Sigils.
https://urbit.org/blog/creating-sigils

Implementation example:

https://github.com/textprotocol/sigil

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


Re: Multiplication

2024-04-01 Thread D'Arcy Cain via Python-list

On 2024-04-01 12:35, Joel Goldstick via Python-list wrote:

On Mon, Apr 1, 2024 at 1:26 PM Piergiorgio Sartor via Python-list

  ^^^


from math import *

a = 2
b = 3
print( a * b )


I guess the operator "*" can be imported from any module... :-)

No import is necessary.


Of course not.  Check the date on the message.

--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:[email protected] VoIP: sip:[email protected]

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


Re: Multiplication

2024-04-01 Thread Avi Gross via Python-list
Is this a April 1 post for fools.

Multiplication with an asterisk symbol is built into python.

The same symbol used in other contexts has other contexts has an assortment
of largely unrelated meanings such as meaning everything when used to
import.


On Mon, Apr 1, 2024, 1:27 PM Piergiorgio Sartor via Python-list <
[email protected]> wrote:

> On 01/04/2024 10.40, Stefan Ram wrote:
> >  Q: How can I multiply two variables in Python? I tried:
> >
> > a = 2
> > b = 3
> > print( ab )
> >
> >  but it did not work.
> >
> >  A: No, this cannot work. To multiply, you need the multiplication
> >  operator. You can import the multiplication operator from "math":
> >
> >  Code example:
> >
> > from math import *
> >
> > a = 2
> > b = 3
> > print( a * b )
>
> I guess the operator "*" can be imported from any module... :-)
>
> bye,
>
> --
>
> piergiorgio
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Multiplication

2024-04-01 Thread dn via Python-list
The April Fools joke was on those of us who never received/have yet to 
receive @Stefan's OP.




On 2/04/24 08:02, Avi Gross via Python-list wrote:

Is this a April 1 post for fools.

Multiplication with an asterisk symbol is built into python.

The same symbol used in other contexts has other contexts has an assortment
of largely unrelated meanings such as meaning everything when used to
import.


On Mon, Apr 1, 2024, 1:27 PM Piergiorgio Sartor via Python-list <
[email protected]> wrote:


On 01/04/2024 10.40, Stefan Ram wrote:

  Q: How can I multiply two variables in Python? I tried:

a = 2
b = 3
print( ab )

  but it did not work.

  A: No, this cannot work. To multiply, you need the multiplication
  operator. You can import the multiplication operator from "math":

  Code example:

from math import *

a = 2
b = 3
print( a * b )


I guess the operator "*" can be imported from any module... :-)

bye,

--

piergiorgio

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



--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list


magic-wormhole 0.14.0

2024-04-01 Thread meejah via Python-list
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512


Greetings,

I'm pleased to announce that magic-wormhole 0.14.0 is released.

Magic Wormhole is a Python library and CLI tool to securely get
arbitrary data from one computer to another using short, one-time,
human- pronouncable codes and end-to-end encryption.

The library allows use of the lower-level protocol for things besides
file-transfer.

In this release are the following changes since 0.13.0:

* Add completion files for bash, zsh and fish (#498)
* Python 3.12 added to CI, versioneer updated (#505)
* Support streaming compression of directories (#503, from @pR0Ps)
* Remove obsolete compatibility code (thanks @a-detiste)
* Add "ecosystem" document

You can find the release on PyPI:

   https://pypi.org/project/magic-wormhole/

More information can be found:

   https://magic-wormhole.readthedocs.io/en/latest/welcome.html
   https://github.com/magic-wormhole/magic-wormhole


thanks,

meejah


-BEGIN PGP SIGNATURE-

iQEzBAEBCgAdFiEEnVor1WiOy4id680/wmAoAxKAaacFAmYLlrUACgkQwmAoAxKA
aadZqggA1vCsKH7ejaph6QoDXBBGTX0yff4NtdLv6zgT61CDxNzKe2VYAqMZFE49
aGMU8jw6/2KPGtA6cEmf1UeQ/byyxBn/bHijKztrjCbaF4CkVnptF4f7g9S6jLDf
f2BBj4gNJqEg343o0WmGQc9GbQWPZjHCnx/zFdQzy61PkHwxyg/pk+Esm0O7CXxQ
1j54IEtsNAzDhFtK8VlnIebT4wZkm+xQQ6yAtXcnPr/dLMag2ry6RY7xgB7zfaPz
Az6uzbH7ms6vxfegEky/ZDMVZd3G9bI1sfxpr73E8HRNh7+FkkLrSa+sviMePrmW
cHyMEhFBJSBpxbot1/2Lm/dhXy/yew==
=xl8F
-END PGP SIGNATURE-
-- 
https://mail.python.org/mailman/listinfo/python-list