Re: unable to run the basic Embedded Python example

2023-06-26 Thread Christian Gollwitzer via Python-list
Hi Dave, I can tell you where the error comes from, but I don't know how to fix it correctly: Am 24.06.23 um 19:29 schrieb Dave Ohlsson: 9. And now, when I ran embedded_python.exe: 20:14:06: Starting

Re: Tkinter docs?

2023-05-24 Thread Christian Gollwitzer
Am 24.05.23 um 03:18 schrieb Rob Cliffe: I have recently started converting a large project to tkinter, starting with zero knowledge of tkinter.  (You are free to think: BAD IDEA. ) Welcome to the awesome world of GUI development.     I was writing a subclass of the Checkbutton class

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

2023-03-30 Thread Christian Gollwitzer
Am 30.03.23 um 01:11 schrieb a a: On Wednesday, 29 March 2023 at 22:51:15 UTC+2, Greg Ewing wrote: On 30/03/23 8:39 am, a a wrote: How to add clickable url links to the following 3D Matplotlib chart to make it knowledge representation 3D chart, make of 1,000+ open Tabs in Firefox ? It seems

Re: Cutting slices

2023-03-06 Thread Christian Gollwitzer
Am 05.03.23 um 23:43 schrieb Stefan Ram: The following behaviour of Python strikes me as being a bit "irregular". A user tries to chop of sections from a string, but does not use "split" because the separator might become more complicated so that a regular expression will be required

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 does

Re: Evaluation of variable as f-string

2023-01-27 Thread Christian Gollwitzer
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 does not: x = { "y": "z" } s = "-> {x['y']}" print(s.format(x = x)) Traceback (most recent call last):

Re: How to turn this Matlab code into python

