Re: About Python Compressed Archive or Binaries

2022-01-18 Thread Christian Heimes
ll work is done in our free time, there is only little progress. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: ssl server: how to disable client cert verfication?

2022-02-04 Thread Christian Heimes
You can't. Python's ssl module does not expose the necessary feature to override the verification callback SSL_CTX_set_verify(). PyOpenSSL lets you set a callback and ignore any and all errors. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: ssl server: how to disable client cert verfication?

2022-02-04 Thread Christian Heimes
cert auth during handshake or renegotiation. Christian -- https://mail.python.org/mailman/listinfo/python-list

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

2022-02-07 Thread Christian Gollwitzer
pass "-fopenmp" to gcc and "/openmp" to msvc. Is there a way to set this flag automatically depending on the compiler? Best regards, Christian -- https://mail.python.org/mailman/listinfo/python-list

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 &

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

2022-02-09 Thread Christian Gollwitzer
en-us/office/dde-function-79e8b21c-2054-4b48-9ceb-d2cf38dc17f9 Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: How to solve the given problem?

2022-02-09 Thread Christian Gollwitzer
t is almost the same problem. Christian -- https://mail.python.org/mailman/listinfo/python-list

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 statisti

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

2022-02-10 Thread Christian Gollwitzer
ion and also what the OP has described. Hence it is impossible to concurrently write from Python into an open Excel file. One might ask what the real problem is the user is trying to solve. Is Excel a requirement, can it be swapped by a database engine? Best regards, Christian -

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

2022-02-20 Thread Christian Gollwitzer
t; in the example. It's a different matter how useful this actually is. One of the object systems in Tcl uses the empty variable to represent "self" as an array, so that you can write $(prop) for self.prop as it is in Python. Christian -- https://mail.python.org/mailman/listinfo/python-list

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

2022-03-08 Thread Christian Gollwitzer
freetype functions in your C code and do not see it referenced, then the lib will not work. Maybe you can install an ARM-version of freetype, or compile it from source during your build process? Christian -- https://mail.python.org/mailman/listinfo/python-list

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

2022-03-21 Thread Christian Gollwitzer
cibuildwheel. Christian -- https://mail.python.org/mailman/listinfo/python-list

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

2022-03-28 Thread Christian Gollwitzer
GNOME desktop, but suspect it should be similarly easy. Christian -- https://mail.python.org/mailman/listinfo/python-list

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

2022-03-28 Thread Christian Gollwitzer
Tkinter itself. Sure: Call "winfo_id()" on the toplevel. You might want to reformat in it in hex format, which is the usual way to pass these IDs around. Tk actually returns it in hex format, but Tkinter reformats it as an integer. Christian -- https://mail.python.org/mailma

Re: Exchange OWA using Python?

2022-03-31 Thread Christian Gollwitzer
protocols like POP3, IMAP, SMTP. You can use any email/calender client (I've used thunderbird) and most of it worked well. Davmail is written in Java, not Python, but basically this should not matter if you only use it. Christian -- https://mail.python.org/mailman/listinfo/python-list

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 and there was

Re: Comparing sequences with range objects

2022-04-09 Thread Christian Gollwitzer
e your own comparator function? Also, if the only case where this actually works is the index of all other records, then a simple boolean flag "all" vs. "these items in the index list" would suffice - doesn't it? Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: No shortcut Icon on Desktop

2022-04-15 Thread Christian Gollwitzer
s installers create these shortcuts during the installation process for you - typically there is a pre-selected checkbox "Create desktop icons" or similar. I agree with Grant that this is what users expect from the installer. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: How do I make a video animation with transparent background?

2016-08-10 Thread Christian Gollwitzer
editing software should support colour keying, i.e. masking the green parts out, becuase this is used in film production (green screening) Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Asynchronous programming

2016-08-10 Thread Christian Gollwitzer
lback code to button.on_click() is obviously less fun and feels inverted. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Asynchronous programming

2016-08-10 Thread Christian Gollwitzer
g the aforementioned functions. When a Tcl callback arrives, it would send an event to asyncio in the main thread - no idea how this works, though. In the end, it would also allow to use Tkinter from different Python threads, because all calls would be rooted to the one instance only.

Re: Vectorized functions

2016-08-10 Thread Christian Gollwitzer
compiles to native code using LLVM. Numpy's ufunc comes to mind - there is also a vectorizer for Python functions http://docs.scipy.org/doc/numpy/reference/generated/numpy.frompyfunc.html#numpy.frompyfunc Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: What's the best way to minimize the need of run time checks?

2016-08-13 Thread Christian Gollwitzer
warning" as this bug, so it's a bit hard to find. A linter from another language I use also spell-checks variable names, i.e. if it finds two variables with suspiciously similar names, it reports it. Of course the linter never knows for sure, it can only give warnings. Chr

Re: I am new to python. I have a few questions coming from an armature!

2016-08-16 Thread Christian Gollwitzer
ogram in the end. The faster you get the job done, the more successful you are. For many of those tasks, Python works very well. For others, I use different languages. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: I am new to python. I have a few questions coming from an armature!

2016-08-17 Thread Christian Gollwitzer
both without problems, but I avoid writing conditional expressions - if the subexpressions are not very simple. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: a *= b not equivalent to a = a*b

2016-08-26 Thread Christian Gollwitzer
in Python 3) *also* may give a different result, but the deviation from the "true", i.e. mathematical value, is far less than with integer arithmetics. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: What's the best way to minimize the need of run time checks?

