Problem with processing PyCommandEvent

2005-11-16 Thread Karsten
Hello, I've got a question about Python Events. I want to generate a PyCommandEvent (included in the wx Package). This PyCommandEvent ought to be called when a method/function is called. I've seen some examples in the www how I can call the Event when an other Event is called. But this is not

PyCommandEvent

2005-11-21 Thread Karsten
Hello, I've got a question about Python Events. I want to generate a PyCommandEvent (included in the wx Package). This PyCommandEvent ought to be called when a method/function is called. I've seen some examples in the www how I can call the Event when an other Event is called. But this is not

Re: [Chicago] Getting ASCII encoding where unicode wanted under Py3k

2013-05-13 Thread Carl Karsten
On Mon, May 13, 2013 at 10:59 AM, Jonathan Hayward wrote: That is way too much code for me to try and dig into. Remove everything not needed to demo it. Replace big strings with little strings. My guess is it should be 1-3 lines, like >>> print('123%(a)s' % {'a': u'\u0161' } ) 123š But that

right list for SIGABRT python binary question ?

2017-10-16 Thread Karsten Hilbert
Hi all, is this the right list to ask for help in debugging a SIGABORT (?) happening on shutdown of a Python 2.7 script ? If not, which one is ? Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 -- https://mail.python.org/mailman

Re: right list for SIGABRT python binary question ?

2017-10-17 Thread Karsten Hilbert
from DateTime import * File "/usr/lib/python2.7/dist-packages/mx/DateTime/DateTime.py", line 9, in from mxDateTime import * File "/usr/lib/python2.7/dist-packages/mx/DateTime/mxDateTime/__init__.py", line 13, in raise ImportError,

Aw: Re: PEP 249 Compliant error handling

2017-10-17 Thread Karsten Hilbert
turn data AS IF it was correct despite it having been "corrected" by some driver logic. What might be interesting to users is to set an attribute on the cursor, say, cursor.faulty_data = unicode(faulty_data, errors='replace') or some such in order to improve error messages to the end user. Karsten -- https://mail.python.org/mailman/listinfo/python-list

Re: right list for SIGABRT python binary question ?

2017-10-18 Thread Karsten Hilbert
king for recompilation of python-egenix-mxdatetime. Next, I'll remove mxDateTime from the script and see what prevails. Thanks, Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP 249 Compliant error handling

2017-10-18 Thread Karsten Hilbert
e database itself will detect the corruption and not even hand the data to psycopg2. IMHO a driver should not hand over to the client any bad data unless explicitely told to do so, which latter case does not seem to be covered by the DB-API specs, regardless of what the majority of drivers might d

Re: right list for SIGABRT python binary question ?

