Re: os.stat bug?

2011-03-21 Thread Christian Heimes
n? It's mostly likely a problem with the OS, hardware and/or your configuration. Python doesn't come with its own stat() implementation. os.stat() just wraps the libc's stat() function. The heavy lifting is done inside libc and the kernel. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: os.utime

2011-03-21 Thread Christian Heimes
confusing bug in our code base a while ago. After I fixed the ownership of a bunch of files, the ctime was newer than the mtime. A library couldn't handle that and we got ourself a nice exception. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: "in house" pypi?

2011-03-24 Thread Christian Heimes
very package and download the files into these directories The download link for e.g. lxml 2.3 should look like http://your.pipy.com/simple/lxml/lxml-2.3.tar.gz. Now point run "easy_install --index-url http://your.pipy.com/simple lxml==2.3" Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: "in house" pypi?

2011-03-24 Thread Christian Heimes
thon 2.6 and JRE including extension modules in our svn. Only on Unix we install Python and extension from source. It's a rather practical solution. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Equivalent code to the bool() built-in function

2011-04-18 Thread Christian Heimes
or rather useful. It allows multi-xor tests like: if a + b + c + d != 1: raise ValueError("Exactly one of a, b, c or d must be true.") Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL: The _imaging C module is not installed

2011-05-06 Thread Christian Heimes
led packages. http://www.pythonware.com/products/pil/ offers X86 Windows binaries for 1.1.7. You might run into a problem with 1.1.7 Windows binaries. The freetype C library references a debug CRT that is not available on all machines. You can easily patch the _imagingft.pyd file with a hex editor

Re: if statement multiple or

2011-05-06 Thread Christian Heimes
the problem if any(s not in line for s in ('a', 'b', 'c')): # do something Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: if statement multiple or

2011-05-06 Thread Christian Heimes
I would write the test as: if set(line).isdisjoint("abc"): print line Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL: The _imaging C module is not installed

2011-05-09 Thread Christian Heimes
tree so selftest can find it. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: hash values and equality

2011-05-20 Thread Christian Heimes
's implementation doesn't use buckets to reduce memory usage and pointer dereferencing. If a slot in the hash table is already filled with an object that is not equal to the new object (a collision), the hash is shifted and the new slot is checked. The implementation detail is well descr

Re: float("nan") in set or as key

2011-05-29 Thread Christian Heimes
ions of millions of different NaN values. There are positive and negative NaNs, quiet NaNs and signaling NaNs. 50 of 52 mantissa bits can vary freely, one bit makes the difference between signaling and quiet NaNs and at least one bit must be non-zero. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Python regexp exclude problem

2011-06-01 Thread Christian Heimes
ut this problem? I recommend the ipaddr module [1] for the job. It supports nice features like: if IPAddress("144.122.23.42") in IPNetwork("144.122.0.0/16"): ... Christian [1] http://pypi.python.org/pypi/ipaddr -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple board game GUI framework

2017-09-13 Thread Christian Gollwitzer
nt input fields, hence objects. In some other more statically compiled languages, OO is shoehorned into everything ("abstract factory" and that stuff), because virtual calls are the only way to get dynamic behaviour / late binding. In Python you use OO only in places where it really makes s

Re: "tkinter"

2017-09-13 Thread Christian Gollwitzer
people prefer spelling "T C L", but most use "tickle". Reference: I've been at some EuroTcl conferences. The talks are on youtube, too: https://www.youtube.com/playlist?list=PLHNnTryxvDncfQbxbzfE4XMogoTa6pknP Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: on a very slow function

2017-10-01 Thread Christian Gollwitzer
last = (last**2 + c) % N If I have understood what it does, then the result should be the same. Furthermore, as Chris said, Python has built-in generators for this thing. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: The "loop and a half"

2017-10-04 Thread Christian Gollwitzer
concepts and apply them to new problems, they said. "We're really making it difficult for students because we are distracting them from the underlying math," said Jennifer Kaminski, a research scientist at Ohio State University, whose study appears in the journal Science.Reuters,

Re: Pedagogical style [was Re: The "loop and a half"]

2017-10-05 Thread Christian Gollwitzer
Am 05.10.17 um 19:04 schrieb Steve D'Aprano: On Thu, 5 Oct 2017 07:29 am, Christian Gollwitzer wrote: To understand Stefan's way of teaching, take a look at his other courses, for example the C++ course: Thanks for this Christian. It has been an eye-opener. More comments below

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Christian Gollwitzer
, which is not extremely bad, but still does tell nothing about the intent of that line. Writing the typedef is easy for humans, stick * in front of the function name for a regular declaration and add (). The compiler can then figure out the complete type on its own, it's its job, not mi

