Re: ÿ in Unicode

2020-03-05 Thread Ben Bacarisse
moi  writes:

 'ÿ'.encode('utf-8')
> b'\xc3\xbf'
 'ÿ'.encode('utf-16-le')
> b'\xff\x00'
 'ÿ'.encode('utf-32-le')
> b'\xff\x00\x00\x00'

That all looks as expected.  Is there something about the output that
puzzles you?  Did you have a question?

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


Pip borks the #! line when installing pylint from Python sandbox

2020-03-05 Thread Skip Montanaro
I originally sent this to the code-quality list, but in retrospect (and
considering the crickets), I think c.l.py would have been a better starting
point.



I'm working on Python from GitHub, so have a fork which I check out
and keep synced with the main repo. I run pylint on my code (which is
nominally aimed at finding its way into Python someday), so installed
it using pip:

./python -m pip install --user pylint

(I prefer to tie pylint to the Python version I'm working on, if for
no other reason than that as Python 3.9alpha moves along, this might
flag something needing the Pylint team's attention.) This downloads
whatever is necessary and installs it. Unfortunately, instead of
creating a #! line of something like

#!/home/skip/src/python/cpython/python

it generates

#!/usr/local/bin/python3.9

I didn't specify any sort of --prefix location when I configured, as I
don't intend to install the code I'm working on. Mostly I just run
"make test." I saw nothing like an --inplace flag in either Python's
configure or pip's help output. It's not at all clear that I should
give --prefix=$(pwd) to pip as I think that would install all
subsidiary modules (pylint, astroid, etc) inside my Python sandbox. Is
there some way coax pip into referencing my sandbox python executable,
or will I be forced to edit the relevant command scripts once they are
installed in ~/.local/bin?

Thanks,

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


Re: Pip borks the #! line when installing pylint from Python sandbox

2020-03-05 Thread Souvik Dutta
The directory you stated is indeed the default directory as stated here
https://unix.stackexchange.com/questions/240037/why-did-pip-install-a-package-into-local-bin
What happens when you explicitly state the location where you want to store
the package? Have you tried it?


On Thu, Mar 5, 2020, 9:45 PM Skip Montanaro 
wrote:

> I originally sent this to the code-quality list, but in retrospect (and
> considering the crickets), I think c.l.py would have been a better
> starting
> point.
>
> 
>
> I'm working on Python from GitHub, so have a fork which I check out
> and keep synced with the main repo. I run pylint on my code (which is
> nominally aimed at finding its way into Python someday), so installed
> it using pip:
>
> ./python -m pip install --user pylint
>
> (I prefer to tie pylint to the Python version I'm working on, if for
> no other reason than that as Python 3.9alpha moves along, this might
> flag something needing the Pylint team's attention.) This downloads
> whatever is necessary and installs it. Unfortunately, instead of
> creating a #! line of something like
>
> #!/home/skip/src/python/cpython/python
>
> it generates
>
> #!/usr/local/bin/python3.9
>
> I didn't specify any sort of --prefix location when I configured, as I
> don't intend to install the code I'm working on. Mostly I just run
> "make test." I saw nothing like an --inplace flag in either Python's
> configure or pip's help output. It's not at all clear that I should
> give --prefix=$(pwd) to pip as I think that would install all
> subsidiary modules (pylint, astroid, etc) inside my Python sandbox. Is
> there some way coax pip into referencing my sandbox python executable,
> or will I be forced to edit the relevant command scripts once they are
> installed in ~/.local/bin?
>
> Thanks,
>
> Skip Montanaro
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What is the correct interpreter

2020-03-05 Thread Souvik Dutta
You might try checking windows app management aliases by just tpying app
management aliases in the search bar. There you should find two different
version of python. One is the python which was available earlier in windows
Store and the other one is the one you have installed in your machine. Try
switching on and off alternatively till you drop facing your problem.

On Thu, Mar 5, 2020, 4:59 AM Jim Ferraro  wrote:

> Where is the correct interpreter?
> I have installed python several times
> Pycharm all ways selects
>
> C:\ProgramFiles\JetBrains\PyCharm Community Edition
> 2019.3.3\bin\pycharm64.exe
> But when I run a simple code it objects to the interpreter???
>
>
> Sent from Mail for
> Windows 10
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Pip borks the #! line when installing pylint from Python sandbox

2020-03-05 Thread Skip Montanaro
>
> The directory you stated is indeed the default directory as stated here
>
> https://unix.stackexchange.com/questions/240037/why-did-pip-install-a-package-into-local-bin
> What happens when you explicitly state the location where you want to
> store the package? Have you tried it?
>
>> 
>
>
I had not, but as I expected, setting prefix to my sandbox, I wound up with
everything installed inside my sandbox. In addition, the pylint command (as
well as others in $PWD/bin) still referenced #!/usr/local/bin/python3.9.

It's okay. I kind of thought I might be stuck. After all, I'm asking pip to
do something for which it wasn't designed. I was hoping I'd missed
something. (A --executable=/path/to/python/executable option would be nice.)

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


Re: Application setup like windows msi

2020-03-05 Thread Christian Gollwitzer

Am 05.03.20 um 02:48 schrieb Michael Torrie:

On 3/4/20 4:51 PM, J A wrote:

I was wondering g if there was a way to distribute an application that took
advantage of user input like a windows .msi does. On linux of course.


Several installer frameworks can make interactive installers for Linux.
There's the NullSoft installer and InstallerVICE.  And quite a few
commercial packages have rolled their own installers. Although I find
installers of any kind of annoying on Linux and don't seem all that
necessary.


+1!

On Linux, the most reasonable binary distribution is a .tar.bz2 package 
which extracts a folder with a startup script. This works on every Linux 
distribution and is one of the most common ways for Firefox etc. Of 
course, if you can afford to offer several packages, the other 
recommended way is packages for the system package manager - but this 
means it is system-dependent - or the newer things like flatpak and 
snap. However the tarball is the thing that always works, even for me as 
a user without root access.


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


Re: Application setup like windows msi

2020-03-05 Thread Grant Edwards
On 2020-03-05, Michael Torrie  wrote:
> On 3/4/20 4:51 PM, J A wrote:
>> I was wondering g if there was a way to distribute an application that took
>> advantage of user input like a windows .msi does. On linux of course.
>
> Several installer frameworks can make interactive installers for Linux.
> There's the NullSoft installer and InstallerVICE.  And quite a few
> commercial packages have rolled their own installers. Although I find
> installers of any kind of annoying on Linux and don't seem all that
> necessary.

I prefer a .tar file and a readme.txt file that says to run setup.py.

But then again, I run Gentoo. ;)

-- 
Grant Edwards   grant.b.edwardsYow! I guess it was all a
  at   DREAM ... or an episode of
  gmail.comHAWAII FIVE-O ...

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