2016-08-29 Thread Christian Gollwitzer
a block of memory reserved for "constants" that are loaded on start-up of the program. x is assigned a pointer to that string. The difference is that you are not allowed to write to this memory area, for some compilers it causes a segfault if you try to write there. YMM

Re: Helloworld with Python C extension

2016-08-30 Thread Christian Gollwitzer
show out-of-bounds accesses for arrays immediately. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: C Python extension to export an Function

2016-09-01 Thread Christian Gollwitzer
eader files which declare your functions, and it writes the wrapper code for you. In simple cases (standa data types like int, float, string,...), it might be enough. In more advanced cases, you can add your wrappers as "typemaps". Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: C Python extension to export an Function

2016-09-01 Thread Christian Gollwitzer
case look at the PyArg_ParseTuple and Py_BuildValue functions documented here https://docs.python.org/2/c-api/arg.html Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Strange behaviour with numbers in exponential notation

2016-09-02 Thread Christian Gollwitzer
a 64bit IEEE number. The largest exact integer there is 2**53 (~10^16), everything beyond cannot be accurately represented. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Strange behaviour with numbers in exponential notation

2016-09-02 Thread Christian Gollwitzer
Am 02.09.16 um 19:24 schrieb Marco Sulla: Excuse me, I forgot to include the python list mail addess. I repost the mail. On Fri, Sep 2, 2016 at 6:18 PM, Christian Gollwitzer wrote: 1e26 denotes a *floating point number* Floating point has finite precision, in CPython it is a 64bit IEEE

Re: Strange behaviour with numbers in exponential notation

2016-09-02 Thread Christian Gollwitzer
Am 03.09.16 um 02:31 schrieb Marco Sulla: On 2 September 2016 at 21:12, Christian Gollwitzer wrote: Am 02.09.16 um 19:24 schrieb Marco Sulla: Because Python has no long double type? Python no of course, but C++ yes, and CPython is written in C++. However, I think the answer is here: https

Re: Strange behaviour with numbers in exponential notation

2016-09-04 Thread Christian Gollwitzer
Am 04.09.16 um 10:29 schrieb Nobody: On Fri, 02 Sep 2016 18:18:08 +0200, Christian Gollwitzer wrote: 1e26 denotes a *floating point number* Floating point has finite precision, in CPython it is a 64bit IEEE number. The largest exact integer there is 2**53 (~10^16), everything beyond cannot be

Re: manually sorting images?

2016-09-04 Thread Christian Gollwitzer
nails): http://auriocus.de/slideshow/ - maybe it helps. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: nested loops in Python

2016-09-08 Thread Christian Gollwitzer
. Speed differences of ~100x are normal between compiled and interpreted code over all dynamic languages. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: python3 regex?

2016-09-09 Thread Christian Gollwitzer
u would either need to switch the re to multiline mode https://docs.python.org/2/library/re.html#re.MULTILINE or do it in a loop, the same way that perl does it implicitly: for line in f: print(re.findall(line).group(0)) (untested) Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter file dialog screwed

2016-09-13 Thread Christian Gollwitzer
. If you use the arrow keys to navigate the files, does it "highlight" the current item in black? Best regards, Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Why don't we call the for loop what it really is, a foreach loop?

2016-09-14 Thread Christian Gollwitzer
which language is it? First I thought C++ or Java, but they don't use self and there is a => operator. PHP adornes variables with $. Another C-derived language which has built-in hash maps? Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: how to automate java application in window using python