Re: OT Lies in education [was Re: The "loop and a half"]

2017-10-13 Thread Christian Gollwitzer
that way, and they are lovely for tourists: https://en.wikipedia.org/wiki/Angerdorf :) Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Compression of random binary data

2017-10-24 Thread Christian Gollwitzer
out to be nothing compared to the "trivial decompressor" print "12344321" Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Ide vs ide

2017-10-28 Thread Christian Gollwitzer
for it, it is a one-liner: gawk '{ print > "split" NR%2}' input.txt So coming to your question: IDEs are good for medium and (diminishingly) for large programs. agreed Useful python programs are often small; even tiny Christian -- https://mail.python.org/

Re: Invoking return through a function?

2017-10-30 Thread Christian Gollwitzer
iler. It is never a good argument to say "there is no feature X, because GvR is such a god that he knew the feature isn't needed, and see? we are doing well without it!". Unfortunately, that logical fallacy is heard quite often in this group. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Easiest way to access C module in Python

2017-11-06 Thread Christian Gollwitzer
w.swig.org/ When you already have a C header file, SWIG creates a Python module out of it. In many cases this is sufficient to get a runnable interface, but sometimes you need to add additional functions (like initialisation functions) to your module to make it usable from Python. Christia

Re: To ASCII Or Not To ASCII? (Posting On Python-List Prohibited)

2017-11-16 Thread Christian Gollwitzer
Am 16.11.17 um 02:45 schrieb Lawrence D’Oliveiro: From <https://github.com/ldo/pyfenv>: def raıse(self) : "raises this exception." libm.feraiseexcept(self.mask) #end raıse raiise = raıse # if you prefer you do this to annoy people?

Re: Increasing the diversity of people who write Python

2017-11-28 Thread Christian Gollwitzer
what good would that be for an IT standard, if the identifiers were written in different languages? Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Python installer hangs in Windows 7

2017-12-04 Thread christian . gabrisch
Same with me, except that I tried to install Python 3.6.3. Unchecking "Install launcher for all users" helped, however. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python script

2017-12-07 Thread Christian Gollwitzer
rom txt file", file = txt) Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Please tell me how to execute python file in Ubuntu by double

2017-12-13 Thread Christian Gollwitzer
alternate stream? Both are normally invisible and determine a default application as well as a number of programs which can open/edit the file. The only thing I can see from your description, apparently it was possible to change the default for an individual file ("Open this file always

Re: Repeated Names (Repeated Names)

2017-12-17 Thread Christian Gollwitzer
[dot] geek [dot] nz Best, Paul Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Learning

2017-12-18 Thread Christian Gollwitzer
if (isinstanceof(base, *input)) { return (T*)input; } else { return nullptr; } } How that works (particularly the "isinstanceof") is not the business of the programmer - it is sufficient to know that the compiler somewhere stores this information for every object.

Re: [OT] Re: has sourceforge exposed the dirty little secret ?

2018-01-07 Thread Christian Gollwitzer
problems with modern software? I'm using Thunderbird over NNTP, and this shows up as graphics to me: 🐍 💻 (a snake and a computer) Unless this message is blocked at the NNTP-List boundary, it should show the same on any recent mail reader. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Simple graphic library for beginners

2018-01-12 Thread Christian Gollwitzer
al drawing code looks quite similar. And it is trivial to add a button or other widgets, as shown above. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Detecting a cycle in a graph

2018-01-14 Thread Christian Gollwitzer
that there are some variants which can give you the split point of the cycle, too. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Detecting a cycle in a graph

2018-01-14 Thread Christian Gollwitzer
Am 14.01.18 um 22:04 schrieb Christian Gollwitzer: Am 14.01.18 um 09:30 schrieb Frank Millman: I need to detect when a 'cycle' occurs - when a path loops back on itself and revisits a node previously visited. I have figured out a way to do this, but I have a problem. I don'

Re: Python "Bad syntax"