2017-10-19 Thread Karsten Hilbert
be at fault now. The one thing that did change is PostgreSQL going from 9.6 to 10, effecting a libpq5 recompiled against the newer PG client. I wonder whether psycopg2 needs a recompile against that libpq5 (despite there not having been changes advertised by PG). I guess I'll have to downgrade libpq5 to 9.6 and see what happens. I'll report what I find. (oh, and it's all available on github) Thanks, Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 -- https://mail.python.org/mailman/listinfo/python-list

Re: right list for SIGABRT python binary question ?

2017-10-19 Thread Karsten Hilbert
On Thu, Oct 19, 2017 at 07:27:45PM +0200, Karsten Hilbert wrote: > I am currently running the bootstrapper with mxdatetime as a > dbg build to see what gives. The only other C extension I am > aware of that is in use is psycopg2. So here's the final console

Re: right list for SIGABRT python binary question ?

2017-10-22 Thread Karsten Hilbert
500 http://httpredir.debian.org/debian unstable/main i386 Packages 100 /var/lib/dpkg/status Let me check the .so file: root@hermes:~# nm /usr/lib/python2.7/dist-packages/mx/DateTime/mxDateTime/mxDateTime_d.so | grep Py_InitM U Py_InitModule4TraceRefs It seems it is - hm ... Thanks, Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 -- https://mail.python.org/mailman/listinfo/python-list

Re: right list for SIGABRT python binary question ?

2017-10-22 Thread Karsten Hilbert
On Sun, Oct 22, 2017 at 10:15:51PM +0200, Karsten Hilbert wrote: > The python2.7-dbg build is 32 bits: ... > The python2.7 build (no -dbg) does not have symbols. More to the point: /usr/bin/python2.7: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically

Re: right list for SIGABRT python binary question ?

2017-10-22 Thread Karsten Hilbert
as the address might be accessed very often > legally before it gets corrupted. > > Another approach may be to use a tool designed for memory debugging, > e.g. "valgrind". Hi Dieter, thanks for your guidance. I fear this approach is out of my class. Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 -- https://mail.python.org/mailman/listinfo/python-list

Re: right list for SIGABRT python binary question ?

2017-10-23 Thread Karsten Hilbert
On Sun, Oct 22, 2017 at 11:10:33PM +0200, Karsten Hilbert wrote: >> It points to a memory corruption. > > thanks for your guidance. I fear this approach is out of my class. For what it's worth I have run a successful overnight memory stress test (memtest86+) so it shouldn&

Re: right list for SIGABRT python binary question ?

2017-10-23 Thread Karsten Hilbert
./Python/pythonrun.c:1151 #25 0x0055e152 in PyErr_PrintEx (set_sys_last_vars=1) at ../Python/pythonrun.c:1161 #26 0x0055dd5b in PyErr_Print () at ../Python/pythonrun.c:1064 #27 0x0055d61f in PyRun_SimpleFileExFlags (fp=0x7ee010, filename=0xb7e6 "./bootstrap_gm_db_syste

Re: right list for SIGABRT python binary question ?

2017-10-23 Thread Karsten Hilbert
am grasping for straws here since I am unable to "properly" debug the python binary as such. Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 -- https://mail.python.org/mailman/listinfo/python-list

Re: right list for SIGABRT python binary question ?

2017-10-25 Thread Karsten Hilbert
Versionstabelle: *** 3.2.9-1 990 500 http://httpredir.debian.org/debian stretch/main i386 Packages 990 http://httpredir.debian.org/debian buster/main i386 Packages 500 http://httpredir.debian.org/debian unstable/main i386 Packages

Re: psycopg2.ProgrammingError: syntax error at or near "\"

2017-10-27 Thread Karsten Hilbert
ycopg2.ProgrammingError: syntax error at or near "\" > LINE 1: \set my_user table1 \set is a psql specific pseudo command rather than SQL. Only SQL code can be run through psycopg2. You want to read up on query parameter handling in the psycopg2 docs. Psycopg2 and (/usr/bin/)psql(.exe) a

Re: Repairing Python installation?

2017-10-28 Thread Karsten Hilbert
gt; got some help form the Nikola people and the conclusion is something > is broken with my Python 2.7. Pip list throws exceptions at me ... > All this is happening on a Debian machine. Exceptions or crashes of the python interpreter ? Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.

Aw: Re: Invoking return through a function?

2017-10-29 Thread Karsten Hilbert
icitly > writing "return" in its body? Sure: fall off the end of the function. But that's not what you are after. Karsten -- https://mail.python.org/mailman/listinfo/python-list

Re: right list for SIGABRT python binary question ?

2017-10-30 Thread Karsten Hilbert
, value=None) at ../Objects/dictobject.c:848 #20 0x00492758 in _PyModule_Clear (m=) at ../Objects/moduleobject.c:125 #21 0x0054a33b in PyImport_Cleanup () at ../Python/import.c:530 #22 0x0055c53c in Py_Finalize () at ../Python/pythonrun.c:458 #23 0x0055fe9c in Py_Exit (sts=0) at ../Python/pythonrun.c:1783 #24 0x0055e0fc in handle_system_exit () at ../Python/pythonrun.c:1151 #25 0x0055e152 in PyErr_PrintEx (set_sys_last_vars=1) at ../Python/pythonrun.c:1161 #26 0x0055dd5b in PyErr_Print () at ../Python/pythonrun.c:1064 #27 0x0055d61f in PyRun_SimpleFileExFlags (fp=0x7ee010, filename=0xb7e6 "./bootstrap_gm_db_system.py", closeit=1, flags=0xb4f4) at ../Python/pythonrun.c:952 #28 0x0055cc4e in PyRun_AnyFileExFlags (fp=0x7ee010, filename=0xb7e6 "./bootstrap_gm_db_system.py", closeit=1, flags=0xb4f4) at ../Python/pythonrun.c:752 #29 0x00577cb0 in Py_Main (argc=5, argv=0xb684) at ../Modules/main.c:645 #30 0x004259c8 in main (argc=5, argv=0xb684) at ../Modules/python.c:20 (gdb) q A debugging session is active. Inferior 1 [process 12740] will be killed. Quit anyway? (y or n) y Does that help ? Thanks, Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 -- https://mail.python.org/mailman/listinfo/python-list