2016-09-16 Thread Christian Gollwitzer
nowledge of the applications' structure, of course. Another (less robust) way of desktop automation is Sikuli http://www.sikuli.org/ (Windows only, I think) Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: array.itemsize: Documentation Versus Reality

2016-09-17 Thread Christian Heimes
ough the itemsize attribute. > > Are there any C compilers still in common use where the values will not be 4 > and 8, as above? Yes, on Windows (32 and 64bit), a long is always 32bit and an array with datatype "L" has itemsize 4. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: How to convert 'ö' to 'oe' or 'o' (or other similar things) in a string?

2016-09-18 Thread Christian Gollwitzer
ot;Lästerer" would be the last entry. If it would sort as "ae", it would be the first entry. Therfore, in this example it sorts as "a", with "ä" > "a" to resolve a tie only. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: how to automate java application in window using python

2016-09-18 Thread Christian Gollwitzer
tract machines on top of lower-level ones. GUIs are the end of the abstraction chain: you cannot build anything more on top of them. Yes, you can. I agree with you that it is a shaky solution, but that doesn't make it impossible. Christian -- https://mail.python.org/mailman/listi

Re: how to automate java application in window using python

2016-09-18 Thread Christian Gollwitzer
Am 18.09.16 um 12:26 schrieb Lawrence D’Oliveiro: On Sunday, September 18, 2016 at 10:13:41 PM UTC+12, Christian Gollwitzer wrote: Am 18.09.16 um 12:03 schrieb Lawrence D’Oliveiro: Like I said, trying to automate a GUI is a waste of time. GUIs are designed for humans, not computers, to use

Re: how to automate java application in window using python

2016-09-18 Thread Christian Gollwitzer
Am 19.09.16 um 00:45 schrieb Lawrence D’Oliveiro: On Sunday, September 18, 2016 at 11:02:57 PM UTC+12, Christian Gollwitzer wrote: Am 18.09.16 um 12:26 schrieb Lawrence D’Oliveiro: Considering the power available in Free Software toolkits like ImageMagick, G’MIC and so on, not to mention

Re: Another å, ä, ö question

2016-09-19 Thread Christian Gollwitzer
/usr/bin/python # -*- coding: utf-8 -*- on top of your files. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Cython taking more time than regular Python

2016-09-20 Thread Christian Gollwitzer
d microseconds means that the loop does run. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Pasting code into the cmdline interpreter

2016-09-21 Thread Christian Gollwitzer
n't resolve the tab issue. However, Python code in general (due to indentation) is not very friendly for pasting and interactive usage. Better write the code to a file, then (again from IPython) you can read this by %run filename.py Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: pypy on windows much slower than linux/mac when using complex number type?

2016-09-24 Thread Christian Gollwitzer
e more modern 64bit lib uses hand-tuned SSE to perform the equivalent. Just for fun, you could try this hypot to see how it performs. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: How to convert 'ö' to 'oe' or 'o' (or other similar things) in a string?

2016-09-25 Thread Christian Gollwitzer
Am 25.09.16 um 01:08 schrieb Thomas 'PointedEars' Lahn: Christian Gollwitzer wrote: Am 17.09.16 um 23:19 schrieb Thomas 'PointedEars' Lahn: Peng Yu wrote: Hi, I want to convert strings in which the characters with accents should be converted to the ones without accents.

Re: Why searching in a set is much faster than in a list ?

2016-09-28 Thread Christian Gollwitzer
for i in range(100)] s = set(l) Try longer lists/sets and the difference should increase. Christian t1 = Timer("randint(0, 200) in l", "from __main__ import l, randint") t2 = Timer("randint(0, 200) in s", "from __main__ import s, randint")

ANN: dedent 0.5 released

2016-09-29 Thread Christian Tismer
indent," "and that was my intent. :-)" """ Installation $ pip install dedent That's all, folks! Have fun. p.s.: Why is that not build in by default? -- Christian Tismer :^) tis...@stackless.com Software Consulting

Re: ANN: dedent 0.5 released

2016-09-29 Thread Christian Tismer
On 29/09/16 22:14, Lele Gaifax wrote: Christian Tismer writes: Dedent 0.5 == What is it? --- Dedent is a very simple tool for those people who like to indent their inline code nicely. p.s.: Why is that not build in by default? Isn't it roughly the same as

Re: rocket simulation game with just using tkinter

2016-10-01 Thread Christian Gollwitzer
fore I can successfully play this, though. My [] "keys" are in fact combinations of Alt+5 and Alt+6 on a German Macbook keyboard (on a German PC, it is AltGr+8, AltGr+9). Why not using the arrow keys? These should be pretty universal Christian So you just need python 2/3 with