2018-02-05 Thread Christian Gollwitzer
't see an error here, it only fails for me because the functions "get_next_item" and "process_item" are not defined. Maybe the tabs/spaces were mixed in your original input? Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread Christian Gollwitzer
cl/Tk developer community is extremely small. The new text widget was a big fuss last year, but I haven't heard anything about it since almost a year :( Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-17 Thread Christian Gollwitzer
some extremely convoluted thing ("IO monads") had to be erected to make the nicely mathematical "pure" world interface with the dirty reality out there. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-20 Thread Christian Gollwitzer
Am 20.02.18 um 14:58 schrieb Chris Angelico: Okay. Now create a constraint on a name in C++ such that it can only accept integers representing A.D. years which, on the Gregorian calendar, are leap years. (Using a dedicated integer-like type is permitted.) It must accept all multiples of four, exc

Re: py2exe maintainer abandoned the project; is there any replacements? Or, anyone willing to continue the work?

2018-02-21 Thread Christian Gollwitzer
major OS: http://www.pyinstaller.org/ Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: help me ?

2018-02-26 Thread Christian Gollwitzer
list should look like one of the 2 lists: 1. [1a, 1b, 1c, 2a, 2b, 2c, 3a, 3b, 3c Look up list comprehensions. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: How to make Python run as fast (or faster) than Julia

2018-02-27 Thread Christian Gollwitzer
ees of quality to be compared. It is a field of research and the generator shown by Bart is one of the better generators constructed by an expert in the field. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Issue sending data from C++ to Python

2022-05-18 Thread Christian Gollwitzer
into Python is by means of a Numpy Array. In order to do that, you need to include arrayobject.h and then use PyArray_SimpleNew to create an array of numbers as a Python object which you can return https://numpy.org/devdocs/reference/c-api/array.html#c.PyArray_SimpleNew Christian

Re: Automatic Gain Control in Python?

2022-05-29 Thread Christian Gollwitzer
ge compression" if you want to understand it in detail. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: How to test characters of a string

2022-06-07 Thread Christian Gollwitzer
tasks like this they are made and working well. ^ is "starts with" \d is any digit \s is any space + is at least one * is nothing or one of Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: How to test characters of a string

2022-06-07 Thread Christian Gollwitzer
Am 07.06.22 um 23:01 schrieb Christian Gollwitzer: In [3]: re.sub(r'^\d+\s*', '', s) Out[3]: 'Trinket' that RE does match what you intended to do, but not exactly what you wrote in the OP. that would be '^\d\d.' start with exactly two digits follow

Re: How to test characters of a string

2022-06-09 Thread Christian Gollwitzer
s (A|B)\d- As long as one digit is enough. What is your goal, to extract these numbers or to strip them? Regexes can do both relatively easily. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: How to test characters of a string

2022-06-09 Thread Christian Gollwitzer
become quite ugly if you avoid REs or any other pattern matching tools. This is also the main reason I suggested REs initially - often if you see other patterns in the data, you can easily adapt a RE solution, whereas you'll have to write the thing from ground up anew if you do it manually. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: "CPython"

2022-06-21 Thread Christian Gollwitzer
articles don't seem to be any better. To me, this sentence is so badly cobbled together that it could be the output of a KI of some sort (GPT-3) trying to summarize stuff from the web. It doesn't make any sense at all on a semantic level. Christian -- https://mail.python.

Re: Which linux distro is more conducive for learning the Python programming language?

2022-08-04 Thread Christian Heimes
fedora is free as well. Fedora is an excellent choice for Python users. Fedora 36 already comes with Python 3.11.0b5 in its main repository. In fact you have Python 2.7, 3.5-3.11, PyPy 2.7, PyPy 3.7-3.9, and MicroPython at your fingertips. Christian -- https://mail.python.org/mailman/listinfo

Re: setup.py + cython == chicken and the egg problem

2022-08-17 Thread Christian Gollwitzer
from Cython.Build. So maybe just deleting these two lines and it might work? Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: How to manage python shebang on mixed systems?

2022-11-07 Thread Christian Gollwitzer
uired, and that the whole purpose of the /usr/bin/env thing is to search the path (because it is universally installed in /usr/bin) and to possibly set other environment variables Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: How to turn this Matlab code into python

2022-11-07 Thread Christian Gollwitzer
(2018,12,31); date = datevec(dates); ind_mjja=find(date(:,2)>=5 & date(:,2)<=8);% May to Aug (May(31)+ June(30)+ July(31)+ August(31)= 123 days) data_mjja=precp(:,ind_mjja); data_mjja_res=reshape(data_mjja,14000,123,38); which part do you have trouble with? Christia

Re: How to turn this Matlab code into python

2022-11-08 Thread Christian Gollwitzer
Am 08.11.22 um 09:01 schrieb Dioumacor FAYE: From datenum to data_mjja=precp(:,ind_mjja); I think the code filters data based on calendar dates. I'd guess that you can do that most easily with pandas. https://pandas.pydata.org/docs/user_guide/timeseries.html Christian Le l

Re: Evaluation of variable as f-string

2023-01-27 Thread Christian Gollwitzer
ste:Abschlussmeeting chris$ ipython Python 3.8.8 (default, Apr 13 2021, 12:59:45) Type 'copyright', 'credits' or 'license' for more information IPython 7.22.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: x = { "y": "z" } In [2]: s = "-> {x[y]}" In [3]: print(s.format(x = x)) -> z In [4]: Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Evaluation of variable as f-string

2023-01-29 Thread Christian Gollwitzer
Am 28.01.23 um 02:56 schrieb Thomas Passin: On 1/27/2023 5:10 PM, Christian Gollwitzer wrote: Am 27.01.23 um 21:43 schrieb Johannes Bauer: I don't understand why you fully ignore literally the FIRST example I gave in my original post and angrily claim that you solution works when it doe

Re: Cutting slices

2023-03-06 Thread Christian Gollwitzer
ion will be required to find it. OK, so if you want to use an RE for splitting, can you not use re.split() ? It basically works like the built-in splitting in AWK >>> s='alphaAbetaBgamma' >>> import re >>> re.split(r'A|B|C', s) ['alp

Re: How to add clickable url links to 3D Matplotlib chart ?

2023-03-30 Thread Christian Gollwitzer
easy support for it any more in recent browsers. Therefore it would be difficult to post this to the internet, unless you invest in some JS programming. In case you want to run this on your local computer, as opposed to in the browser, you can check out Python game engines.

Re: Tkinter docs?

2023-05-24 Thread Christian Gollwitzer
Text (for multiline formatted text entry), Canvas (for 2D drawings), and Toplevel (for new windows/ popups etc.) Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: A beginning beginner's question about input, output and . . .

2021-01-12 Thread Christian Gollwitzer
ps://medium.com/@yon.goldschmidt/running-python-in-the-linux-kernel-7cbcbd44503c http://www.kplugs.org/ Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: idlelib re-use

2021-01-30 Thread Christian Gollwitzer
to a frame with wm_forget(), after which you can simply pack it into another frame. The second one is configuring a frame as a container, which allows to even embed a window from a foreign application. I'm not sure this works on all platforms, though. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Convert MBOX thunderbird to PST outlook

2021-02-08 Thread Christian Gollwitzer
s, For thatm you can run radicale: https://radicale.org/3.0.html A Python-based calendar server. Then upload your calendars there from Thunderbird and download them from Outlook. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Python subinterpreters with separate GILs

2021-02-10 Thread Christian Heimes
On 11/02/2021 03.51, James Lu wrote: > Directly removing the Global Interpreter Lock (GIL) would break a lot > of libraries that implicitly assume it is there. What if Python had > "realms" that each had separate GILs? > > The "realms" (not sure if "subinterpreter" is the correct term here) > coul

Re: New Python implementation

2021-02-14 Thread Christian Gollwitzer
xpect to have a usable product soon. Best regards, Christian [*] https://github.com/i42output/neoGFX -- https://mail.python.org/mailman/listinfo/python-list

Re: New Python implementation

2021-02-14 Thread Christian Gollwitzer
Am 14.02.21 um 11:12 schrieb Paul Rubin: Christian Gollwitzer writes: He wants that neoGFX is scriptable in Python, but instead of linking with CPython, he will write his own Python implementation instead, because CPython is slow/not clean/ whatever. He doesn't seem to understand that th

Re: New Python implementation

2021-02-15 Thread Christian Gollwitzer
of your compiler, Here is the git repo: https://github.com/i42output/neos under languages/ you'll find different schema files. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: New Python implementation

2021-02-15 Thread Christian Gollwitzer
(e.g. Python), and therefore is "complex". Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: New Python implementation

2021-02-16 Thread Christian Gollwitzer
impressive that you can write actual useful code with such a minimalist language (infix math? Pure bloat!). OTOH it feels like "assembly" compared to more evolved functional languages like, e.g. Haskell. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 0.9.1

2021-02-18 Thread Christian Gollwitzer
Was Guido not aware of Tcl, or did he not think that it is a contender in the same area? Christian [1] "Python, an extensible interpreted programming language [...] can be used instead of shell, Awk or Perl scripts, to write prototypes of real applications, or as an extens

Re: Tkinter long-running window freezes

2021-02-25 Thread Christian Gollwitzer
te the Tcl that is used by Python directly, you may also do something like root = Tk() root.eval('Here comes the Tcl code') root.mainloop() Can you also find out what version of Tcl/Tk you are using? Try root.eval('info patchlevel') Christian -- https://mail.pyth

Re: error of opening Python

2021-02-25 Thread Christian Gollwitzer
alled along with Python on Windows), or something very different? Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter long-running window freezes

2021-02-25 Thread Christian Gollwitzer
Am 26.02.21 um 06:15 schrieb John O'Hagan: On Thu, 25 Feb 2021 21:57:19 +0100 Christian Gollwitzer wrote: I think it is not yet clear, if this is a bug in Tkinter or in Tcl/Tk, the underlying scripting language. It might also be platform dependent. Are you on Windows? Here is an equivalen

Re: neonumeric - C++ arbitrary precision arithmetic library

2021-03-07 Thread Christian Gollwitzer
time. Maybe focussed to a single language or two, but not "universal" in any sense. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-22 Thread Christian Gollwitzer
uitable to title-case a string, not even in English. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: port to PDOS (especially mainframe)

2021-03-24 Thread Christian Heimes
? CPython requires C99 since 3.6, https://docs.python.org/3/whatsnew/3.6.html#build-and-c-api-changes Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: convert script awk in python

2021-03-25 Thread Christian Gollwitzer
parsing language, or even just handcoded Python is much more maintainable. Christian PS: Exercise - handle lines commented out with a '#', i.e. skip those. In awk: gawk '!/^\s*#/ {sum += $2 } END {print sum}' -- https://mail.python.org/mailman/listinfo/python-list

Re: Retrieving non-/etc/passwd users with Python 3?

2021-03-31 Thread Christian Heimes
other > system entirely), since "database" is more getent terminology. > > In any case, I think 'pwd' is hiding its light under a bushel a bit > here. Please open a documentation bug :) The pwd and grp module use the libc API to get users from the local account database. On Linux and glibc the account database is handled by NSS and nsswitch.conf. By the way I recommend that you use SSSD instead of talking to LDAP directly. You'll have a much more pleasant experience. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: question about basics of creating a PROXY to MONITOR network activity