Re: right list for SIGABRT python binary question ?

2017-11-01 Thread Karsten Hilbert
RT happens. How do I find out out which "place" needs to be mapped from the output I already have ? (the "place" is the memory block you refer to) Other than that I understand what you are getting at and am willing to try. Thanks, Karsten >Should your program get stoppe

Re: right list for SIGABRT python binary question ?

2017-11-01 Thread Karsten Hilbert
On Wed, Nov 01, 2017 at 10:27:54AM +0100, Karsten Hilbert wrote: > > >> It points to a memory corruption. > > > > The i386/x64 architecture supports memory access breakpoints > > and GDB, too, has support for this. You know the address which > > gets corrupted

Re: right list for SIGABRT python binary question ?

2017-11-01 Thread Karsten Hilbert
On Wed, Nov 01, 2017 at 11:14:08AM +0100, Karsten Hilbert wrote: > Or rather: I need to find out which "place" a given address > refers to, check whether the changing addresses always belong > to the same "place" between runs and _then_ map a "place" to &g

Re: right list for SIGABRT python binary question ?

2017-11-01 Thread Karsten Hilbert
ORBIDDENBYTE (0xfb): at p-3: 0x33 *** OUCH at p-2: 0x47 *** OUCH at p-1: 0x00 *** OUCH Because memory is corrupted at the start, the count of bytes requested may be bogus, and checking the trailing pad bytes may segfault. The 4 pad bytes at tail=0x6aab7c are not all FORBIDDENBYTE (0xfb): at tail+0: 0x00 *** OUCH at tail+1: 0x00 *** OUCH at tail+2: 0x00 *** OUCH at tail+3: 0x00 *** OUCH The block was made by call #0 to debug malloc/realloc. Fatal Python error: bad ID: Allocated using API '', verified using API 'o' Program received signal SIGABRT, Aborted. 0xb7fd9ce9 in __kernel_vsyscall () (gdb) Does that help ? Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 -- https://mail.python.org/mailman/listinfo/python-list

Re: right list for SIGABRT python binary question ?

2017-11-01 Thread Karsten Hilbert
On Wed, Nov 01, 2017 at 12:40:56PM +0100, Karsten Hilbert wrote: > Interestingly, on subsequent runs, it seems to hit the same > address, 0x6aab7c, belonging to the same symbol, _Py_ZeroStruct. > > This is what happens: > > (gdb) watch *0x6aab7c > Hardware wa

Re: right list for SIGABRT python binary question ?

2017-11-01 Thread Karsten Hilbert
sical memory may vary due to paging fragmentation, > but should still be the same virtual addresses. I see. Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 -- https://mail.python.org/mailman/listinfo/python-list

Re: right list for SIGABRT python binary question ?

2017-11-02 Thread Karsten Hilbert
table. I have posted backtraces taken from the address being watched. Does that help any at all ? Thanks, Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 -- https://mail.python.org/mailman/listinfo/python-list

Aw: Try: Except: evaluates to True every time

2017-11-04 Thread Karsten Hilbert
Try in an interactive interpreter: python> "a string" is True Karsten > Gesendet: Samstag, 04. November 2017 um 16:31 Uhr > Von: "brandon wallace" > An: python-list@python.org > Betreff: Try: Except: evaluates to True every time > > > I have t

Re: Try: Except: evaluates to True every time