2022-11-08 Thread Christian Gollwitzer
nov. 2022 à 21:42, Christian Gollwitzer a écrit : Am 07.11.22 um 18:12 schrieb Dioumacor FAYE: hi everyone I wanted to transform this matlab code into python. If anyone can help me please let me know. load /media/lpaosf/Dioumss/maman/data/precip_chirps_SEN_1981-2018.mat prcp = reshape(precip,[140

Re: How to turn this Matlab code into python

2022-11-07 Thread Christian Gollwitzer
Am 07.11.22 um 18:12 schrieb Dioumacor FAYE: hi everyone I wanted to transform this matlab code into python. If anyone can help me please let me know. load /media/lpaosf/Dioumss/maman/data/precip_chirps_SEN_1981-2018.mat prcp = reshape(precip,[140*100,13879]); dates =

Re: How to manage python shebang on mixed systems?

2022-11-07 Thread Christian Gollwitzer
Am 07.11.22 um 10:28 schrieb Chris Green: Chris Green wrote: 3: with your pseudo "python3" script in place, make all the scripts use the "#!/usr/bin/env python3" shebang suggested above. Yes, that sounds a good plan to me, thanks Cameron. Doesn't '#!/usr/bin/env python3' suffer from the

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

2022-08-17 Thread Christian Gollwitzer
Am 16.08.22 um 23:03 schrieb Dan Stromberg: I'm attempting to package up a python package that uses Cython. Rather than build binaries for everything under the sun, I've been focusing on including the .pyx file and running cython on it at install time. This requires a C compiler, but I'm OK

Re: "CPython"

2022-06-21 Thread Christian Gollwitzer
Am 20.06.22 um 22:47 schrieb Roel Schroeven: indication that www.analyticsinsight.net is wrong on that point. Frankly that website seems very low quality in general. In that same article they say: "CPython is a descendant of Pyscript built on Pyodide, a port of CPython, or a Python

Re: How to test characters of a string

2022-06-09 Thread Christian Gollwitzer
Am 08.06.22 um 19:57 schrieb De ongekruisigde: On 2022-06-08, 2qdxy4rzwzuui...@potatochowder.com <2qdxy4rzwzuui...@potatochowder.com> wrote: On 2022-06-09 at 04:15:46 +1000, Chris Angelico wrote: If you insist: >>> s = 'nm-iodine:x:996:57::/var/empty:/run/current-system/sw/bin/nologin'

Re: How to test characters of a string

2022-06-09 Thread Christian Gollwitzer
Am 09.06.22 um 07:50 schrieb Dave: Hi, I’ve found you also need to take care of multiple disk CD releases. These have a format of “1-01 Track Name” “2-02 Trackl Name" Meaning Disk 1 Track1, Disk 2, Track 2. Also A and B Sides (from Vinyl LPs) “A1-Track Name” “B2-Track Name” Side A, Track

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 followed by any character. Christian

Re: How to test characters of a string

2022-06-07 Thread Christian Gollwitzer
Am 07.06.22 um 21:56 schrieb Dave: It depends on the language I’m using, in Objective C, I’d use isNumeric, just wanted to know what the equivalent is in Python. Your problem is also a typical case for regular expressions. You can create an expression for "starts with any number of digits

Re: Automatic Gain Control in Python?

2022-05-29 Thread Christian Gollwitzer
Am 29.05.22 um 00:45 schrieb Stefan Ram: "Steve GS" writes: Subject: Automatic Gain Control in Python? Automatic Gain Control in Python is trivial. You have a list of samples and normalize them, i.e., divide by max. Slightly simplified [ s/max( samples )for s in samples ]

Re: Issue sending data from C++ to Python

2022-05-18 Thread Christian Gollwitzer
Am 18.05.22 um 16:08 schrieb Pablo Martinez Ulloa: I have been using your C++ Python API, in order to establish a bridge from C++ to Python. We want to do this, as we have a tactile sensor, which only has a library developed in C++, but we want to obtain the data in real time in Python to

Re: No shortcut Icon on Desktop

2022-04-15 Thread Christian Gollwitzer
Am 15.04.22 um 02:49 schrieb Mats Wichmann: On 4/14/22 18:06, Grant Edwards wrote: On 2022-04-14, Richard Damon wrote: I think the issue is that the 'python' interpreter/compiler isn't the sort of program that makes sense to make a desktop icon for, as it is a command line utility. Yes, it

Re: Comparing sequences with range objects

2022-04-09 Thread Christian Gollwitzer
Am 08.04.22 um 09:21 schrieb Antoon Pardon: The first is really hard. Not only may information be missing, no single single piece of information is unique or immutable. Two people may have the same name (I know about several other "Peter Holzer"s), a single person might change their name (when I

Re: Exchange OWA using Python?

2022-04-01 Thread Christian Gollwitzer
Am 01.04.22 um 01:26 schrieb Grant Edwards: On 2022-03-31, Christian Gollwitzer wrote: Davmail is written in Java, not Python, but basically this should not matter if you only use it. Have you used it with OWA as the protocol? At least I thought so - this was in 2016 - 2017

Re: Exchange OWA using Python?

2022-03-31 Thread Christian Gollwitzer
Am 31.03.22 um 16:41 schrieb Grant Edwards: Is anybody aware of any Python code for the Exchange OWA protocol/API? The OWA e-mail client I've been using has stopped working. It was a commerical Python application named Hiri, wich has been abandoned by the developer. So, for now, I'm stuck with

Re: Set tkinter top-level window to "always on visible workspace"

2022-03-28 Thread Christian Gollwitzer
Am 28.03.22 um 20:03 schrieb Chris Angelico: Would you accept a solution that involves a subprocess call? wmctrl -ir {id} -b add,sticky Now, the only problem is... figuring out your window ID. Worst case, parse wmctrl -lG to get that info, but it might be possible to get the window ID from

Re: Set tkinter top-level window to "always on visible workspace"

2022-03-28 Thread Christian Gollwitzer
Am 28.03.22 um 00:55 schrieb Skip Montanaro: So you might tell your window manager to keep that window on the main workspace. Thanks. I'd forgotten about the possibility of doing this sort of thing in the window manager config. That would certainly be fine in this case. (It's been ages since I

Re: Compiling and Linking pre-built Windows Python libraries with C++ files on Linux for Windows

2022-03-21 Thread Christian Gollwitzer
Am 19.03.22 um 01:08 schrieb Ankit Agarwal: This is a very specific question. I am trying to figure out whether or not I can use pre-built python libraries and headers on Windows in a MinGW build on Linux. With the mingw cross-compiler on Linux that should be possible, however I guess it

Re: strange problem building non-pure wheel for apple M1 arm64

2022-03-08 Thread Christian Gollwitzer
Am 07.03.22 um 17:22 schrieb Robin Becker: I use brew to install freetype version 2.11.1. gcc -bundle -undefined dynamic_lookup -g -arch arm64 build/temp.macosx-11.0-arm64-3.9/src/rl_addons/renderPM/_renderPM.o build/temp.macosx-11.0-arm64-3.9/src/rl_addons/renderPM/gt1/gt1-dict.o

Re: Why does not Python accept functions with no names?

2022-02-20 Thread Christian Gollwitzer
Am 20.02.22 um 16:48 schrieb Python: Abdur-Rahmaan Janhangeer wrote: Greetings list. Out of curiosity, why doesn't Python accept def (): return '---' () Where the function name is ''? For the same reason an empty sequence of characters cannot be a variable name. Do you know any

Re: PermissionError: [Errno 13] Permission denied: 'Abc.xlsx'

2022-02-10 Thread Christian Gollwitzer
Am 10.02.22 um 20:43 schrieb Chris Angelico: On Fri, 11 Feb 2022 at 06:41, Dennis Lee Bieber wrote: While not tested with Excel, I /have/ encountered cases where an application has locked the file for writing, but multiple readers are permitted. Those would fail then if one attempts

Re: How to solve the given problem?

2022-02-10 Thread Christian Gollwitzer
Am 10.02.22 um 11:26 schrieb NArshad: -ChrisA: You don't reply if you have problems. When I don't find any solution elsewhere then only I place in this group -Christian: One problem of different type requires the same elaboration. No it doesn't Q. What technique of statistics or numerical

Re: How to solve the given problem?

2022-02-09 Thread Christian Gollwitzer
Am 10.02.22 um 07:40 schrieb NArshad: Assume that there is a pattern of feeding for a special fish in a day (10 hours a day) as below: 150100303030202010 55 Today, the fish is fed in the second hour 60 unit instead of 100 unit

Re: PermissionError: [Errno 13] Permission denied: 'Abc.xlsx'

2022-02-09 Thread Christian Gollwitzer
Am 09.02.22 um 08:46 schrieb NArshad: When I enter data using Tkinter form in an Excel file when the excel file is closed there is no error but when I enter data using Tkinter form when the excel is already open following error comes: PermissionError: [Errno 13] Permission denied:

Re: Correct way to setup a package with both compiled C code and Python code?

2022-02-08 Thread Christian Gollwitzer
Am 08.02.22 um 18:57 schrieb Dieter Maurer: Christian Gollwitzer wrote at 2022-2-7 20:33 +0100: we've developed a Python pacakge which consists of both a compiled extension module and some helper functions in Python. Is there a tutorial on how to package such an extension? Look at "

Correct way to setup a package with both compiled C code and Python code?

2022-02-07 Thread Christian Gollwitzer
Hi all, we've developed a Python pacakge which consists of both a compiled extension module and some helper functions in Python. Is there a tutorial on how to package such an extension? Most resources I found for distutils describe either building an extension or pure python modules.

Re: Failure to Display Top menu

2021-11-27 Thread Christian Gollwitzer
Am 26.11.21 um 21:38 schrieb Peter Mwale: Hello, my python 3.10 shell is not displaying the top menu. What should I do? You should explain, what you do exactly. The Python interpreter does not have a menu. a) What platform are you on? Windows, macOS, Linux? b) How did ou start Python and

Re: One line sort

2021-11-16 Thread Christian Gollwitzer
Am 15.11.21 um 14:10 schrieb ast: A curiosity: q = lambda x: x and q([i for i in x[1:] if i < x[0]]) + [x[0]] + q([i for i in x[1:] if i >= x[0]]) >>> q([7, 5, 9, 0]) [0, 5, 7, 9] That seems to be a translation of the classic Haskell quicksort example: qsort [] = [] qsort (x:xs) = qsort

Re: Create a contact book

2021-10-26 Thread Christian Gollwitzer
Am 26.10.21 um 07:40 schrieb anders Limpan: i would like to create a contact book were you can keep track of your friends. With this contact book you will both be able to add friends and view which friends that you have added. anyone interested in helping me out with this one ?=) Here is