2021-04-10 Thread Christian Seberino
> > > a) your reverse proxy must be colocated with the service it fronts on the > same machine; > b) your network infrastructure transparently encrypts traffic between your > proxy and the service; or > c) your proxy must negotiate its own TLS connection(s) with the service. > Paul Thanks. I'm cu

Re: Not found in the documentation

2021-04-29 Thread Christian Gollwitzer
backslash. Try print(s). It would be different with a raw string s=r"""42 not\ in [42]""" Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Bloody rubbish

2021-05-06 Thread Christian Gollwitzer
s I recall. Needless to say, we didn't use an assembler either. We just wrote raw opcodes and their arguments on paper. This was in the late 70s.) Pure luxury! https://xkcd.com/378/ Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: learning python ...

2021-05-27 Thread Christian Gollwitzer
gt; 3 Here, the "l" is not changed. The reason is that the statement "a=5" does NOT modify the object in a, but instead creates a new one and binds it to a. l still points to the old one. Whereas a.append() tells the object pointed to by a to change. Christian --

Re: Is there a way to get the following result in Python?

2021-06-15 Thread Christian Gollwitzer
]: def foo(): ...: return [1,2,3] ...: In [2]: def bar(): ...: return [] ...: In [3]: a=[] In [4]: a += foo() In [5]: a Out[5]: [1, 2, 3] In [6]: a += bar() In [7]: a Out[7]: [1, 2, 3] Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter problem