2017-11-04 Thread Karsten Hilbert
On Sat, Nov 04, 2017 at 05:07:26PM +0100, Karsten Hilbert wrote: > Try in an interactive interpreter: > >python> "a string" is True Or, rather, python> if 'a string': print 'success' Sorry, Karsten -- GPG key ID E4071346 @ eu.pool.sks-

Re: right list for SIGABRT python binary question ?

2017-11-04 Thread Karsten Hilbert
fected. Obtain its source. Recompile > with symbols and try to find out where this memory block comes from. Dieter, thanks for taking the time to explain the general procedure. However, recompiling a library and trying to find out where given block of memory comes from is way beyond skills. I fear

Re: Aw: Try: Except: evaluates to True every time

2017-11-05 Thread Karsten Hilbert
le it doesn't return True (as I mistakenly suggested) it does return False, always, which is the very same reason for OP's problem, namely returning a string, doing a logic test on that, and assuming that would tell whether the check succeeded or failed. Unless I am totally mistaken :-) Karsten

Re: Any good explanations on pd.merge(df,df2, on=['Code', 'Region'])

2017-11-08 Thread Karsten Hilbert
t;", line 1, in NameError: name 'pd' is not defined >>> You will need to provide more context to get help. Regards, Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 -- https://mail.python.org/mailman/listinfo/python-list

Re: Shoulid constants be introduced to Python?

2017-11-17 Thread Karsten Hilbert
t do that beats me, unless it is there for > hyster^H^H^H^H^Historical reasons.) So, import math math.PI = math.pi seems helpful :) Karsten -- -- https://mail.python.org/mailman/listinfo/python-list

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-23 Thread Karsten Hilbert
nk it's too much to ask for a programmer to have the > technology and expertise necessary to type their own language in its > proper alphabet. Surely, but it can make reusing code a nightmare. Using function arguments written in Thai script ? Understanding, let alone being able to read, code w

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-24 Thread Karsten Hilbert
why it makes a difference to you. I can visually pattern match "words" based on Latin characters. I can't with Arabic letters. So that answers the "would you prefer" part. However, the main point has been answered - Python already does what is talked about. End of story.

Re: Please tell me how to execute python file in Ubuntu by double clicking on file. (Posting On Python-List Prohibited)

2017-12-06 Thread Karsten Hilbert
ne level below that: mailcap is independant of the desktop environment, it does associate file (content) types with suitable (hopefully) applications. The one thing it doesn't "do" that's relevant to OPs post is that it doesn't react to clicks or taps in order to _execute_ tho

Re: we want python software

2017-12-07 Thread Karsten Hilbert
> > A junior programmer sees the unlimited possibilities of programming. No > > montain is too high to climb. > > > > A seasoned programmer is elated if they can get anything to work at all. Good judgement comes from experience. And a lot of that comes from bad judge

Re: Anything similar to __END__ in perl

2017-12-08 Thread Karsten Hilbert
On Thu, Dec 07, 2017 at 11:55:48PM -0600, Peng Yu wrote: > Hi, perl has __END__ which ignore all the lines below it. > > Is there anything similar to __END__ in python? Thanks. Something similar is: import sys sys.exit() Karsten -- GPG key ID E4071346 @ eu

Re: Anything similar to __END__ in perl

2017-12-08 Thread Karsten Hilbert
t sys > > sys.exit() > > That will give syntax (or something) errors for what follows True enough, didn't think of that. However, OP asked for something _similar_ :-) Which proves that any answer needs a definition of "similar" by OP. Or at least: how similar is simil

Re: Where has the practice of sending screen shots as source code come from?

2018-01-28 Thread Karsten Hilbert
modem into surprising things by whistling just the right way ... :-) Best, Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 -- https://mail.python.org/mailman/listinfo/python-list

Re: read Unicode characters one by one in python2

2018-02-24 Thread Karsten Hilbert
ter/UTF8#Python This seems off, because in Python2 you can also specify an encoding. However, you seem to be asking about reading the console which comes with more caveats. So, what is it ? Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407

Re: Pre-Pre-PEP: The datetime.timedeltacal class