Re: sum() vs. loop

2021-10-12 Thread Christian Gollwitzer
Am 12.10.21 um 05:41 schrieb Dan Stromberg: On Mon, Oct 11, 2021 at 2:54 PM Steve Keller wrote: I have found the sum() function to be much slower than to loop over the operands myself: def sum_products(seq1, seq2): return sum([a * b for a, b in zip(seq1, seq2)]) def sum_products2(seq1,

Re: sum() vs. loop

2021-10-11 Thread Christian Gollwitzer
Am 10.10.21 um 10:49 schrieb Steve Keller: I have found the sum() function to be much slower than to loop over the operands myself: def sum_products(seq1, seq2): return sum([a * b for a, b in zip(seq1, seq2)]) def sum_products2(seq1, seq2): sum = 0 for a, b in zip(seq1, seq2):

Re: NUmpy

2021-09-29 Thread Christian Gollwitzer
Am 29.09.21 um 18:16 schrieb Jorge Conforte: Hi, I have a netcdf file "uwnd_850_1981.nc" and I'm using the commands to read it: Your code is incomplete: from numpy import dtype  fileu ='uwnd_850_1981.nc' ncu = Dataset(fileu,'r') Where is "Dataset" defined?

Re: XML Considered Harmful

2021-09-23 Thread Christian Gollwitzer
Am 22.09.21 um 16:52 schrieb Michael F. Stemper: On 21/09/2021 19.30, Eli the Bearded wrote: Yes, CSV files can model that. But it would not be my first choice of data format. (Neither would JSON.) I'd probably use XML. Okay. 'Go not to the elves for counsel, for they will say both no and

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 understand

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-02 Thread Christian Gollwitzer
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 understand floating-point numbers from the inside out, but I do know how to work with

Re: on floating-point numbers

2021-09-02 Thread Christian Gollwitzer
Am 02.09.21 um 16:49 schrieb Julio Di Egidio: On Thursday, 2 September 2021 at 16:41:38 UTC+2, Peter Pearson wrote: On Thu, 02 Sep 2021 10:51:03 -0300, Hope Rouselle wrote: 39.61 Welcome to the exciting world of roundoff error: Welcome to the exiting world of Usenet. *Plonk*

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

2021-09-01 Thread Christian Gollwitzer
Am 31.08.21 um 18:49 schrieb Chris Angelico: On Wed, Sep 1, 2021 at 1:59 AM hongy...@gmail.com wrote: I want to know whether python can be used to create real-time interactive TUI, as hstr [1] does. [1] https://github.com/dvorka/hstr Yes. I think he also would like to know, how to

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: 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: 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: nam

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 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 'tkinter' is not defined What's the point? That has no relation to the question. "import A as B" does not define

Re: Tkinter problem

2021-06-18 Thread Christian Gollwitzer
Am 18.06.21 um 08:28 schrieb Liya Ann Sunny: I am using Colab. How could solve this problem. TclError: couldn't connect to display ":0.0" You're either not running an X server, or having problems to connect to it. Are you sure that Google Colab supports X11 at all? This link doesn't seem to

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

2021-06-15 Thread Christian Gollwitzer
Am 12.06.21 um 04:02 schrieb Jach Feng: def foo(): ... # do something ... a = [] for i in range(3): ... a.append(foo()) ... a [] How about having "foo" return a list of things? Then you can append that list and return an empty list if you want nothing added: In [1]: def

Re: learning python ...

2021-05-27 Thread Christian Gollwitzer
Am 25.05.21 um 06:08 schrieb hw: On 5/25/21 12:37 AM, Greg Ewing wrote: Python does have references to *objects*. All objects live on the heap and are kept alive as long as there is at least one reference to them. If you rebind a name, and it held the last reference to an object, there is no

Re: Bloody rubbish

2021-05-06 Thread Christian Gollwitzer
Am 06.05.21 um 19:54 schrieb Skip Montanaro: Machine language is so much simpler, and you can code with just a hexpad. Pshaa... All you need are front panel switches. ;-) (Yes, I had a professor who required is to 'key' in our programs on the front panel, of a rack mounted PDP-11 as I

Re: Not found in the documentation

2021-04-29 Thread Christian Gollwitzer
Am 29.04.21 um 08:54 schrieb elas tica: Le mercredi 28 avril 2021 à 17:36:32 UTC+2, Chris Angelico a écrit : In what sense of the word "token" are you asking? The parser? You can play around with the low-level tokenizer with the aptly-named tokenizer module. It was a good suggestion, and the

Re: convert script awk in python

2021-03-25 Thread Christian Gollwitzer
Am 25.03.21 um 00:30 schrieb Avi Gross: It [awk] is, as noted, a great tool and if you only had one or a few tools like it available, it can easily be bent and twisted to do much of what the others do as it is more programmable than most. But following that line of reasoning, fairly simple

Re: .title() - annoying mistake

2021-03-22 Thread Christian Gollwitzer
Am 22.03.21 um 16:03 schrieb Robert Latest: Chris Angelico wrote: Cool thing is, nobody in Python needs to maintain anything here. That's great because I'm actually having trouble with sending log messages over the socket conection you helped me with, would you mind having a look? You

Re: neonumeric - C++ arbitrary precision arithmetic library

2021-03-07 Thread Christian Gollwitzer
Am 07.03.21 um 20:42 schrieb Peter J. Holzer: The second part is converting a parse tree into code. I am quite sure that it is possible to devise a formal language to specify the semantics of any programming language and then to use this to generate the code. However, I strongly suspect that

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 equivalent Tcl

Re: error of opening Python

2021-02-25 Thread Christian Gollwitzer
Am 25.02.21 um 18:22 schrieb Botao Liu: Dear Python team, This is my first time using Python, I tried to launch Python and it showed "Python 3.9.2 (tags/v3.9.2:1a79785, Feb 19 2021, 13:44:55) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more

Re: Tkinter long-running window freezes

2021-02-25 Thread Christian Gollwitzer
Am 24.02.21 um 12:35 schrieb John O'Hagan: Hi list I have a 3.9 tkinter interface that displays data from an arbitrary number of threads, each of which runs for an arbitrary period of time. A frame opens in the root window when each thread starts and closes when it stops. Widgets in the frame

Re: Python 0.9.1

2021-02-18 Thread Christian Gollwitzer
Am 16.02.21 um 22:57 schrieb Skip Montanaro: A note to webmas...@python.org from an astute user named Hiromi in Japan* referred us to Guido's shell archives for the 0.9.1 release from 1991. I then pushed the result to a Github repo: https://github.com/smontanaro/python-0.9.1 That's a nice

Re: New Python implementation

2021-02-16 Thread Christian Gollwitzer
I agree to all the rest of your post, but this: Am 16.02.21 um 09:57 schrieb Tarjei Bærland: I am not sure I agree that a language like Scheme or Logo or Brainfuck, with their small number of building blocks, would be harder to learn. is strange. I'm not sure, have you actually looked at

Re: New Python implementation

2021-02-15 Thread Christian Gollwitzer
Am 16.02.21 um 06:36 schrieb dn: Pascal's value as a teaching language was that it embodied many aspects of structured programming, and like Python, consisted of a limited range of items which could be learned very quickly (in contrast to PL/I's many 'bells and whistles'). ROFL. Maybe that