Re: rocket simulation game with just using tkinter

2016-10-04 Thread Christian Gollwitzer
s also different speed on different system. And, the canvas is not intended to redraw everything on each frame. Instead, updating the objects using the coords() method is usually faster. (It should also be easier) Christian Irmen -- https://mail.python.org/mailman/listinfo/python-list

Re: calculator between raster

2016-10-09 Thread Christian Gollwitzer
image file into numpy array, do your calculations the way you wrote, and transform it back to an image (file, or display). Try: from PIL import Image import numpy arr = numpy.asarray(Image.open('somefile.png')) Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Local variables to a function doesn't disapear after function execution. Why ?

2016-10-12 Thread Christian Gollwitzer
does never terminate. You have the mainloop inside of your constructor. As long as this loop runs, your program exists. Try it by putting test=Test() print("Now I am here") and you'll see. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-25 Thread Christian Gollwitzer
utput('The product is ', x*y) which becomes either a command line thingy with -x and -y options or a GUI with input fields and an output line. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-27 Thread Christian Gollwitzer
. You need it, if you want to program a text editor or similar thing, but without using a real GUI. This is a small niche. It is both easier and more functional to use a real GUI library. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-28 Thread Christian Gollwitzer
Am 28.10.16 um 09:33 schrieb Marko Rauhamaa: Christian Gollwitzer : I still believe that it is not a "basic functionality". You need it, if you want to program a text editor or similar thing, but without using a real GUI. This is a small niche. I disagree. It's a very large gr

Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-28 Thread Christian Gollwitzer
Am 28.10.16 um 10:59 schrieb Marko Rauhamaa: Christian Gollwitzer : Am 28.10.16 um 09:33 schrieb Marko Rauhamaa: I am just not convinced that so many people need to implement something like readline. I don't know. How would you implement "less" in Python? How would you impleme

Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-28 Thread Christian Gollwitzer
Am 28.10.16 um 12:30 schrieb Marko Rauhamaa: Christian Gollwitzer : Am 28.10.16 um 10:59 schrieb Marko Rauhamaa: I don't know. How would you implement "less" in Python? How would you implement "nethack" in Python? On my system: Apfelkiste:~ chris$ otool -L /u

Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-29 Thread Christian Gollwitzer
>>> (I know the prog is incomplete, but that's not the point) This way you can concentrate on the algorithm and leave the I/O thing to python. Due to the built-in readline, you can recall previous arguments, edit them when you make mistakes, save the result (if there were any), .

Re: [Theory] How to speed up python code execution / pypy vs GPU

2016-11-09 Thread Christian Gollwitzer
alue, then your algorithm is numerically unstable and you there is no way to decide which of both results is correct - most probably both are wrong. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Asyncio -- delayed calculation

2016-11-30 Thread Christian Gollwitzer
ll/return) has tainted our minds so much that we have trouble figuring out a "function call" which does not "return" in the usual sense. The implementation is even more convoluted with the futures and promises and whatnot. For simply using that stuff it is not important to k

Re: US/Eastern offset

2016-12-22 Thread Christian Heimes
so fast that they are four minutes closer to their London counterparts > than they used to be? pytz contains not only current time zone, but also historic time zones. You are looking at a time zone without a date and time context. Without a context, pytz shows you a historic time zone informati

Re: Temporary variables in list comprehensions

2017-01-09 Thread Christian Gollwitzer
pensive_calc(x) for x in data] or similar. So maybe that's a PEP to extend the list comprehension syntax? Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Python, asyncio, and systemd

2017-01-17 Thread Christian Heimes
odule. [1] https://bugs.python.org/issue28134 [2] https://github.com/tiran/socketfromfd [3] https://github.com/latchset/custodia/blob/master/custodia/httpd/server.py#L491 [4] http://0pointer.de/blog/projects/socket-activation.html Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: How to create a socket.socket() object from a socket fd?

2017-01-21 Thread Christian Heimes
interested in my small module https://pypi.python.org/pypi/socketfromfd/ . I just releases a new version with a fix for Python 2. Thanks for the hint! :) The module correctly detects address family, socket type and proto from a fd. It works correctly with e.g. IPv6 or Unix sockets. Ticket https://bugs.python.org/issue28134 has additional background information on the matter. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: How to create a socket.socket() object from a socket fd?