2022-04-17 Thread Karsten Hilbert
Am Sun, Apr 17, 2022 at 11:10:01AM +1200 schrieb Greg Ewing: > On 17/04/22 9:17 am, Karsten Hilbert wrote: > > Take this medication for 1 month ! > > > >is quite likely to mean "take it for 28 days". > > Except when your doctor prescribes 90 days worth of

Re: Automatic Gain Control in Python?

2022-06-06 Thread Karsten Hilbert
] pulling in the programs ... and that ... > and playing them for an audience. ?? IOW, during the "and" phase. Best, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: How to replace characters in a string?

2022-06-08 Thread Karsten Hilbert
Am Wed, Jun 08, 2022 at 11:09:05AM +0200 schrieb Dave: > myString = 'Hello' > myNewstring = myString.replace(myString,'e','a’) That won't work (last quote) but apart from that: myNewstring = myString.replace('e', 'a') Karsten -- GPG 40BE

Aw: Re: Subtract n months from datetime [Why?]

2022-06-22 Thread Karsten Hilbert
till have it on 29 February? Nope because that's *after* the 5 years (they end Feb 28). If it originates on March 1st, however, you shouldn't dispose of it on Feb 29th just yet. Karsten -- https://mail.python.org/mailman/listinfo/python-list

Re: for -- else: what was the motivation?

2022-10-09 Thread Karsten Hilbert
But, what's done is done. Or, "eventually". Sadly, "finally" is already taken, and with slightly different semantics... Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: What to use for finding as many syntax errors as possible.

2022-10-09 Thread Karsten Hilbert
hat sorts of errors you are looking for and what margin of error or leeway for false positives you want to allow. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: What to use for finding as many syntax errors as possible.

2022-10-09 Thread Karsten Hilbert
g after the first > syntax error. A-ha, so you further defined your context. Under which I can agree to the objective :-) Best, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: for -- else: what was the motivation?

2022-10-10 Thread Karsten Hilbert
or( "Can't open disk" ) return what_needs_to_be_returned do_lots_of_things_with(disk) The latter version may need some code reorganization, though. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Aw: Re: for -- else: what was the motivation?

2022-10-17 Thread Karsten Hilbert
, etc. http://literateprogramming.com/ Karsten -- https://mail.python.org/mailman/listinfo/python-list

Re: A trivial question that I don't know - document a function/method

2022-10-23 Thread Karsten Hilbert
clearFirst=True) -> None: and use RETURNS (or Returns:) only when what is returned warrants further explanation (say, as to what is returned when). Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: A trivial question that I don't know - document a function/method

2022-10-23 Thread Karsten Hilbert
gh, and > the names > are clear enough, sure, go ahead and rely on the type annotations. The most > important > thing is that readers can understand what the arguments and returns are > intended to be, > so some flexibility makes sense. +1 Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

"mailcap" to be removed (3.13) -- suggested replacement ?

2022-10-26 Thread Karsten Hilbert
uot;mailcap" ? Put another way: what is the suggested way of replacing that module in existing code ? The use case is "find the viewer for any kind of file (by mimetype), as long as the system knows". Thanks, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-14 Thread Karsten Hilbert
Am Mon, Nov 14, 2022 at 02:13:34AM + schrieb MRAB: > But if it's an expression where it's expecting a statement and it's not a > call, then > it's probably a bug. That "probably" makes it suitable for a linter, as was pointed out. Karsten -- GPG 4

Re: Are these good ideas?

2022-11-14 Thread Karsten Hilbert
be passed back. > > Having had the idea described above, I am considering using it again to > save all the parameter-and-results passing. > > I see nothing wrong with doing that, but I may well be missing something! Maybe pass and return a class ? Maybe even a data class ? Karst

pylint scoping question

2023-02-08 Thread Karsten Hilbert
ing ? How should I properly go about my objective (apart from fixing my code, of course :-D ) ? Thanks for insights, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: pylint scoping question