2021-06-18 Thread Christian Gollwitzer
ink doesn't seem to support that idea: https://stackoverflow.com/questions/61168210/is-there-any-way-to-use-tkinter-with-google-colaboratory Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter problem

2021-06-19 Thread Christian Gollwitzer
import A as B" does not define A. That's a feature, not a bug. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Subpixel positioning on Tk canvas

2021-06-19 Thread Christian Gollwitzer
Am 19.06.21 um 06:26 schrieb George Furbish: On Saturday, June 19, 2021 at 12:22:31 AM UTC-4, Christian Gollwitzer wrote: Am 19.06.21 um 02:03 schrieb George Furbish: Does Tk support interpolation/subpixel positioning of canvas elements? (e.g. images, text.) I have moving elements on my

Re: Tkinter problem

2021-06-19 Thread Christian Gollwitzer
Am 19.06.21 um 07:16 schrieb Jach Feng: Christian Gollwitzer 在 2021年6月19日 星期六下午12:27:54 [UTC+8] 的信中寫道: Am 19.06.21 um 05:59 schrieb Jach Feng: import tkinter as Tk Tk from tkinter import * Tk tkinter Traceback (most recent call last): File "", line 1, in NameError: name &#

Re: Tkinter problem

2021-06-20 Thread Christian Gollwitzer
Am 19.06.21 um 08:48 schrieb Jach Feng: Christian Gollwitzer 在 2021年6月19日 星期六下午1:54:46 [UTC+8] 的信中寫道: I guess you wanted to post another question? Then please open a new thread. In addition, the question is unclear, you just posted a transcript of three lines of Python. I posted to point out