2017-01-22 Thread Christian Heimes
On 2017-01-22 01:03, Grant Edwards wrote: > On 2017-01-21, Christian Heimes wrote: > >> You might be interested in my small module >> https://pypi.python.org/pypi/socketfromfd/ . I just releases a new >> version with a fix for Python 2. Thanks for the hint! :) >> &

Re: Is Python SSL API thread-safe?

2017-01-22 Thread Christian Heimes
On 2017-01-22 21:18, Grant Edwards wrote: > Is the Python SSL API thread-safe with respect to recv() and send()? > > IOW, can I have one thread doing blocking recv() calls on an SSL > connection object while "simultaneously" a second thread is calling > send() on that same connection object? > >

Re: How coding in Python is bad for you

2017-01-23 Thread Christian Gollwitzer
e, previously people used impenetrable FORTRAN 77, thankfully they use Python now. Lack of encapsulation is a featurenot a bug. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Hide text in entry box when i click on it.(GUI using Tkinter in python)

2017-01-25 Thread Christian Gollwitzer
sappearing placeholder) should also trigger, when somebody uses the tab key to set the focus to the window. This can be achieved by binding to the event instead: search.bind("", clear_search) In addition, repeated clicking does not clear the text then.

Re: Overriding True and False ?

2017-01-30 Thread Christian Gollwitzer
s I've done here, or just stop using the mobile client. This one looks fine, FYI. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Python3.6 tkinter bug?

2017-01-31 Thread Christian Gollwitzer
(w, 'configure'), which lists you the Tk side configuration, or self.call(w, 'configure', '-variable') to get specifically the bound variable. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Python3.6 tkinter bug?

2017-01-31 Thread Christian Gollwitzer
Am 01.02.17 um 00:02 schrieb MRAB: On 2017-01-31 22:34, Christian Gollwitzer wrote: .!frame.!checkbutton .!frame.!checkbutton2 .!frame2.!checkbutton .!frame2.!checkbutton2 Perhaps someone who knows Tcl and tk can tell me, but I notice that in the first example, the second part of the widget

Re: macOS specific - reading calendar information

2018-03-15 Thread Christian Gollwitzer
ex.html The native script language is Apple Script or JavaScript. If you want to control it from Python, you need a bridge. I have no experience with it, but a quick Google search reveals https://pypi.python.org/pypi/py-applescript and https://docs.python.org/2/library/macosa.html

Re: Entering a very large number

2018-03-25 Thread Christian Gollwitzer
s. Convert them at module initialization and assign them to a global variable. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Entering a very large number

2018-03-26 Thread Christian Gollwitzer
r i in range(100): fn() #print(fn()) === Out of pure laziness, I haven't compared it to the version with the long string. Maybe tha gurus here find yet another elegant way to assign the constant only once; my trial with "fn.C = foobar" was not successful. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Levenberg-Marquardt Algorithm

2018-04-11 Thread Christian Gollwitzer
using scipy.ndimage.interpolation.shift, and minimize the sum of squared differences. But still LM is the wrong tool here, it would get trapped in local minima soon, and it uses derivatives. Look for "image registration" to find typical algorithms used in this context. Christian -- https://

Re: "Data blocks" syntax specification draft

2018-05-21 Thread Christian Gollwitzer
Thing is, you can do it already now in the script, without modifying the Python interpreter, by parsing a triple-quoted string. See the examples right here: http://pyyaml.org/wiki/PyYAMLDocumentation Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: "Data blocks" syntax specification draft

2018-05-22 Thread Christian Gollwitzer
t is what is used to build the Python parser: https://docs.python.org/3/reference/grammar.html Actually, I'm a bit surprised that tuple, list etc. does not appear there as a non-terminal. It is a bit hard to find, and it seems that "atom:" is the starting point for parsing tuple

Re: Why cannot I use __slots__ and weakrefs together?

2018-05-26 Thread Christian Heimes
eference to 'Eggs' object > > > > Why does weakref hate my Eggs class? Weakref needs some place to store reference information. It works if you add "__weakref__" to your slots: class Eggs: __slots__ = ['spanish_inquisition', '__weakref__'] Christian -- https://mail.python.org/mailman/listinfo/python-list

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

2018-05-27 Thread Christian Gollwitzer
atever the user has set in his desktop environment. Technically, xdg-open needs not to be present on Linux, though it is usually installed. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: tkinter (ttk) combobox dropdown text is white on white

2018-06-03 Thread Christian Gollwitzer
u colors. For instance, if you use a dark theme in your desktop environment, it could be that the foreground is correctly set to white, but the background is hardcoded white for some reason e.g. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: How to find an object existing?