2023-02-08 Thread Karsten Hilbert
Am Wed, Feb 08, 2023 at 12:20:48PM +0100 schrieb Karsten Hilbert: > I have a pylint scoping (or how-to) question. ... > Objective: > > to disable all pylint errors/warnings starting from a > particular source line until EOF (that part contains > to-be-run-manually scratch/test

Re: TypeError: can only concatenate str (not "int") to str

2023-02-27 Thread Karsten Hilbert
and sounded a bit like a cold-hearted > (or warm-hearted) Nazi officer / scientist. Now, I have a lot of sympathy -- not least from a professional point of view -- and see quite some leeway for people acting neuro-atypically, but the last line of the above really isn't necessary to be

Aw: Re: Python 3.10 Fizzbuzz

2023-02-28 Thread Karsten Hilbert
> > I've never tried Black or any other code formatter, but I'm sure we > > wouldn't get on. > > Does this suggest, that because Black doesn't respect other people's > opinions and feelings, that it wouldn't meet the PSF's Code of Condu

Aw: Re: Standard class for time *period*?

2023-03-28 Thread Karsten Hilbert
s to be *useful* more needs need to be explained. Until then - YAGNI. Karsten -- https://mail.python.org/mailman/listinfo/python-list

Aw: Re: Windows Gui Frontend

2023-04-02 Thread Karsten Hilbert
I builders back around > v2.6 and came away less than enthused. Things may have > improved since then but I've seen no real evidence of > that. Is this available anywhere ? What GUI builders do (for me) is to make creating the GUI in a WYSIWYM way. Like LyX for LaTeX. Karsten -- ht

Re: open sentinel-2image python

2021-01-17 Thread Karsten Hilbert
n install more RAM. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: Python cannot count apparently

2021-02-07 Thread Karsten Hilbert
Am Sun, Feb 07, 2021 at 08:34:34PM +0100 schrieb Philipp Daher via Python-list: > I recently coded this snippet of code: > myString=„hello“ I doubt you have (coded *this* snippet of code) -- because those quotes wouldn't work. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC8

Re: Python cannot count apparently

2021-02-07 Thread Karsten Hilbert
erything right away. The sort of response we would get from OP would tell us what sort of help might be most suitable :-) Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-22 Thread Karsten Hilbert
: The algorithm uses a simple language-independent [...] and context-naive, not locale related, [...] definition of a word [...] and life with that wart. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Aw: not able to download PyAudio

2021-04-02 Thread Karsten Hilbert
The same as with speech recognition. Research. Karsten > Gesendet: Freitag, 02. April 2021 um 10:40 Uhr > Von: "ᗷᑌᑎᑎY" > An: "Igor Korot" > Cc: "python-list@python.org" > Betreff: not able to download PyAudio > >Hello everyone >

Re: googletrans in python

2021-04-12 Thread Karsten Hilbert
description of what you want to achieve -- what did you already try ? Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: XML Considered Harmful

2021-09-25 Thread Karsten Hilbert
nown mapping to string, which makes it usable within JSON. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: XML Considered Harmful

2021-09-28 Thread Karsten Hilbert
ata generator = data.generators[sys.argv[1]] run_simulation(generator) or some such ? Your data "format" is ... Python code. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: Definitive guide for Regex

2021-10-05 Thread Karsten Hilbert
well-liked activity, neither here nor on the PostgreSQL lists. Best, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: The task is to invent names for things

2021-10-27 Thread Karsten Hilbert
Am Wed, Oct 27, 2021 at 10:20:19AM +1100 schrieb Chris Angelico: > Many operations in computing are fully reversible. After you do > something, you can undo it. After you assign, you can unassign. And > after you ite, you can unite! I wonder whether Japanese programmers would agree.

Re: The task is to invent names for things

2021-10-27 Thread Karsten Hilbert
mediocre name. In > the course of time, often a better name will come to one's mind. In that situation, is it preferable to choose a nonsensical name over a mediocre one ? Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: The task is to invent names for things

2021-10-27 Thread Karsten Hilbert
to un-go, revert-the-having-gone-ness, I genuinely wonder ... On the other hand, Japanese is full of wondrous word-play at levels undreamt of by us ASCIInarians. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: The task is to invent names for things