Re: Subpixel positioning on Tk canvas

2021-06-21 Thread Christian Gollwitzer
Am 20.06.21 um 01:49 schrieb Terry Reedy: On 6/19/2021 12:42 AM, Christian Gollwitzer wrote: Sorry for that answer, but Tkinter does not support many of the most useful extensions for Tcl/Tk, because someone has to write the wrappers. It only supports what is provided by base Tk. Among those I

Re: Searching pypi.org, is there an 'advanced search'?

2021-07-18 Thread Christian Heimes
quite a few open source projects over the years, and that's a lot of > years! I even have a small credit in the 'bible' for the Kermit file > transfer protocol, remember that?) PyPI used to have a search API. The XML-RPC endpoints were disabled last year due to flooding. Our infrastructure could not cope with abusive queries. You can read the log of events at https://status.python.org/ Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Create a real-time interactive TUI using Python.

2021-08-31 Thread Christian Gollwitzer
achieve this ;) This kind of interface is usually done with the "curses"-library. There is a Python version of it, see e.g. here https://docs.python.org/3/howto/curses.html Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: on floating-point numbers

2021-09-02 Thread Christian Gollwitzer
* Pretty harsh, isn't it? He gave a concise example of the same inaccuracy right afterwards. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: on floating-point numbers

2021-09-02 Thread Christian Gollwitzer
algorithm and other alternatives: https://en.wikipedia.org/wiki/Kahan_summation_algorithm Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: on floating-point numbers

2021-09-03 Thread Christian Gollwitzer
Am 02.09.21 um 21:02 schrieb Julio Di Egidio: On Thursday, 2 September 2021 at 20:43:36 UTC+2, Chris Angelico wrote: On Fri, Sep 3, 2021 at 4:29 AM Hope Rouselle wrote: All I did was to take the first number, 7.23, and move it to the last position in the list. (So we have a violation of the

Re: on floating-point numbers

2021-09-04 Thread Christian Gollwitzer
Am 04.09.21 um 14:48 schrieb Hope Rouselle: Christian Gollwitzer writes: Am 02.09.21 um 15:51 schrieb Hope Rouselle: Just sharing a case of floating-point numbers. Nothing needed to be solved or to be figured out. Just bringing up conversation. (*) An introduction to me I don't under

Re: XML Considered Harmful

2021-09-23 Thread Christian Gollwitzer
a CSV table. That definitely isn't what a sane person would understand as "support". Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: NUmpy

2021-09-29 Thread Christian Gollwitzer
uld still work. Second, the problem is not in the code that you posted. POssibly in the definition of "Dataset". Maybe the netCDF-File contains boolean values and the package you use to read it should be updated? Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: sum() vs. loop

2021-10-11 Thread Christian Gollwitzer
throws the list away, while the second version only keeps the running sum in memory. How about a generator expression instead, i.e. sum((a * b for a, b in zip(seq1, seq2))) (untested) ? Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: sum() vs. loop

2021-10-12 Thread Christian Gollwitzer
fastest AND clearest with numpy.dot(seq1, seq2) - in case that the sequence consists of floats and, in the best case, is already stored in a numpy array. Then you cannot beat this with Python code. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Create a contact book

2021-10-26 Thread Christian Gollwitzer
how to do it: https://facebook.com/ Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: One line sort

2021-11-16 Thread Christian Gollwitzer
(x:xs) = qsort [a | a <- xs, a < x] ++ [x] ++ qsort [b | b <- xs, b >= x] The Haskell version is a bit clearer IMHO due to the pattern matching, but that results in a 2 liner :) Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Failure to Display Top menu

2021-11-27 Thread Christian Gollwitzer
what was the expectation? Christian -- https://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   9   10   >