Re: Terminal Emulator

2024-05-14 Thread Mirko via Python-list
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,

Re: Extract lines from file, add to new files

2024-01-11 Thread Mirko via Python-list
Am 11.01.24 um 20:53 schrieb Rich Shepard via Python-list: On Thu, 11 Jan 2024, Piergiorgio Sartor via Python-list wrote: Why not to use bash script for all? Piergiorgio, That's certainly a possibility, and may well be better than python for this task. Thank you, Rich awk '/@/ {print

Re: Tkinter ttk Treeview binding responds to past events!

2023-09-12 Thread Mirko via Python-list
Am 12.09.23 um 07:43 schrieb John O'Hagan via Python-list: My issue is solved, but I'm still curious about what is happening here. MRAB already said it: When you enter the callback function, Tk's mainloop waits for it to return. So what's happening is: 1. Tk's mainloop pauses 2.

Re: Tkinter ttk Treeview binding responds to past events!

2023-09-11 Thread Mirko via Python-list
Am 11.09.23 um 14:30 schrieb John O'Hagan via Python-list: I was surprised that the code below prints 'called' three times. from tkinter import * from tkinter.ttk import * root=Tk() def callback(*e):     print('called') tree = Treeview(root) tree.pack() iid = tree.insert('', 0,

Re: GNU gettext: Print string translated and untranslated at the same time

2023-08-17 Thread Mirko via Python-list
Am 17.08.23 um 21:17 schrieb c.buhtz--- via Python-list: Hello Mirko, thanks for reply. Am 17.08.2023 18:19 schrieb Mirko via Python-list: You could solve it by defining _() locally like so: def foobar(translate):     _ = gettext.gettext I see no way to do that. It is not the "class

Re: GNU gettext: Print string translated and untranslated at the same time

2023-08-17 Thread Mirko via Python-list
Am 17.08.23 um 09:10 schrieb c.buhtz--- via Python-list:     UnboundLocalError: local variable '_' referenced before assignment This is a common gotcha: https://docs.python.org/3/faq/programming.html#why-am-i-getting-an-unboundlocalerror-when-the-variable-has-a-value You could solve it by

Re: why function throws an error?

2022-06-28 Thread Mirko via Python-list
Am 28.06.22 um 09:57 schrieb נתי שטרן: def add_route(self, route): #""" Add a route object, but do not change the :data:`Route.app` #attribute.""" self.routes.append(route) self.router.add(route.rule, route.method, route,

Re: No shortcut Icon on Desktop

2022-04-15 Thread Mirko via Python-list
Am 15.04.2022 um 18:53 schrieb Mats Wichmann: > On 4/15/22 08:59, Grant Edwards wrote: > >> Of course it's easy to add. But, we're talking about people who have >> no idea how to do that. They have no clue how to "navigate to the >> install directory". They don't even realize anything _was_

Re: No shortcut Icon on Desktop

2022-04-14 Thread Mirko via Python-list
Am 13.04.2022 um 20:39 schrieb Dennis Lee Bieber: > On Thu, 14 Apr 2022 03:38:11 +1000, Tim Deke declaimed > the following: > >> Dear Sir, >> >> I have successfully downloaded Python into my laptop but the shortcut icon >> is not appearing on the desktop. I am using Windows 10 with the PC >>

Re: Functionality like local static in C

2022-04-14 Thread Mirko via Python-list
Am 14.04.2022 um 17:02 schrieb Cecil Westerhof via Python-list: > In C when you declare a variable static in a function, the variable > retains its value between function calls. > The first time the function is called it has the default value (0 for > an int). > But when the function changes the

Re: venv and executing other python programs

2022-02-15 Thread Mirko via Python-list
Am 15.02.2022 um 08:53 schrieb Barry Scott: > Or are you running the program from the command line after activating the > venv? This ... Am 15.02.2022 um 11:18 schrieb Roel Schroeven: > Suppose you're working on a program which, for example, prints json > to stdout. And suppose you want to use a

venv and executing other python programs

2022-02-14 Thread Mirko via Python-list
Hi, I have recently started using venv for my hobby-programming. There is an annoying problem. Since venv modifies $PATH, python programs that use the "#!/usr/bin/env python" variant of the hashbang often fail since their additional modules aren't install inside in venv. How to people here deal

Re: Python script accessing own source code

2021-05-12 Thread Mirko via Python-list
Am 12.05.2021 um 20:41 schrieb Robin Becker: > ... >> >> with open(__file__) as myself: >> print(myself.read(), end='') > > very nice, but accessing code that's already seems quite easy. I > think the real problem is to get a python script name that creates > and writes itself. So I

Re: The importance of mental health

2021-05-10 Thread Mirko via Python-list
Am 10.05.2021 um 15:16 schrieb Kyle Stanley: > Hey all, > > In these last few months, I have been in the process of healing from some > pretty heavy past trauma. And now that I am on the road to recovery, I want > to share my journey with the Python community in hopes that it may reach > those

Re: OT: Autism in discussion groups

2021-05-10 Thread Mirko via Python-list
Am 09.05.2021 um 02:34 schrieb Michael Torrie: > On 5/8/21 3:28 PM, Mirko via Python-list wrote: >> >> I apologize for this OT post, especially because it's in reply to an >> at least partly troll post, but I just can't resist. Sorry. >> >> P.S.: *NOT* amo

OT: Autism in discussion groups (was: Re: Proposal: Disconnect comp.lang.python from python-list)

2021-05-08 Thread Mirko via Python-list
I apologize for this OT post, especially because it's in reply to an at least partly troll post, but I just can't resist. Sorry. Am 08.05.2021 um 14:09 schrieb Talkie Toaster: > On 06/05/2021 18:56, Mark Lawrence wrote: >> Quite frankly I don't care how this discussion goes as the Python >>

Re: text displays on screen only when I click to exit the program

2021-04-30 Thread Mirko via Python-list
Am 30.04.2021 um 20:55 schrieb Quentin Bock: > code with comments for context: > > #Create a text based game where the user must find 3 items before > completing a level > #imports and variables for game > import pygame > from pygame import mixer > running = True > #initializes pygame >

Re: UI design: combobox or radiobuttons?

2021-04-13 Thread Mirko via Python-list
Am 13.04.2021 um 23:53 schrieb Rich Shepard: > My applications use environmental data, each of which has to specify > the > units (e.g., cm, m, km, ft, yd, mi). With the widget sets I've used > (wxPython and TKinter) I've always used a combobox with the acceptable > choices in it. I'm now planning

Re: neonumeric - C++ arbitrary precision arithmetic library

2021-03-08 Thread Mirko via Python-list
Am 07.03.2021 um 21:52 schrieb Avi Gross via Python-list: > The precedence example used below made a strange assumption that the > imaginary program would not be told up-front what computer language it was > being asked to convert from. That is not the scenario being discussed as we > have

Re: neonumeric - C++ arbitrary precision arithmetic library

2021-03-06 Thread Mirko via Python-list
Am 06.03.2021 um 22:24 schrieb Ben Bacarisse: > Mr Flibble writes: > >>> Someone who says that he is capable of writing a compiler that >>> translates every language has megalomania. No one can do this. >> >> Just because you can't make one it doesn't follow that nobody else >> can. > > True,

Re: Why assert is not a function?

2021-03-02 Thread Mirko via Python-list
Am 02.03.2021 um 23:09 schrieb Stestagg: > Ignoring the question about this feature being particularly useful, it It is useful because "assert" is primarily (if not purely and exclusive) a debugging tool during development and testing. In production code you don't want any asserts, but logging.

Re: Installing Python (2.7) 'by hand' on Ubuntu - possible?

2020-12-22 Thread Mirko via Python-list
On 22.12.2020 at 20:24 Chris Green wrote: > Yes, I do have the Python source. The only thing I don't have the > source for is a .so file and that's why I can't simply migrate the > program(s) from Python 2 to Python 3. > If it's just one .so and that library is compatible with basic libs such

Re: Problem

2020-10-04 Thread Mirko via Python-list
Am 03.10.2020 um 17:25 schrieb Dennis Lee Bieber: > On Fri, 2 Oct 2020 21:47:38 +0200, Hexamorph declaimed > the following: > > >> >> - Add a folder named "Python.org " (or similar) to the >> desktop with shortcuts to Python, IDLE and the CHM. >> >> - Add a checkbox (default enabled) like

Re: Problem

2020-10-02 Thread Mirko via Python-list
Am 02.10.2020 um 11:58 schrieb Terry Reedy: > On 10/1/2020 4:09 PM, Mirko via Python-list wrote: > >> Renaming "IDLE" to "Python IDE" (or similar) might also. > "IDLE" intentionally echoes 'Idle', as in Eric Idle of Monty > Python. It stands for &q

Re: Problem

2020-10-01 Thread Mirko via Python-list
Am 01.10.2020 um 22:17 schrieb Chris Angelico: > Maybe those usability improvements have already been done. Haven't doubted that. Maybe they are just not enough yet. > Renaming Idle to "Python IDE" would be a very bad idea, since there > are many other Python IDEs. You missed the "(or

Re: Problem

2020-10-01 Thread Mirko via Python-list
Am 30.09.2020 um 23:44 schrieb Chris Angelico: > On Thu, Oct 1, 2020 at 7:33 AM Mirko via Python-list >> We are seeing these troubles from newcomers on Windows all of the >> time -- and that for years. Isn't it time to ask if the way Python >> installs itself on Windows-S

Re: Problem

2020-09-30 Thread Mirko via Python-list
Am 30.09.2020 um 17:55 schrieb Dennis Lee Bieber: > On Tue, 29 Sep 2020 22:31:18 + (UTC), Ron Villarreal via Python-list > declaimed the following: > >> Tried to open Python 3.8. I have Windows 10. Icon won’t open. > > What "Icon"? > > Python is a language interpreter/compiler

Re: Python error

2020-04-02 Thread Mirko via Python-list
Am 02.04.2020 um 20:09 schrieb J Conrado: > Hi, > > I have the version of python installed: > Python 3.7.6 and Python 3.8.1 > If I type: > python > Python 3.7.6 (default, Jan 8 2020, 19:59:22) > [GCC 7.3.0] :: Anaconda, Inc. on linux > Type "help", "copyright", "credits" or "license" for more

Re: Most elegant way to do something N times

2019-12-22 Thread Mirko via Python-list
Am 22.12.2019 um 21:34 schrieb Batuhan Taskaya: > I encounter with cases like doing a function 6 time with no argument, or > same arguments over and over or doing some structral thing N times and I > dont know how elegant I can express that to the code. I dont know why but I > dont like this for _

Re: Python shows error on line 15 that i cant fix

2019-09-21 Thread Mirko via Python-list
Am 21.09.2019 um 19:57 schrieb Dave Martin: > Can you provide an example of how to use the suite feature. Thank you. > There is no suite feature, Terry just tried to explain indented blocks to you in simple words. Really, indented blocks are one of the most basic aspects of Python. You *need*

Re: Definite or indefinite article for non-singletons?

2019-07-27 Thread Mirko via Python-list
Am 27.07.2019 um 23:10 schrieb Chris Angelico: > When talking about indistinguishable objects, is it correct to talk > about "the " or "an "? > > Example: > > def f(s): > """Frob a thing. > > If s is an empty string, frobs all the things. > OR > If s is the empty string, frobs

[OT] How to improve my programming skills?

2017-06-01 Thread Mirko via Python-list
Hello everybody! TLDR: Sorry for OT. Long-time Linux geek and hobby programmer wants to improve his coding skills. What's most important: project planing, algorithms and data structures, contributing to FOSS, web development, learning other languages or something else? Sorry for posting