2021-10-27 Thread Karsten Hilbert
Am Wed, Oct 27, 2021 at 12:41:56PM +0200 schrieb Karsten Hilbert: > Am Tue, Oct 26, 2021 at 11:36:33PM + schrieb Stefan Ram: > > > xyzzy = lambda x: 2 * x > > > > . Sometimes, this can even lead to "naming paralysis", where > > one thinks excessive

Aw: Re: The task is to invent names for things

2021-10-27 Thread Karsten Hilbert
ensical name might lead readers to go beyond the name when trying to understand code, and would prompt me to improve upon the name upon reading my own code (and having acquired, likely, a better understanding of the concept that's to be named). Karsten -- https://mail.python.org/mailman/listinfo/python-list

Aw: Re: The task is to invent names for things

2021-10-28 Thread Karsten Hilbert
> Karsten Hilbert writes: > >ite is the -te form (in some uses like a gerundium) of aru > >(to go, to walk) > > This form, "行って", is written with two "t", as "itte", > in many transcriptions to convey the gemination (っ) of > the &qu

Re: How to apply a self defined function in Pandas

2021-10-31 Thread Karsten Hilbert
pe "help", "copyright", "credits" or "license" for more information. >>> list('simplicity') ['s', 'i', 'm', 'p', 'l', 'i', 'c', 'i', 't', 'y'] >>> Best, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: builtins.TypeError: catching classes that do not inherit from BaseException is not allowed

2021-12-31 Thread Karsten Hilbert
Am Thu, Dec 30, 2021 at 03:57:25PM -0800 schrieb hongy...@gmail.com: > > > Then what cases/scenarios can demonstrate the beauty of recursion? > > > > > Walking a tree. > > There are many type of trees. Do you mean all of them? Palm trees don't lend themselves t

Aw: Re: Best way to check if there is internet?

2022-02-07 Thread Karsten Hilbert
> Or the internet acquires a new protocol that's designed > for very-long-latency connections. That's being worked on already https://en.wikipedia.org/wiki/NASA_Deep_Space_Network Karsten -- https://mail.python.org/mailman/listinfo/python-list

Aw: Re: Long running process - how to speed up?

2022-02-19 Thread Karsten Hilbert
t;time.sleep" in there... I doubt removing that will help much ;-) Karsten -- https://mail.python.org/mailman/listinfo/python-list

Aw: PYT - How can I subscribe to a topic in the mailing list?

2022-02-19 Thread Karsten Hilbert
> Betreff: PYT - How can I subscribe to a topic in the mailing list? Mailing lists don't subdivide by topic. Your mailer may allow you to filter by Subject:. > And h*ow do I set the topic in my messages?* not applicable The equivalent would be the Subject: header. Karste

Aw: Re: Best way to check if there is internet?

2022-02-22 Thread Karsten Hilbert
> Is there any value whatsoever in a lie? Do we _know_ it's a lie ? Does a lie become a Falsed Truth once it becomes known ? Karsten -- https://mail.python.org/mailman/listinfo/python-list

Re: Pre-Pre-PEP: The datetime.timedeltacal class

2022-04-16 Thread Karsten Hilbert
nt: Take this medication for 1 month ! is quite likely to mean "take it for 28 days". This standing order (Dauerauftrag) is to be run every months from now on. will mean "every 1st of the month, regardless of how many days passed". Karsten GNUmed -- GPG

Re: ANN: PyDDF Python Spring Sprint 2018

2018-04-11 Thread Karsten Hilbert
> * mxDateTime Portierung auf Python 3.6 +1 !! Karsten Hilbert -- -- https://mail.python.org/mailman/listinfo/python-list

Re: beacons and geofences

2018-04-12 Thread Karsten Hilbert
ing the POIs. How should it be implemented in Python? > > What? You'll have to describe the problem in more details > if you want any sensible answers. I just might so happen that the homework assignment did not contain much more in terms of description. Karsten -- GPG key ID E4071346 @ eu

Aw: Re: why does list's .remove() does not return an object?

2018-05-17 Thread Karsten Hilbert
> On 5/17/18 11:57 AM, Abdur-Rahmaan Janhangeer wrote: > > x = [0,1] > > x.remove(0) > > new_list = x > > > > instead i want in one go > > > > x = [0,1] > > new_list = x.remove(0) # here a way for it to return the modified list by > > adding a .return() maybe ? > > There isn't a way to do that in

Aw: Re: why does list's .remove() does not return an object?

2018-05-17 Thread Karsten Hilbert
>new_list = list(x.remove(0)) >new_list = x.remove(0)[:] Please disregard :) kh -- https://mail.python.org/mailman/listinfo/python-list

