n?
It's mostly likely a problem with the OS, hardware and/or your
configuration. Python doesn't come with its own stat() implementation.
os.stat() just wraps the libc's stat() function. The heavy lifting is
done inside libc and the kernel.
Christian
--
http://mail.python.org/mailman/listinfo/python-list
confusing bug in our code base
a while ago. After I fixed the ownership of a bunch of files, the ctime
was newer than the mtime. A library couldn't handle that and we got
ourself a nice exception.
Christian
--
http://mail.python.org/mailman/listinfo/python-list
very package and download the files into
these directories
The download link for e.g. lxml 2.3 should look like
http://your.pipy.com/simple/lxml/lxml-2.3.tar.gz. Now point run
"easy_install --index-url http://your.pipy.com/simple lxml==2.3"
Christian
--
http://mail.python.org/mailman/listinfo/python-list
thon 2.6 and
JRE including extension modules in our svn. Only on Unix we install
Python and extension from source. It's a rather practical solution.
Christian
--
http://mail.python.org/mailman/listinfo/python-list
or rather useful. It allows multi-xor tests like:
if a + b + c + d != 1:
raise ValueError("Exactly one of a, b, c or d must be true.")
Christian
--
http://mail.python.org/mailman/listinfo/python-list
led packages.
http://www.pythonware.com/products/pil/ offers X86 Windows binaries for
1.1.7. You might run into a problem with 1.1.7 Windows binaries. The
freetype C library references a debug CRT that is not available on all
machines. You can easily patch the _imagingft.pyd file with a hex editor
the problem
if any(s not in line for s in ('a', 'b', 'c')):
# do something
Christian
--
http://mail.python.org/mailman/listinfo/python-list
I would write the test as:
if set(line).isdisjoint("abc"):
print line
Christian
--
http://mail.python.org/mailman/listinfo/python-list
tree so selftest can find it.
Christian
--
http://mail.python.org/mailman/listinfo/python-list
's
implementation doesn't use buckets to reduce memory usage and pointer
dereferencing. If a slot in the hash table is already filled with an
object that is not equal to the new object (a collision), the hash is
shifted and the new slot is checked. The implementation detail is well
descr
ions of millions
of different NaN values. There are positive and negative NaNs, quiet
NaNs and signaling NaNs. 50 of 52 mantissa bits can vary freely, one bit
makes the difference between signaling and quiet NaNs and at least one
bit must be non-zero.
Christian
--
http://mail.python.org/mailman/listinfo/python-list
ut this problem?
I recommend the ipaddr module [1] for the job. It supports nice features
like:
if IPAddress("144.122.23.42") in IPNetwork("144.122.0.0/16"):
...
Christian
[1] http://pypi.python.org/pypi/ipaddr
--
http://mail.python.org/mailman/listinfo/python-list
nt input fields, hence objects.
In some other more statically compiled languages, OO is shoehorned into
everything ("abstract factory" and that stuff), because virtual calls
are the only way to get dynamic behaviour / late binding. In Python you
use OO only in places where it really makes s
people prefer spelling "T C L", but most use "tickle".
Reference: I've been at some EuroTcl conferences. The talks are on
youtube, too:
https://www.youtube.com/playlist?list=PLHNnTryxvDncfQbxbzfE4XMogoTa6pknP
Christian
--
https://mail.python.org/mailman/listinfo/python-list
last = (last**2 + c) % N
If I have understood what it does, then the result should be the same.
Furthermore, as Chris said, Python has built-in generators for this thing.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
concepts and apply them to new problems, they said.
"We're really making it difficult for students because we are
distracting them from the underlying math," said Jennifer Kaminski, a
research scientist at Ohio State University, whose study appears in the
journal Science.Reuters,
Am 05.10.17 um 19:04 schrieb Steve D'Aprano:
On Thu, 5 Oct 2017 07:29 am, Christian Gollwitzer wrote:
To understand Stefan's way of teaching, take a look at his other
courses, for example the C++ course:
Thanks for this Christian. It has been an eye-opener. More comments below
, which is not extremely bad, but
still does tell nothing about the intent of that line.
Writing the typedef is easy for humans, stick * in front of the function
name for a regular declaration and add (). The compiler can then figure
out the complete type on its own, it's its job, not mi
that way, and
they are lovely for tourists:
https://en.wikipedia.org/wiki/Angerdorf
:)
Christian
--
https://mail.python.org/mailman/listinfo/python-list
out to be nothing compared to the "trivial
decompressor"
print "12344321"
Christian
--
https://mail.python.org/mailman/listinfo/python-list
for it, it is a one-liner:
gawk '{ print > "split" NR%2}' input.txt
So coming to your question: IDEs are good for medium and (diminishingly) for
large programs.
agreed
Useful python programs are often small; even tiny
Christian
--
https://mail.python.org/
iler. It is never a good argument to say "there is no feature X,
because GvR is such a god that he knew the feature isn't needed, and
see? we are doing well without it!". Unfortunately, that logical fallacy
is heard quite often in this group.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
w.swig.org/
When you already have a C header file, SWIG creates a Python module out
of it. In many cases this is sufficient to get a runnable interface, but
sometimes you need to add additional functions (like initialisation
functions) to your module to make it usable from Python.
Christia
Am 16.11.17 um 02:45 schrieb Lawrence D’Oliveiro:
From <https://github.com/ldo/pyfenv>:
def raıse(self) :
"raises this exception."
libm.feraiseexcept(self.mask)
#end raıse
raiise = raıse # if you prefer
you do this to annoy people?
what good would that be for an IT standard, if the identifiers were
written in different languages?
Christian
--
https://mail.python.org/mailman/listinfo/python-list
Same with me, except that I tried to install Python 3.6.3. Unchecking "Install
launcher for all users" helped, however.
--
https://mail.python.org/mailman/listinfo/python-list
rom txt file", file = txt)
Christian
--
https://mail.python.org/mailman/listinfo/python-list
alternate stream? Both are normally
invisible and determine a default application as well as a number of
programs which can open/edit the file.
The only thing I can see from your description, apparently it was
possible to change the default for an individual file ("Open this file
always
[dot] geek [dot] nz
Best, Paul
Christian
--
https://mail.python.org/mailman/listinfo/python-list
if (isinstanceof(base, *input)) { return (T*)input; }
else { return nullptr; }
}
How that works (particularly the "isinstanceof") is not the business of
the programmer - it is sufficient to know that the compiler somewhere
stores this information for every object.
problems with modern
software? I'm using Thunderbird over NNTP, and this shows up as graphics
to me:
🐍 💻
(a snake and a computer) Unless this message is blocked at the NNTP-List
boundary, it should show the same on any recent mail reader.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
al drawing code
looks quite similar. And it is trivial to add a button or other widgets,
as shown above.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
that there are
some variants which can give you the split point of the cycle, too.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
Am 14.01.18 um 22:04 schrieb Christian Gollwitzer:
Am 14.01.18 um 09:30 schrieb Frank Millman:
I need to detect when a 'cycle' occurs - when a path loops back on
itself and revisits a node previously visited. I have figured out a
way to do this, but I have a problem.
I don'
't see an error here, it only fails for me because the functions
"get_next_item" and "process_item" are not defined. Maybe the
tabs/spaces were mixed in your original input?
Christian
--
https://mail.python.org/mailman/listinfo/python-list
cl/Tk developer community is extremely small. The new text
widget was a big fuss last year, but I haven't heard anything about it
since almost a year :(
Christian
--
https://mail.python.org/mailman/listinfo/python-list
some extremely convoluted
thing ("IO monads") had to be erected to make the nicely mathematical
"pure" world interface with the dirty reality out there.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
Am 20.02.18 um 14:58 schrieb Chris Angelico:
Okay. Now create a constraint on a name in C++ such that it can only
accept integers representing A.D. years which, on the Gregorian
calendar, are leap years. (Using a dedicated integer-like type is
permitted.) It must accept all multiples of four, exc
major OS:
http://www.pyinstaller.org/
Christian
--
https://mail.python.org/mailman/listinfo/python-list
list should look like one of the 2 lists:
1. [1a, 1b, 1c, 2a, 2b, 2c, 3a, 3b, 3c
Look up list comprehensions.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
ees of quality to be compared.
It is a field of research and the generator shown by Bart is one of the
better generators constructed by an expert in the field.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
into Python is by means of a
Numpy Array. In order to do that, you need to include arrayobject.h and
then use PyArray_SimpleNew to create an array of numbers as a Python
object which you can return
https://numpy.org/devdocs/reference/c-api/array.html#c.PyArray_SimpleNew
Christian
ge compression" if you want to
understand it in detail.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
tasks like this they
are made and working well.
^ is "starts with"
\d is any digit
\s is any space
+ is at least one
* is nothing or one of
Christian
--
https://mail.python.org/mailman/listinfo/python-list
Am 07.06.22 um 23:01 schrieb Christian Gollwitzer:
In [3]: re.sub(r'^\d+\s*', '', s) Out[3]: 'Trinket'
that RE does match what you intended to do, but not exactly what you
wrote in the OP. that would be '^\d\d.' start with exactly two digits
follow
s
(A|B)\d-
As long as one digit is enough. What is your goal, to extract these
numbers or to strip them? Regexes can do both relatively easily.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
become quite ugly if you avoid REs or any other pattern matching tools.
This is also the main reason I suggested REs initially - often if you
see other patterns in the data, you can easily adapt a RE solution,
whereas you'll have to write the thing from ground up anew if you do it
manually.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
articles don't seem to be any better.
To me, this sentence is so badly cobbled together that it could be the
output of a KI of some sort (GPT-3) trying to summarize stuff from the
web. It doesn't make any sense at all on a semantic level.
Christian
--
https://mail.python.
fedora is free as well.
Fedora is an excellent choice for Python users. Fedora 36 already comes
with Python 3.11.0b5 in its main repository. In fact you have Python
2.7, 3.5-3.11, PyPy 2.7, PyPy 3.7-3.9, and MicroPython at your fingertips.
Christian
--
https://mail.python.org/mailman/listinfo
from Cython.Build. So maybe just deleting these
two lines and it might work?
Christian
--
https://mail.python.org/mailman/listinfo/python-list
uired, and that the whole purpose of the
/usr/bin/env thing is to search the path (because it is universally
installed in /usr/bin) and to possibly set other environment variables
Christian
--
https://mail.python.org/mailman/listinfo/python-list
(2018,12,31);
date = datevec(dates);
ind_mjja=find(date(:,2)>=5 & date(:,2)<=8);% May to Aug (May(31)+ June(30)+
July(31)+ August(31)= 123 days)
data_mjja=precp(:,ind_mjja);
data_mjja_res=reshape(data_mjja,14000,123,38);
which part do you have trouble with?
Christia
Am 08.11.22 um 09:01 schrieb Dioumacor FAYE:
From datenum to data_mjja=precp(:,ind_mjja);
I think the code filters data based on calendar dates. I'd guess that
you can do that most easily with pandas.
https://pandas.pydata.org/docs/user_guide/timeseries.html
Christian
Le l
ste:Abschlussmeeting chris$ ipython
Python 3.8.8 (default, Apr 13 2021, 12:59:45)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.22.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: x = { "y": "z" }
In [2]: s = "-> {x[y]}"
In [3]: print(s.format(x = x))
-> z
In [4]:
Christian
--
https://mail.python.org/mailman/listinfo/python-list
Am 28.01.23 um 02:56 schrieb Thomas Passin:
On 1/27/2023 5:10 PM, Christian Gollwitzer wrote:
Am 27.01.23 um 21:43 schrieb Johannes Bauer:
I don't understand why you fully ignore literally the FIRST example I
gave in my original post and angrily claim that you solution works
when it doe
ion will be required
to find it.
OK, so if you want to use an RE for splitting, can you not use
re.split() ? It basically works like the built-in splitting in AWK
>>> s='alphaAbetaBgamma'
>>> import re
>>> re.split(r'A|B|C', s)
['alp
easy support for it any more in recent browsers. Therefore it
would be difficult to post this to the internet, unless you invest in
some JS programming. In case you want to run this on your local
computer, as opposed to in the browser, you can check out Python game
engines.
Text (for multiline formatted text entry), Canvas (for
2D drawings), and Toplevel (for new windows/ popups etc.)
Christian
--
https://mail.python.org/mailman/listinfo/python-list
ps://medium.com/@yon.goldschmidt/running-python-in-the-linux-kernel-7cbcbd44503c
http://www.kplugs.org/
Christian
--
https://mail.python.org/mailman/listinfo/python-list
to a frame with wm_forget(), after which you can simply pack
it into another frame. The second one is configuring a frame as a
container, which allows to even embed a window from a foreign
application. I'm not sure this works on all platforms, though.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
s,
For thatm you can run radicale:
https://radicale.org/3.0.html
A Python-based calendar server. Then upload your calendars there from
Thunderbird and download them from Outlook.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
On 11/02/2021 03.51, James Lu wrote:
> Directly removing the Global Interpreter Lock (GIL) would break a lot
> of libraries that implicitly assume it is there. What if Python had
> "realms" that each had separate GILs?
>
> The "realms" (not sure if "subinterpreter" is the correct term here)
> coul
xpect to have a usable product soon.
Best regards,
Christian
[*] https://github.com/i42output/neoGFX
--
https://mail.python.org/mailman/listinfo/python-list
Am 14.02.21 um 11:12 schrieb Paul Rubin:
Christian Gollwitzer writes:
He wants that neoGFX is scriptable in Python, but instead of linking
with CPython, he will write his own Python implementation instead,
because CPython is slow/not clean/ whatever. He doesn't seem to
understand that th
of your compiler,
Here is the git repo:
https://github.com/i42output/neos
under languages/ you'll find different schema files.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
(e.g. Python), and therefore is "complex".
Christian
--
https://mail.python.org/mailman/listinfo/python-list
impressive that you
can write actual useful code with such a minimalist language (infix
math? Pure bloat!). OTOH it feels like "assembly" compared to more
evolved functional languages like, e.g. Haskell.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
Was Guido not aware of Tcl, or did he not think that it is a contender
in the same area?
Christian
[1] "Python, an extensible interpreted programming language [...] can be
used instead of shell, Awk or Perl scripts, to write prototypes of real
applications, or as an extens
te the Tcl that is used by Python directly, you may also do
something like
root = Tk()
root.eval('Here comes the Tcl code')
root.mainloop()
Can you also find out what version of Tcl/Tk you are using? Try
root.eval('info patchlevel')
Christian
--
https://mail.pyth
alled along
with Python on Windows), or something very different?
Christian
--
https://mail.python.org/mailman/listinfo/python-list
Am 26.02.21 um 06:15 schrieb John O'Hagan:
On Thu, 25 Feb 2021 21:57:19 +0100
Christian Gollwitzer wrote:
I think it is not yet clear, if this is a bug in Tkinter or in
Tcl/Tk, the underlying scripting language. It might also be platform
dependent. Are you on Windows? Here is an equivalen
time.
Maybe focussed to a single language or two, but not "universal" in any
sense.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
uitable to title-case a string, not even in English.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
? CPython requires C99
since 3.6,
https://docs.python.org/3/whatsnew/3.6.html#build-and-c-api-changes
Christian
--
https://mail.python.org/mailman/listinfo/python-list
parsing language, or even just handcoded Python is
much more maintainable.
Christian
PS: Exercise - handle lines commented out with a '#', i.e. skip those.
In awk:
gawk '!/^\s*#/ {sum += $2 } END {print sum}'
--
https://mail.python.org/mailman/listinfo/python-list
other
> system entirely), since "database" is more getent terminology.
>
> In any case, I think 'pwd' is hiding its light under a bushel a bit
> here.
Please open a documentation bug :)
The pwd and grp module use the libc API to get users from the local
account database. On Linux and glibc the account database is handled by
NSS and nsswitch.conf.
By the way I recommend that you use SSSD instead of talking to LDAP
directly. You'll have a much more pleasant experience.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
>
>
> a) your reverse proxy must be colocated with the service it fronts on the
> same machine;
> b) your network infrastructure transparently encrypts traffic between your
> proxy and the service; or
> c) your proxy must negotiate its own TLS connection(s) with the service.
>
Paul
Thanks. I'm cu
backslash. Try print(s).
It would be different with a raw string
s=r"""42 not\
in [42]"""
Christian
--
https://mail.python.org/mailman/listinfo/python-list
s I recall. Needless to say, we didn't use an assembler
either. We just wrote raw opcodes and their arguments on paper. This was in
the late 70s.)
Pure luxury! https://xkcd.com/378/
Christian
--
https://mail.python.org/mailman/listinfo/python-list
gt; 3
Here, the "l" is not changed. The reason is that the statement "a=5"
does NOT modify the object in a, but instead creates a new one and binds
it to a. l still points to the old one. Whereas a.append() tells the
object pointed to by a to change.
Christian
--
]: def foo():
...: return [1,2,3]
...:
In [2]: def bar():
...: return []
...:
In [3]: a=[]
In [4]: a += foo()
In [5]: a
Out[5]: [1, 2, 3]
In [6]: a += bar()
In [7]: a
Out[7]: [1, 2, 3]
Christian
--
https://mail.python.org/mailman/listinfo/python-list
ink doesn't
seem to support that idea:
https://stackoverflow.com/questions/61168210/is-there-any-way-to-use-tkinter-with-google-colaboratory
Christian
--
https://mail.python.org/mailman/listinfo/python-list
import A as B" does not define A. That's a feature, not a bug.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
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
Am 19.06.21 um 07:16 schrieb Jach Feng:
Christian Gollwitzer 在 2021年6月19日 星期六下午12:27:54 [UTC+8] 的信中寫道:
Am 19.06.21 um 05:59 schrieb Jach Feng:
import tkinter as Tk
Tk
from tkinter import *
Tk
tkinter
Traceback (most recent call last):
File "", line 1, in
NameError: name
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
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
quite a few open source projects over the years, and that's a lot of
> years! I even have a small credit in the 'bible' for the Kermit file
> transfer protocol, remember that?)
PyPI used to have a search API. The XML-RPC endpoints were disabled last
year due to flooding. Our infrastructure could not cope with abusive
queries. You can read the log of events at https://status.python.org/
Christian
--
https://mail.python.org/mailman/listinfo/python-list
achieve this ;)
This kind of interface is usually done with the "curses"-library. There
is a Python version of it, see e.g. here
https://docs.python.org/3/howto/curses.html
Christian
--
https://mail.python.org/mailman/listinfo/python-list
*
Pretty harsh, isn't it? He gave a concise example of the same inaccuracy
right afterwards.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
algorithm and other alternatives:
https://en.wikipedia.org/wiki/Kahan_summation_algorithm
Christian
--
https://mail.python.org/mailman/listinfo/python-list
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
Am 04.09.21 um 14:48 schrieb Hope Rouselle:
Christian Gollwitzer writes:
Am 02.09.21 um 15:51 schrieb Hope Rouselle:
Just sharing a case of floating-point numbers. Nothing needed to be
solved or to be figured out. Just bringing up conversation.
(*) An introduction to me
I don't under
a CSV table. That definitely isn't what a sane
person would understand as "support".
Christian
--
https://mail.python.org/mailman/listinfo/python-list
uld still work. Second, the
problem is not in the code that you posted. POssibly in the definition
of "Dataset". Maybe the netCDF-File contains boolean values and the
package you use to read it should be updated?
Christian
--
https://mail.python.org/mailman/listinfo/python-list
throws the list
away, while the second version only keeps the running sum in memory. How
about a generator expression instead, i.e.
sum((a * b for a, b in zip(seq1, seq2)))
(untested) ?
Christian
--
https://mail.python.org/mailman/listinfo/python-list
fastest AND clearest with
numpy.dot(seq1, seq2)
- in case that the sequence consists of floats and, in the best case, is
already stored in a numpy array. Then you cannot beat this with Python
code.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
how to do it: https://facebook.com/
Christian
--
https://mail.python.org/mailman/listinfo/python-list
(x:xs) = qsort [a | a <- xs, a < x]
++ [x] ++
qsort [b | b <- xs, b >= x]
The Haskell version is a bit clearer IMHO due to the pattern matching,
but that results in a 2 liner :)
Christian
--
https://mail.python.org/mailman/listinfo/python-list
what was the expectation?
Christian
--
https://mail.python.org/mailman/listinfo/python-list
201 - 300 of 1986 matches
Mail list logo