All right, now let's verify that tk is not there (otherwise it might be
there but corrupted or not loadable for some reason).
Open Windows Explorer and navigate it to the Python directory as I
described in my last message. The navigate to the subdirectory named
"DLLs". If tkinter is installed
Types are available if you want to use them.
https://www.pythontutorial.net/python-basics/python-type-hints/
From: Python-list on
behalf of Pancho via Python-list
Date: Friday, November 11, 2022 at 6:28 PM
To: python-list@python.org
Subject: Re: Need max values in list of tuples, based on pos
RUN is a global constant, and the method is documented, explaining why the
parameter is there:
# Copy globals as function locals to make sure that they are available
# during Python shutdown when the Pool is destroyed.
def __del__(self, _warn=warnings.warn, RUN=RUN):
From: Python-lis
On 2022-11-12 at 15:03:10 +,
"Weatherby,Gerard" wrote:
> Types are available if you want to use
> them. https://www.pythontutorial.net/python-basics/python-type-hints/
Python has always been a strongly typed language.
Recent changes have given it some level of static type checking in
additi
On 11/11/22 16:47, Cameron Simpson wrote:
On 11Nov2022 15:29, Ian Pilcher wrote:
* Can I improve the 'if callable(factory):' test above? This treats
all non-callable objects as classmethods, which is obviously not
correct. Ideally, I would check specifically for a classmethod, but
there do
On 11/12/2022 11:48 AM, darkst...@o2online.de wrote:
Hello Thomas,
there is a “_tkinter.pyd” in the *.dll Directory. Is there something
more, I can check?
Yes, look in the "Lib" (NOT "libs") subdirectory of the Python tree and
see if it has a subdirectory named "tkinter". That's where it is
On 12/11/2022 10:01, Stefan Ram wrote:
> Many readers here know interactive Python sessions with
> prompts like ">>>". But a "session" could be something else.
> One could imagine that when starting a new session, one
> still sees all the variables and constants defined in
> preceding s
On Fri, 11 Nov 2022 21:20:10 -0500, DFS declaimed the
following:
>Yeah, I don't know why cursor.description doesn't work with SQLite; all
>their columns are basically varchars.
>
If you read PEP 249 (the general DB-API), everything except column name
and data type code are optional. And
On 13/11/2022 05.05, Stefan Ram wrote:
Wayne Harris writes:
Wow. Could the dis module help at all?
Thank you for this idea! I think this should work, but only
under CPython and not necessarily across different Python
versions. Still, I might use dis.
Was constructing a two-part tu
Use the inspect module as Cameron suggested.
import inspect
def analyze_class(clzz):
"""Analyze a class proof of concept"""
assert inspect.isclass(clzz)
for k, v in inspect.getmembers(clzz, lambda v: inspect.isfunction(v) or
inspect.ismethod(v)):
if inspect.ismethod(v):
Sounds like Jupyter Notebooks: https://jupyter.org
From: Python-list on
behalf of Stefan Ram
Date: Saturday, November 12, 2022 at 1:48 PM
To: python-list@python.org
Subject: Persisting functions typed into the shell
*** Attention: This is an external email. Use caution responding, opening
at
On Sat, 12 Nov 2022 13:24:37 -0500, Dennis Lee Bieber
declaimed the following:
> Granted, this will NOT work with "select *" unless one does the select
>*/fetchall first, AND extracts the names from the cursor description --
>then run a loop to create the select max(length(col)), ... state
On 11/12/22, darkst...@o2online.de wrote:
>
import _tkinter
> Traceback (most recent call last):
> File "", line 1, in
> ImportError: DLL load failed while importing _tkinter: Das angegebene Modul
> wurd
> e nicht gefunden.
Loading the extension module "_tkinter.pyd" tries to load two TCL
On 12Nov2022 18:44, Weatherby,Gerard wrote:
Use the inspect module as Cameron suggested.
My suggestions was not for the post-construction class attributes but
for the comtents of the "_attrs" mapping. Post construction the class
method is callable. But the classmethod object stashed in "_att
On 12Nov2022 10:34, Ian Pilcher wrote:
So I've done this.
class _HasUnboundClassMethod(object):
@classmethod
def _classmethod(cls):
pass # pragma: no cover
_methods = [ _classmethod ]
_ClassMethodType = type(_HasUnboundClassMethod._methods[0])
Which allo
On Sun, 13 Nov 2022 at 05:48, Stefan Ram wrote:
> So much for the topic of "In Python, /everything/ is an
> object"! There seem to be first and second-class objects:
> Shelveable and non-shelveable objects.
>
That's a bit unfair. Everything IS an object, but not all objects can
be treated t
On 11/12/22 14:57, Cameron Simpson wrote:
You shouldn't need a throwaway class, just use the name "classmethod"
directly - it's the type!
if not callable(factory):
if type(factory) is classmethod:
# replace fctory with a function calling factory.__func__
On 13Nov2022 07:57, Cameron Simpson wrote:
# replace fctory with a function calling factory.__func__
factory = lambda arg: factory.__func__(classmethod, arg)
It just occurred to me that you might need to grab the value of
factory.__func__ first:
factory0 = factory
On 13Nov2022 10:08, Cameron Simpson wrote:
On 13Nov2022 07:57, Cameron Simpson wrote:
# replace fctory with a function calling factory.__func__
factory = lambda arg: factory.__func__(classmethod, arg)
It just occurred to me that you might need to grab the value of
factor
19 matches
Mail list logo