Re: UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 10442: character maps to

2018-05-20 Thread Karsten Hilbert
One CAN NOT. The best you can do is to go ask the canonical source of the file what encoding the file is _supposed_ to be in. Then go from there and allow for errors. Karsten -- -- https://mail.python.org/mailman/listinfo/python-list

Re: '_' and '__'

2018-05-27 Thread Karsten Hilbert
ttext() in the global namespace, so we'd better avoid that or else ... [ _(_) for _ in '123' ] ... will fail :-) Karsten -- -- https://mail.python.org/mailman/listinfo/python-list

Re: Re: The PIL show() method looks for the default viewer. How do I change this to a different viewer (of my choice)?

2018-05-30 Thread Karsten Hilbert
the argument that should be used in a line > > of code such as this: > > > > ImageShow.register(MyViewer("gwenview"), -1) $> man -k ImageMagick $> man whatever_you_found_with_the_above Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net

Re: your mail

2018-06-10 Thread Karsten Hilbert
On Sun, Jun 10, 2018 at 06:58:17PM +0530, sagar daya wrote: > Couldn't install any module from pip > Plz help??? https://duckduckgo.com kh -- -- https://mail.python.org/mailman/listinfo/python-list

Re: Question : Input after all prompts in python

2018-06-11 Thread Karsten Hilbert
prompt 3 questions *together* and *then* get input for the *first* question *next* to question (emphasis mine) Karsten -- -- https://mail.python.org/mailman/listinfo/python-list

Re: Question : Input after all prompts in python

2018-06-11 Thread Karsten Hilbert
ur age :") > print("3. Enter your gender :") > name = input("") > age = input("") > gender = input("") That doesn't solve the "next to" part in get input for the first question next to question :) Karsten -- -- https://mail.python.org/mailman/listinfo/python-list

Re: Question : Input after all prompts in python

2018-06-11 Thread Karsten Hilbert
input("") > right(22) > age = input("") > right(22) > gender = input("") > > If it doesn't work you are using the wrong terminal ;) Sure, but notice how I said "(easily)" in the original answer ? The above is NOT easy for an OP who has to ask the original question. Karsten -- -- https://mail.python.org/mailman/listinfo/python-list

Re: Question : Input after all prompts in python

2018-06-11 Thread Karsten Hilbert
ter or curses is steep by comparison. Agreed. Note that I had a lurking suspicion this whole thing amounts to a homework assignment (which I didn't say, however) ... ;-) Karsten -- -- https://mail.python.org/mailman/listinfo/python-list

Re: error in os.chdir

2018-06-30 Thread Karsten Hilbert
27;) > The only difference is directory assertion in the problematic code. > I have tried single quoting, double quoting etc. for the chdir directive but > nothing helps. I have also tried escaping as \assertion but that is not the > issue The quick fix: put an r in front of the direc

Re: error in os.chdir

2018-06-30 Thread Karsten Hilbert
lashes instead of backslashes for all paths. > > alright. I will do that but still I don't have an answer why I got the error > in the first place. For that you'll have to read up on strings and escaping. https://docs.python.org/2/tutorial/introduction.html#strings Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: error in os.chdir

2018-06-30 Thread Karsten Hilbert
:\Projects\Initiatives\machine > learning\programs\assertion') > > only difference is, I added an additional directory in the problematic case. The answer lies in the (inadvertant) use of escaping. Which is the very reason _why_ forward slashes were favoured over backward ones. Karsten

Re: Logger option

2018-06-30 Thread Karsten Hilbert
On Sat, Jun 30, 2018 at 10:02:13AM -0700, Sharan Basappa wrote: > I have tried both logging and trace in Canopy and both are not working. You will have to be more specific. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/pyt

  1   2   3   >