Re: New Python implementation

2021-02-15 Thread Christian Gollwitzer
Am 15.02.21 um 21:37 schrieb Roel Schroeven: So your claim is that your compiler is able to, or will be able to, compile any language just by specifying a small schema file. Great! Do you maybe have a proof-of-concept? A simple language with a simple schema file to test the basic workings

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

Re: New Python implementation

2021-02-14 Thread Christian Gollwitzer
Am 14.02.21 um 01:19 schrieb Chris Angelico: On Sun, Feb 14, 2021 at 11:14 AM Mr Flibble wrote: On 13/02/2021 23:30, Igor Korot wrote: Hi, But most importantly - what is the reason for this ? I mean - what problems the actual python compiler produce? Thank you. I am creating neos as I

Re: Convert MBOX thunderbird to PST outlook

2021-02-08 Thread Christian Gollwitzer
Am 08.02.21 um 11:08 schrieb J.O. Aho: On 08/02/2021 10.22, Paul Rubin wrote: "J.O. Aho" writes: I think most migrated to use IMAP like 30 years ago That handles email but not calendar or the other stuff.  I think there are starting to be standards for that, but no idea whether either

Re: idlelib re-use

2021-01-30 Thread Christian Gollwitzer
Am 28.01.21 um 20:57 schrieb Terry Reedy: On 1/28/2021 5:53 AM, Robin Becker wrote: I googled in vain for instances where parts of idlelib are re-used in a simplistic way. I would like to use the editor functionality in a tkinter window and also probably run code in a subprocess. Are there

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

