I wish to write a terminal emulator in Python. I am a fairly
competent Python user, and I wish to try a new project idea. What
references can I use when writing my terminal emulator? I wish for
it to be a true terminal emulator as well, not just a Tk text widget
or something like that.
If you have any advice, please do let me know!
true terminal emulator as well, not just a Tk text widget or something like thatIf you want to write a GUI terminal, than that *is* a terminal
I wish to write a terminal emulator in Python. I am a fairly competent
Python user, and I wish to try a new project idea. What references can
I use when writing my terminal emulator? I wish for it to be a true
terminal emulator as well, not just a Tk text widget or something like
that.
I wish to write a terminal emulator in Python.
We need somethin like a portable curses module (plus colorama)
We need somethin like a portable curses module (plus colorama) and
it has got to work on both Windoze and Linux straight out of the box
in standard Python.
On 15 May 2024 10:31:25 GMT, Stefan Ram wrote:
We need somethin like a portable curses module (plus colorama) and
it has got to work on both Windoze and Linux straight out of the box
in standard Python.
Something else for Windows Python users to complain that they cannot get
to install properly?
On 16/05/2024 01:12, Lawrence D'Oliveiro wrote:
On 15 May 2024 10:31:25 GMT, Stefan Ram wrote:
We need somethin like a portable curses module (plus colorama) and it
has got to work on both Windoze and Linux straight out of the box in
standard Python.
Something else for Windows Python users to complain that they cannot
get to install properly?
To be fair, the problem is the fact that they use Windows (but I guess
Linux users have to deal with venvs, so we're even.
Am 14.05.24 um 19:44 schrieb Gordinator via Python-list:
I wish to write a terminal emulator in Python. I am a fairly competent Python user, and I wish to try a new project idea. What references can I use when writing my terminal emulator? I wish for it to be a true
terminal emulator as well, not just a Tk text widget or something like that.
If you have any advice, please do let me know!
Not sure, what you mean with:
true terminal emulator as well, not just a Tk text widget orIf you want to write a GUI terminal, than that *is* a terminal emulator and *has* a text widget as its visible core. If you want to write something like getty which runs on the virtual terminals (Ctrl+Alt+F*) than that is a terminal (not a terminal emulator).
something like that
On 2024-05-14, Alan Gauld via Python-list <python-list@python.org> wrote:
On 14/05/2024 18:44, Gordinator via Python-list wrote:
I wish to write a terminal emulator in Python. I am a fairly
competent Python user, and I wish to try a new project idea. What
references can I use when writing my terminal emulator? I wish for
it to be a true terminal emulator as well, not just a Tk text
widget or something like that.
The first thing is to decide which terminal.
If you want to make life easier, make it a superset of a terminal that already exists in the terminfo database.
Going with some sort of ANSI terminal will probably provide
operability even with dumb apps which ignore $TERM and just spit out
basic ANSI escape sequences.
If you really want to break trail, you could invent your own control sequences, which means you'll have to write terminfo and/or termcap
entries as well as the terminal emulator.
A VT100 is very different from a 3270. And even a VT330 is quite
different from a VT100 although sharing a common subset of control
codes. And if you start looking at graphical terminals things get
even more interesting!
"Intersting" is putting it mildly...
To be fair, the problem is the fact that they use Windows (but I guess Linux users have to deal with venvs, so we're even.
I wish to write a terminal emulator in Python. I am a fairly competent
Python user, and I wish to try a new project idea. What references can I
use when writing my terminal emulator? I wish for it to be a true
terminal emulator as well, not just a Tk text widget or something like
that.
If you have any advice, please do let me know!
On 2024-05-18, Peter J. Holzer via Python-list <python-list@python.org> wrote:
On 2024-05-16 19:46:07 +0100, Gordinator via Python-list wrote:
To be fair, the problem is the fact that they use Windows (but I
guess Linux users have to deal with venvs, so we're even.
I don't think Linux users have to deal with venvs any more than
Windows users. Maybe even less because many distributions come with
a decent set of Python packages.
I've been using Python on Linux almost daily for 25 years,
yet to use a venv...
So venvs make managing all that pretty convenient. Dunno why everybody's
so down on venvs...
On 18/05/2024 19:12, Piergiorgio Sartor via Python-list wrote:
[snip]
The dependency nightmare created by python, pip
and all the rest cannot be resolved otherwise.
I've honestly never experienced this "nightmare".
I install stuff and it just works.
I've honestly never experienced this "nightmare".
I install stuff and it just works.
Was there a reason they chose the name Pip?
On Sun, 19 May 2024 08:32:46 +0100, Alan Gauld wrote:
I've honestly never experienced this "nightmare".
I install stuff and it just works.
Hear! Hear! Me too! And all that.
I'm on Manjaro, which is a tad finicky about other people touching its
Python since it's used for lots of things. I install things for myself
only.
Was there a reason they chose the name Pip?
Was there a reason they chose the name Pip?
On 18 May 2024, at 16:27, Peter J. Holzer via Python-list <python-list@python.org> wrote:
I don't think Linux users have to deal with venvs
On 18 May 2024, at 16:27, Peter J. Holzer via Python-list <python-list@python.org> wrote:
I don't think Linux users have to deal with venvs
Modern debian (ubuntu) and fedora block users installing using pip.
You must use a venv to pip install packages from pypi now.
Modern debian (ubuntu) and fedora block users installing using pip.
Even if you're telling it to install in ~/.local? I could see not allowing
to run it as root.
$ pip install --user docopt
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application, it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at
the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
Modern debian (ubuntu) and fedora block users installing using pip.
Even if you're telling it to install in ~/.local? I could see not allowing
to run it as root.
I honestly haven't tried. Maybe I should... 🤔 I have an old laptop running XUbuntu 22.04 which I generally only use to compile the most recent
branches on GitHub (main, 3.12, & 3.13 at the moment).
On 2024-05-19, Barry via Python-list <python-list@python.org> wrote:
On 18 May 2024, at 16:27, Peter J. Holzer via Python-list <python-list@python.org> wrote:
I don't think Linux users have to deal with venvs
Modern debian (ubuntu) and fedora block users installing using pip.
You can't even use pip to do "user" installs?
Grant
Am Sun, May 19, 2024 at 10:45:09PM +0100 schrieb Barry via Python-list:
On 18 May 2024, at 16:27, Peter J. Holzer via Python-list <python-list@python.org> wrote:
I don't think Linux users have to deal with venvs
Modern debian (ubuntu) and fedora block users installing using pip.
You must use a venv to pip install packages from pypi now.
Which makes one wonder how one is supposed to package Python
applications requiring modules not yet packaged by Debian.
Skip Montanaro via Python-list schreef op 20/05/2024 om 0:08:
Modern debian (ubuntu) and fedora block users installing using pip.
Even if you're telling it to install in ~/.local? I could see not allowing to run it as root.
I assumed pip install --user would work, but no. I tried it (on Debian 12 (bookworm)):
$ pip install --user docopt
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application, it may be easiest to use pipx install xyz, which will manage a virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
Exactly the same output for sudo pip install.
You can override this, at the risk of breaking your Python
installation or OS, by passing --break-system-packages.
I'm on Manjaro
On 2024-05-20 00:26:03 +0200, Roel Schroeven via Python-list wrote:
Skip Montanaro via Python-list schreef op 20/05/2024 om 0:08:
Modern debian (ubuntu) and fedora block users installing using pip.
Even if you're telling it to install in ~/.local? I could see not allowing >>> to run it as root.
I assumed pip install --user would work, but no. I tried it (on Debian 12
(bookworm)):
$ pip install --user docopt
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv. >>> Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application, >>> it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python
installation or OS distribution provider. You can override this, at the
risk of breaking your Python installation or OS, by passing
--break-system-packages.
hint: See PEP 668 for the detailed specification.
Exactly the same output for sudo pip install.
This message (quoted in all its glory) is too long to be useful. The important bit is at the end:
You can override this, at the risk of breaking your Python
installation or OS, by passing --break-system-packages.
(I admit I didn't see this the first time I got this message)
python3 -m pip install --user --break-system-packages <packagename>
does indeed install into ~/.local/lib/python3.XX/site-packages.
This inconvenient, but otoh I have accidentally installed packages into ~/.local in the past, so maybe it's good to make that more explicit.
hp
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 50:36:12 |
Calls: | 10,397 |
Calls today: | 5 |
Files: | 14,067 |
Messages: | 6,417,317 |
Posted today: | 1 |