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, n
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 >
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. temp_unbind
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, text='test'
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
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
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, name=route
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_ instal
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
>> spec
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 va
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
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 w
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 would
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 tha
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.:
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
>> co
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
> pygame.ini
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
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 describe
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, bu
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. H
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 a
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 "Start
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 sta
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 similar)"
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 Wind
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 -
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 inf
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 _
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* t
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 al
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 su
32 matches
Mail list logo