2021-01-12 Thread Christian Gollwitzer
Am 13.01.21 um 06:24 schrieb Greg Ewing: On 13/01/21 4:18 am, Grant Edwards wrote: AFAIK, Python can't be used to write device drivers for any popular OS At least not until some crazy person embeds Python in the Linux kernel... What do you mean, "until" ?

Re: dayofyear is not great when going into a new year

2021-01-08 Thread Christian Gollwitzer
Am 05.01.21 um 23:56 schrieb Eli the Bearded: Elijah -- also finds "week starts on Monday" to be oddball about ISO-8601 In Europe, the week starts on Monday - hence, Saturday and Sunday are the last days of the week or the "weekend". Starting on Sunday is weird for us, because then the

Re: tkinter: creating/attaching menubar to top level window

2021-01-08 Thread Christian Gollwitzer
Am 08.01.21 um 22:47 schrieb Rich Shepard: I'm using Chapter 9 in Mark Roseman's "Modern Tkinter for Busy Python Developers" to learn how to write a top level menu. MWE code is attached. Python3 tells me there's invalid syntax on line 42:     self.['menu'] = menubar # attach it to the top

Re: Class and tkinter problem

2021-01-06 Thread Christian Gollwitzer
Am 07.01.21 um 08:29 schrieb Paulo da Silva: Does anybody know why cmd method isn't called when I change the button state (clicking on it) in this example? I know that this seems a weird class use. But why doesn't it work? Thanks. class C: from tkinter import Checkbutton import