2018-06-13 Thread Christian Gollwitzer
stroy() >>> button.winfo_exists() 0 I am not sure that this is very helpful, though. Usually you don't destroy a button yourself, it is done by the destructor when the button is deleted, and therefore, winfo_exists() under normal circumstances returns true. What are you really trying to achieve? Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP 526 - var annotations and the spirit of python

2018-07-05 Thread Christian Gollwitzer
&& ./intx intx.c:4:4: warning: implicit conversion from 'double' to 'int' changes value from 2.5 to 2 [-Wliteral-conversion] x=2.5; ~^~~ 1 warning generated. 2 Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: testing code

2018-07-08 Thread Christian Gollwitzer
ur interpreter, you should see both lines printed. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Cult-like behaviour [was Re: Kindness]

2018-07-14 Thread Christian Gollwitzer
velopment!" A2: "All hail to Guido. In 5 years, you'll ned that, and then His Time-Machine has struck again!" Q: "But isn't this the same as ?: in Java or C?" A3: "Never. There is a HUGE difference! ?: is sooo confusing. But a if c else b, look, the orde

Re: PEP 526 - var annotations and the spirit of python

2018-07-14 Thread Christian Gollwitzer
Am 05.07.18 um 12:04 schrieb Steven D'Aprano: On Thu, 05 Jul 2018 09:17:20 +0200, Christian Gollwitzer wrote: Am 04.07.18 um 17:31 schrieb Steven D'Aprano: On Wed, 04 Jul 2018 13:48:26 +0100, Bart wrote: Presumably one type hint applies for the whole scope of the variable, not ju

Re: Can anyone tell me where the old MacPython "16 ton" logo came from?

2018-07-15 Thread Christian Heimes
On 2018-07-15 14:05, Mark wrote: > I'm curious to understand how come the original MacPython logo is of a 16 ton > weight (rather than, say the word 'python' or a picture of a snake)? > You can see the logo here: https://homepages.cwi.nl/~jack/macpython/ Most obscure references in Python are base

Re: Users banned

2018-07-15 Thread Christian Gollwitzer
m and technical manner. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Cult-like behaviour [was Re: Kindness]

2018-07-15 Thread Christian Gollwitzer
rograms, and it works for me to simply ignore that there is Unicode etc. Just load some data and show it in numpy, why do I need to care about Unicode? Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-19 Thread Christian Gollwitzer
slations. Well that link tries to translate "assistshop" into the czech word "prodavač" which is the usual word for a person in a shop who consults the customers and sells the goods to them; I don't know if "assist shop" in English comes close, as I

Re: How to make python pick up my new-and-shiny openssl shared object

2018-08-07 Thread Christian Heimes
y /home/fetch/opt/lib or /home/fetch/opt/lib64. You may also have to recompile Python yourself. OpenSSL 1.0.2 is not ABI-compatible with OpenSSL 1.0.0. In case you want to use OpenSSL 1.1.0, you must update to a more recent version of Python, too. OpenSSL 1.1.0 support was added in 2.7.13. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: clever exit of nested loops

2018-09-27 Thread Christian Gollwitzer
lar purpose - for example "StopIteration" to signal that an iterator is exhausted. One might consider to call these "signals" instead of "exceptions", because there is nothing exceptional, apart from the control flow. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: How to change '\\' to '\'

2018-10-01 Thread Christian Gollwitzer
individually. You should shorten the quote to the releveant bit that your reply belongs to. Classic quote: A: Because it reverses the logical flow of conversation. Q: Why is top posting frowned upon? A: Top-posting. Q: What is the most annoying thing on usenet and in email? Christian -

Re: Python indentation (3 spaces)

2018-10-14 Thread Christian Gollwitzer
ick just one tab width. But if you use only tabs for indentation, the tab width setting simply does not matter. I'm in favour of using only tabs. There is a disadvantage only if you try to align something which is NOT an indentation level, e.g. when there are big string constants or list

Re: AES Encryption/Decryption

2018-11-02 Thread Christian Heimes
block mode, and MAC in a sane and safe message format. https://cryptography.io/en/latest/fernet/ Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Re-using TCL code from python over network

2016-03-28 Thread Christian Gollwitzer
sy solution. As an interim solution it might work, but you should seriously consider recompiling the code as 64 bit, migrating all code to Python or watch out for the libraries you need in modern Tcl. Christian -- https://mail.python.org/mailman/listinfo/python-list

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