Re: I'm finally disentangled from Python 2, thank you everyone

2020-12-30 Thread Christian Gollwitzer
Am 30.12.20 um 11:58 schrieb Chris Green: Could I ask you to write up a post on what you did here? I've never used cx-freeze but it sounds like a useful thing for keeping legacy stuff functioning. A writeup from someone who's actually used it for that would be welcome. Of course, here is what

Re: Function returns old value

2020-12-18 Thread Christian Gollwitzer
Am 17.12.20 um 21:22 schrieb Michael F. Stemper: On 17/12/2020 03.57, Peter J. Holzer wrote: On 2020-12-17 03:06:32 -, Bischoop wrote: pasting from my IDE to vim/slrn was messing syntax, You can :set paste in vim to prevent it from messing with pasted content (don't forget to set

Re: linear algebric equations

2020-12-08 Thread Christian Gollwitzer
Am 07.12.20 um 17:59 schrieb Tito Sanò: Regarding the solution of linear algebraic equations I noticed a big difference in the computation time in Python compared to the old fortran language. I have compared both the linelg and lapack.dgesv-lapack.zgesv modules with the fortan: dgelg and

Re: how to plot the FFT of a list of values

2020-12-05 Thread Christian Gollwitzer
Am 05.12.20 um 18:16 schrieb Boris Dorestand: I have 16 values of the period sequence 1, 2, 4, 8, 1, 2, 4, 8, ... I compute its fourier transform using from scipy import fft, ifft x = [1,2,4,8,1,2,4,8] fft(x) array([ 30. +0.j, 0. +0.j, -6.+12.j, 0. +0.j, -10. +0.j, 0. +0.j,

Re: Why can't numpy array be restored to saved value?

2020-11-26 Thread Christian Gollwitzer
Am 25.11.20 um 07:47 schrieb pjfarl...@earthlink.net: Why isn't the final value of the numpy array npary in the following code the same as the initial value before some but not all elements of the array were changed to a new value? I know I am missing something basic here. I thought I

Re: Strange terminal behavior after quitting Tkinter application

2020-11-03 Thread Christian Gollwitzer
Am 03.11.20 um 23:34 schrieb Dennis Lee Bieber: Out of curiosity, does Python on Linux honor the .pyw extension? On Windows, .pyw indicates a Python program that implements a GUI and will NOT make use of console (stdin/stdout/stderr). On Linux, there is no such distinction.

Re: GUI (tkinter) popularity and job prospects for

2020-10-23 Thread Christian Gollwitzer
Am 22.10.20 um 23:52 schrieb Paul Rubin: Michael Torrie writes: I doubt you'll find any jobs connected a particular Python GUI toolkit. It would be really nice if there was a way to straightforwardly run Tkinter applications on Android. You'd install a single .apk and that would let you

Re: Covariance matrix syntax

2020-10-18 Thread Christian Gollwitzer
is the source code of the function. Best regards, Christian Thanks Meghna On Tue, Oct 13, 2020 at 11:46 AM Christian Gollwitzer wrote: Am 13.10.20 um 06:52 schrieb Meghna Karkera: Could you let me know what is the back end calculation of this covariance matrix syntax np.cov You can

Re: Covariance matrix syntax

2020-10-13 Thread Christian Gollwitzer
Am 13.10.20 um 06:52 schrieb Meghna Karkera: Could you let me know what is the back end calculation of this covariance matrix syntax np.cov You can look it up yourself: Go to the docs https://numpy.org/doc/stable/reference/generated/numpy.cov.html At the right hand side, just right of the

Re: ValueError: arrays must all be same length

2020-10-04 Thread Christian Gollwitzer
Am 02.10.20 um 14:34 schrieb Shaozhong SHI: Hello, I got a json response from an API and tried to use pandas to put data into a dataframe. However, I kept getting this ValueError: arrays must all be same length. Can anyone help? The following is the json text. What do you expect the

Re: Interference tkinter and plot from matplotlib

2020-09-30 Thread Christian Gollwitzer
Am 30.09.20 um 15:46 schrieb Pierre Bonville: Hi everybody, Interference tkinter and plot from matplotlib You are mixing different ways of control flow. In a GUI program, don't call input(). Use the mainloop() as the very last of your calls, and only work in the callbacks. That means

Re: Use of a variable in parent loop

2020-09-28 Thread Christian Gollwitzer
Am 28.09.20 um 07:38 schrieb Stephane Tougard: On 2020-09-28, MRAB wrote: It's used where the language requires a statement. In, say, C, you would use empty braces: while (process_next_item()) { /* Do nothing. */ } If I want to express nothing in C, I put nothing and

Re: Use of a variable in parent loop

2020-09-27 Thread Christian Gollwitzer
Am 26.09.20 um 06:43 schrieb Stephane Tougard: ===PYTHON=== #!/usr/local/bin/python if 4 == 4: name = "Stephane" print(name) pass print("Out {}".format(name)) The exact same code in Python works fine, the variable name is used outside of the if block even it has

Re: Video file to subtitles file

2020-08-30 Thread Christian Gollwitzer
Am 30.08.20 um 21:43 schrieb MRAB: On 2020-08-30 18:10, Christian Gollwitzer wrote: Well, with enough effort it is possible to build a system that is more useful than "entertaining". Google did that, English youtube videos can be annotated with subtitles from speech recognition. F

Re: Video file to subtitles file

2020-08-30 Thread Christian Gollwitzer
Am 30.08.20 um 17:25 schrieb MRAB: On 2020-08-30 07:23, Muskan Sanghai wrote: On Sunday, August 30, 2020 at 11:46:15 AM UTC+5:30, Chris Angelico wrote: I recommend looking into CMU Sphinx then. I've used that from Python. The results are highly entertaining. ChrisA Okay I will try it, thank

Re: Video file to subtitles file

2020-08-29 Thread Christian Gollwitzer
Am 29.08.20 um 13:51 schrieb Muskan Sanghai: I want to extract subtitles from a MPEG video (which does not have any previous subtitles) I'm still not sure I get it. "Extract" subtitles, when they are NOT there? Can it be, by any chance, that you are talking about speech recognition? I.e.,

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Gollwitzer
Am 06.08.20 um 17:13 schrieb Christian Seberino: Python is my favorite language and the easiest to use in my opinion. Lisp has a far simpler grammar and syntax. A beginner I think could learn Lisp much faster than Python. Therefore, it seems like Lisp *should* be easier to work with and more

Re: How to diagnose import error when importing from .so file?

2020-07-30 Thread Christian Gollwitzer
Am 29.07.20 um 23:01 schrieb Chris Green: Even more annoying is that most of what's in pyscand.so is constants, there's only a couple of functions in there, so there's very little to it really. If there are really only constants, you could import it into Python 2 and dump the content e.g. as a

Re: Installing Python 3.8.3 with tkinter

2020-07-23 Thread Christian Gollwitzer
Am 23.07.20 um 06:30 schrieb Klaus Jantzen: On 7/22/20 11:05 PM, Ned Deily wrote: On 2020-07-22 06:20, Klaus Jantzen wrote: Trying to install Python 3.8.3 with tkinter I run configure with the following options ./configure --enable-optimizations --with-ssl-default-suites=openssl

Re: Pycharm Won't Do Long Underscore

2020-06-23 Thread Christian Gollwitzer
Am 23.06.20 um 22:49 schrieb Tony Kaloki: Alexander, Thank you so much! It worked! Thank you. One question: in your reply, are you saying that Python would have treated the two separate underscores the same way as a long underscore i.e. it's a stylistic choice rather than

Re: SaveAs on macOS Catalina.

2020-05-09 Thread Christian Gollwitzer
Am 09.05.20 um 04:37 schrieb Bev In TX:  On May 8, 2020, at 8:29 PM, Terry Reedy wrote: https://bugs.python.org/issue40553 On macOS The default Save/Save as dialogs are short, only displaying a few major folders along with Favorites and Recents. That dialog doesn’t display folder

Re: Function to avoid a global variable

2020-04-28 Thread Christian Gollwitzer
Am 28.04.20 um 09:54 schrieb ast: funny ! So we found 4 different ways to handle a memory in a function 1- Use a function parameter with a mutable default value 2- Use a function attribute 3- Use a callable object, and store your stuff inside an object attr 4- Use a closure to emulate a

Re: print small DataFrame to STDOUT and read it back into dataframe

2020-04-06 Thread Christian Gollwitzer
Am 06.04.20 um 17:17 schrieb Luca: On 4/6/2020 4:08 AM, Reto wrote: Does this help? Thank you, but not really. What I am trying to achieve is to have a way to copy and paste small yet complete dataframes (which may be the result of previous calculations) between a document (TXT, Word,

Re: Adding tkinter modules to notebook tabs

2020-04-04 Thread Christian Gollwitzer
Am 04.04.20 um 22:31 schrieb Rich Shepard: On Sat, 4 Apr 2020, Christian Gollwitzer wrote: I'm not sure I fully understand it, because a "module" is not defined in the language of tkinter. Christian, True, but it is in Python: a file ending in .py which, in this case, contai

Re: Adding tkinter modules to notebook tabs

2020-04-04 Thread Christian Gollwitzer
Am 04.04.20 um 16:59 schrieb Rich Shepard: My Python3-3.8.2 application has 8 modules with subject-specific data entry/editing widgets and I want to display each module on a ttk.Notebook. Each notebook resource I've found in my reference books and on the web describe how to create a notebook and

Re: Identifying tkinter version [ANSWERED]

2020-04-01 Thread Christian Gollwitzer
Am 01.04.20 um 19:22 schrieb Rich Shepard: On Wed, 1 Apr 2020, Tony van der Hoff wrote: How do I determine the installed version? import tkinter tkinter.TkVersion 8.6 Thanks, Tony. I was close, but still too far away. This only shows you the major version. There have been many updates to

Re: Converting program from shell to tkinter

2020-03-22 Thread Christian Gollwitzer
Hi Randall, I assume you are asking about the Python programming language (tkinter??). This group discusses the Tcl programming language, from which Tk originates. See 2 answers below. Xpost and Fup2 c.l.p Christian Am 22.03.20 um 00:59 schrieb Randall Wert: I am trying to enhance a shell

Re: Tkinter: which ttk widget for database table primary key?

2020-03-18 Thread Christian Gollwitzer
Am 18.03.20 um 21:39 schrieb Rich Shepard: Subject might be confusing so I'll expand it here. My application uses a database backend in which each table has a unique and database-generated sequential numeric key. I want to display that key in the GUI for that class but it's not entered by the

  1   2   3   4   5   6   >