ts, or the big buildings at harbours used to store
goods, but never a shop.
A room where you store things for later use is a quite good description
for computer memory, isn't it?
Christian
--
https://mail.python.org/mailman/listinfo/python-list
.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
:
https://groups.google.com/forum/#!topic/comp.lang.python/70D5yVj7mIY
Christian
--
https://mail.python.org/mailman/listinfo/python-list
10^30
11001001001011001001110011010100011001110100111011001010\
0100
sqrt(10^30)
1110001101011010100100110001101000
Still, the floating point arithmetic should round to the correct answer
if both are converted to decimal.
Christian
--
https://mail.python.org/mailman/listinfo/p
within anaconda. Also read this thread:
https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/Dr8xFdKbA20
Christian
--
https://mail.python.org/mailman/listinfo/python-list
overflow is different: It means that the program allocates a fixed-size
buffer on the stack, which overflows and writes into the return
addresses / local variables of functions higher up the callchain. The
basic problem here is, that the C programmer was too lazy to get the
memory from the heap.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
(i.e. the second line in the
above code). It should store a reference the Python image object inside
the label object. This is akin to a "dangling pointer" in C. It would
just be some work to replicate this for all widgets in Tk, there are
buttons etc. but in essence I think it would
for yourself here:
http://www.math.ucsd.edu/~crypto/java/ENTROPY/
Christian
--
https://mail.python.org/mailman/listinfo/python-list
ed to define __setitem__ and __getitem__ in your class which
translates between the SQL call and the Python code.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
her
common way to express this is something like
3.42(3) which means 3.42 +/- 0.03
Note, however, that in current SI units the speed of light is known exactly:
c = 299,792,458 m/s
There is no error! This is possible because the unit metre is defined by
this value from the unit s
them.
That’s why you need two separate
insertion commands, insert-before and insert-after.
I rarely do "a" because pushing "i" and then cursor-right does the same
in vim, even in the text mode variant you can move the cursor after the
last character.
Christian
-
Am 19.06.16 um 09:34 schrieb Lawrence D’Oliveiro:
On Sunday, June 19, 2016 at 7:13:26 PM UTC+12, Christian Gollwitzer wrote:
Am 19.06.16 um 02:12 schrieb Lawrence D’Oliveiro:
But not vi/vim. It only lets you place your cursor *on* a character,
not *in-between* characters.
This is true if
ite a bytestream which has an
utf-8 interpretation in accordance to the display.
In any case, I'd suggest to install macvim on the Mac, instead of using
the Apple-provided vim, because of it's GUI windows and overall better
integration (file types, copy/paste etc.)
Chr
e elvis or busybox, but unless you
are building a minimalist POSIX system the most viable option would be
to install vim. So practically every desktop Linux distro ships with vim.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
e actions to perform usual editing tasks.
Leaving insert mode is only necessary to run a command.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
Am 20.06.16 um 15:48 schrieb Rustom Mody:
On Monday, June 20, 2016 at 7:06:57 PM UTC+5:30, Christian Gollwitzer wrote:
Am 20.06.16 um 15:26 schrieb Random832:
The point is that in vim you
can't position the normal-mode cursor in such a way that inserted
characters are inserted at the e
on .NET)
http://parrot.org/ (Python on the Perl-VM)
http://www.jython.org/ (Python on the JVM)
All of those projects promise a seamless integration of several
languages in a single VM. ALl of them have failed in the sense that the
languages have not converged onto that platform.
Christ
rst, bind a Configure event to the canvas
canvas.bind('', callback)
The callback functino now gets called when the canvas needs to be
redrawn. In that callback function, you get the new width and height
from the event object. Resize the image accordingly (using a PIL function
Comparing
False to either False "or" True? That is not the case.
"or" is an operator. "False or True" is *computed* and gives True, which
is then compared to False by "==". Python works in these steps:
1) False == (False or True)
2) False == (True)
3) Fa
Am 22.06.16 um 19:42 schrieb Pierre-Alain Dorange:
Christian Gollwitzer wrote:
Perhaps your assumption is wrong. Maybe the canvas itself *is* resized,
so the white space you see around the image is the background of the
canvas. To test this easily, set a strong color for the background
Am 22.06.16 um 22:53 schrieb Pierre-Alain Dorange:
Christian Gollwitzer wrote:
If you do not see the background, then indeed the canvas is not resized,
which means the gridding options are wrong. Looking at your code, I see
this:
self.map.grid(row=1,column=1,rowspan=4,columnspan=2,padx=2,pady
Am 22.06.16 um 23:18 schrieb Zachary Ware:
On Wed, Jun 22, 2016 at 4:05 PM, Christian Gollwitzer wrote:
BTW, the Tkinter wrapper is a bit clumsy for this option. In the original
Tk, the sticky option is just a string. You can still pass that and do
sticky='nsew'
instead of
types. But that’s one of the few warts in the design of Python...
Wart?? I *strongly* disagree. I find it one of the strengths of
Python, it enhances Python's expressiveness. Of course, everyone is
entitled to their own opinion...and this is mine.
https://xkcd.com/1172/
Chri
just create an account, create a repo,
"git pull" and start working. Your incremental changes will be updated
with each "git push".
Christian
--
https://mail.python.org/mailman/listinfo/python-list
hould be a more efficient algorithm by looking up the nearest
index from X,Y,Z by index arithmetics. Or maybe even reshaping it into a
3D-array.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
perations to be performed by humans. For
automation, you need a function-based scripting API and a command
line.
Yes and no. Sometimes GUIs export an API which is just not obvious to
the user, sometimes they have an internal structure which can be exploited.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
Am 01.07.16 um 03:38 schrieb Ben Finney:
Christian Gollwitzer writes:
The best place these days to publish software is on github.
For what value of “best”?
The question was about visibility of a project for a single beginner
developer.
If one wants to avoid vendor lock-in, Github is
Am 01.07.16 um 01:16 schrieb Random832:
On Thu, Jun 30, 2016, at 19:06, Lawrence D’Oliveiro wrote:
On Friday, July 1, 2016 at 1:09:31 AM UTC+12, Christian Gollwitzer wrote:
Github makes that extremely easy, just create an account, create a repo,
"git pull" and start working. Your i
Am 01.07.16 um 12:26 schrieb Archana Sonavane:
Hello Everyone,
I am doing python code by using API.
My first API giving fields - Itemid, clock and value
second API giving fields - Itemid, key, units and delay
using for loops for both API.
Could you please tell me how to compare both id by usi
Am 02.07.16 um 05:16 schrieb Lawrence D’Oliveiro:
On Friday, July 1, 2016 at 4:59:11 PM UTC+12, Christian Gollwitzer wrote:
Yes, simulating mouse clicks with
fixed coordinates etc. is prone to such failure, but there are better
methods. These mouse clicks and keyboard events usually trigger a
Am 03.07.16 um 13:01 schrieb Marko Rauhamaa:
Alain Ketterlin :
It would be very confusing to have a variable named ∇f, as confusing
as naming a variable a+b or √x.
Scheme allows *any* characters whatsoever in identifiers.
Parentheses?
Christian
--
https://mail.python.org/mailman
Am 03.07.16 um 13:22 schrieb Marko Rauhamaa:
Christian Gollwitzer :
Am 03.07.16 um 13:01 schrieb Marko Rauhamaa:
Alain Ketterlin :
It would be very confusing to have a variable named ∇f, as confusing
as naming a variable a+b or √x.
Scheme allows *any* characters whatsoever in identifiers
On 2016-07-04 17:48, Marco Buttu wrote:
> Hi all,
>
> if I open a file in text mode, do you know why file.seek() returns the
> number of bytes, and file.tell() takes the number of bytes? I was
> expecting the number of characters, like write() does:
Your expectations are not correct. tell() and s
have that question right, because it simply gives a
TypeError. You can't add an integer to a list.
D'oh!
Try this instead:
t = ([0],)
t[0] += [1]
and after that, try:
>>> a=[0]
>>> t=(a,)
>>> a+=[1]
Christian
--
https://mail.python.org/mailman/listinfo/python-list
hould immediately spit out an error in case that
numpy accesses deleted memory.
Of course debug information should be enabled when compiling the .so for
more useful output, and it could be helpful to have it for numpy/python,
too, but that's not a requirement.
Christia
Am 27.07.16 um 03:15 schrieb Larry Martell:
On Tue, Jul 26, 2016 at 8:49 PM, Tom Brown wrote:
I used pyinstaller quite a bit 3 years ago. I could brush off the cobwebs
and see if I can help if you have not solved it already.
What is the issue you are having?
If I import the requests module,
7;, '', cb_canvasButtonPress)
canvas.tag_bind('grmmpf', '', cb_canvasButtonRelease)
where in the first function you change the color of the button, say
canvas.tag_configure('grmmpf', fill='blue') # untested
and in the second you reset the color and execute the action.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
oads/thank-you?dl=http://downloads.activestate.com/ActiveTcl/releases/8.6.4.1/ActiveTcl8.6.4.1.299124-macosx10.5-i386-x86_64-threaded.dmg
Christian
--
https://mail.python.org/mailman/listinfo/python-list
i/bigfloat/
?
- Convenient syntax for a few array/list manipulations
Huh? Slices and list comprehensions go a long way. What syntax can you
imagine that goes beyond that?
Christian
--
https://mail.python.org/mailman/listinfo/python-list
is zero change, if it passes
Tcl_UniChar, then these must be convrted to UTF-16.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
end of the script.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
t
output number from the Mersenne Twister for those 624 outputs. If
however you create a list:
[random.randrange(10) for i in range(624)]
I don't think you can predict what follows.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
their homework and provide wrappers to the
most common Tk extensions.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
Perhaps the "secret" is *not* do integer division with negative numbers?
--
https://mail.python.org/mailman/listinfo/python-list
What is simplest way to make both those
prints give same values? Any slicker way
than an if statement?
--
https://mail.python.org/mailman/listinfo/python-list
Why are the following two similar prints slightly different and how fix?
>>> x = 0x739ad43ed636
>>> print(x + (-x) // 2048)
127046758190683
>>> print(x - x // 2048)
127046758190684
I'm working in an area where such deviations matter. It would nice to
understand what is happening.
Any help
like Java?
On Sun, Dec 30, 2018 at 11:24 PM Cameron Simpson wrote:
> On 30Dec2018 21:14, Christian Seberino wrote:
> >What is simplest way to make both those
> >prints give same values? Any slicker way
> >than an if statement?
>
> If your post had an attachment, be
Thanks to all who helped. As was previously pointed out, many other languages
use truncation rather than rounding for // division.
Getting the behavior you want may be as easy as replacing // with the int()
function
>>> x = 9 ; y = 2
>>> x // y, -x // y, (-x) // y
(4, -5, -5)
>>> int(x /
ther language will appear which has yet another different thing
Basically you'll need to rewrite the whole thing when going to a
completely different language.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
Am 04.02.19 um 04:11 schrieb DL Neil: > On 4/02/19 10:00 AM, Christian
Gollwitzer wrote:
Am 03.02.19 um 09:32 schrieb DL Neil:
Now back to ordinal dates - the "st", "th", etc suffixes only work in
English. You'd need another list (but no great coding complexity) t
Am 04.02.19 um 09:18 schrieb Christian Gollwitzer:
I think English is quite "unique" with writing out the ending of the
ordinals attached to arabic numerals.
Of course, there is a Wikipedia page about it:
https://en.wikipedia.org/wiki/Ordinal_indicator
So I was wro
o such thing as title
case. Only very rarely ALL CAPS are used.
Have a good sleep ;)
Christian
--
https://mail.python.org/mailman/listinfo/python-list
s is avery bad thing.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
lp on built-in function sin in module math:
sin(...)
sin(x)
Return the sine of x (measured in radians).
The help is actually not written out to the terminal but, displayed in
the pager (less), and the first sin(...) is typeset in boldface.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
Why this curl command works in shell but NOT when I use subprocess as in
below?.
UL_URL = "https://auphonic.com/api/simple/productions.json";
ul_output = subprocess.getoutput(["curl",
"-X",
"POST",
Nevermind...appears to get arguments like this you need to use subprocess.run
rather than subprocess.getoutput (with capture_output = True).
cs
--
https://mail.python.org/mailman/listinfo/python-list
documentation:
https://www.tcl.tk/man/tcl8.6/TkCmd/canvas.htm#M155
https://www.tcl.tk/man/tcl8.6/TkCmd/canvas.htm#M150
Christian
--
https://mail.python.org/mailman/listinfo/python-list
Am 06.05.19 um 07:23 schrieb Britto .:
What are the frameworks available for developing a CAD application with
Python?
For 3D visualization VTK is your best bet. It can efficiently handle
large data sets.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
another problem;
make sure that you compile tkinter against the same versiof of Python
that you use it with.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
er defined function /could/ be printed as a lambda,
so expecting:
def test(x):
return 2*x
print(repr(test))
-> lambda x : 2*x
would be half-reasonable, it is impossible to print out the C source
code of the built-in print function, unless one builds a JIT C compiler
into Python.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
re features to the stdlib, see
https://bugs.python.org/issue17305
By the way, I'm working on removing some dead battieres since last year,
see proto PEP
https://github.com/tiran/peps/blob/oldbatteries/pep-.rst and LWN
article https://lwn.net/Articles/755229/
Christian
--
https:/
ure out which files need to be processed and therefore
continue a stopped job.
Maybe rewriting all of this from scratch in Python is not worth it.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
compiled in the
same way, which you pay for by a factor of 100 in execution speed.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
I have a third party GUI that manages some hardware.
I want to control the hardware from a Python script.
This seems to mean I need to somehow have Python code
that imitates a human doing the necessary
actions on the GUI (selecting menu options, pressing buttons, etc.)
Is this possible / e
Thanks for all the help. I'll definitely try to bypass the GUI first if
possible. This is on Windows 7 so maybe AutoIt will do the trick if can't
avoid the GUI. Thanks again everyone.
--
https://mail.python.org/mailman/listinfo/python-list
> Out of curiosity, what hardware?
Texas Instruments ADS1675REF card
--
https://mail.python.org/mailman/listinfo/python-list
On Friday, June 14, 2019 at 1:42:17 PM UTC-5, Rob Gaddi wrote:
> Condolences. TI is a world-leader in giving every eval board its own
> complicated, proprietary digital interface, then not documenting it
> because "You can just use the provided software" that hasn't been
> updated since 2001 an
ntation you
are using.
Best regards,
Christian
--
https://mail.python.org/mailman/listinfo/python-list
Am 18.07.19 um 16:18 schrieb Jesse Ibarra:
On Wednesday, July 17, 2019 at 2:20:51 PM UTC-6, Christian Gollwitzer wrote:
What level of integration do you want to achieve? Do you want
a) to call Python functions from Smalltalk
b) call Smalltalk functions from Python
c) pass callbacks around, e.g
Am 19.07.19 um 16:26 schrieb Jesse Ibarra:
On Friday, July 19, 2019 at 8:17:43 AM UTC-6, Chris Angelico wrote:
On Sat, Jul 20, 2019 at 12:16 AM Jesse Ibarra
wrote:
On Thursday, July 18, 2019 at 2:01:39 PM UTC-6, Chris Angelico wrote:
On Fri, Jul 19, 2019 at 5:51 AM Christian Gollwitzer
about the core language, but these system tools depend on
packages, sometimes specialist packages, which might not be available in
your venv.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
Python is my goto main language. However, sometimes I'm tempted to
play with a Lisp like language just for fun.
Clojure looks pretty solid but its syntax is different than Python's.
Since Lisp's make it so easy to modify the language, what about the idea
of developing a few macros to make a modi
> I had to read this twice. It confused the hell out of me.
Lol. Certainly didn't mean to be confusing! Hy bring Lisp to Python. I was
more interested in making a Lisp that had trivial similarities to Python like
using some of the same keywords.
A related interested of mine is converting P
> Python vs Clojure's syntax difference is superficial compared to their
> other differences, like the Clojure's immutable data structures and
> having to deal with the JVM.
Well there's ClojureScript to run this hypothetical Pythonic Lisp in the
browser.
> I also don't think it's really practic
.
https://en.wikipedia.org/wiki/Quine_(computing)
Christian
--
https://mail.python.org/mailman/listinfo/python-list
i.e. remove the
asyncio.get_event_loop().run_until_complete(main())
from the individual programs, and then you run a single event loop in
your main program. Something like
loop = asyncio.get_event_loop()
loop.run_until_complete(asyncio.gather(laserembeded.main(),
camerasembedded.main()))
Chr
er se - he used the word "import" incorrectly,
when he meant "run", because he abused "import lala" to run a Python
program.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
ative size". It's easy to
miss that it doesn't state just "size" for a reason.
A long is not int32_t. The actual size of long and unsigned long depend
on the ABI of your platform. The standard defined a long as *at least* 4
bytes. On Windows it's always a 32 bit da
ypo-squat packages in hope that
somebody uses the Linux distribution package name "python3-dateutil"
instead of the upstream name "python-dateutil" in requirements.txt
Christian
[1]
https://src.fedoraproject.org/rpms/python-dateutil/blob/master/f/python-dateutil.spec
--
https://mail.python.org/mailman/listinfo/python-list
ng support for these packages would not be that hard, but it must
be done by the Python community.
Christian
(X-post & Fup to clp)
--
https://mail.python.org/mailman/listinfo/python-list
year is the level of academic full-time jobs in Germany,
i.e. that would be 4-5 days per week, not per month.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
necessarily unique, if hash(a)=hash(b), it can
still be that a=/= b. Therefore, in a second step, a is compared to b if
the hashes match.
Therefore, you need a comparison operator which is compatible with the
hash function, i.e. if a==b, then hash(a) must be equal to hash(b).
Christian
--
https
display resolution can mess up your interface.
Always test that your windows act sensibly upon resizing.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
is system-dependent - or the newer things like flatpak and
snap. However the tarball is the thing that always works, even for me as
a user without root access.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
system package manager - but this means it is system-dependent - or the newer
things like flatpak and snap. However the tarball is the thing that always
works, even for me as a user without root access.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
system package manager - but this means it is system-dependent - or the newer
things like flatpak and snap. However the tarball is the thing that always
works, even for me as a user without root access.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
system package manager - but this means it is system-dependent - or the newer
things like flatpak and snap. However the tarball is the thing that always
works, even for me as a user without root access.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
ould like to work on this project, please let me know.
There is one obvious candidate who could work on this project. It's you.
Best regards,
Christian
--
https://mail.python.org/mailman/listinfo/python-list
e user can still
copy/paste the content, and that it can scroll if the string is very long.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
Hi Randall,
I assume you are asking about the Python programming language
(tkinter??). This group discusses the Tcl programming language, from
which Tk originates. See 2 answers below.
Xpost and Fup2 c.l.p
Christian
Am 22.03.20 um 00:59 schrieb Randall Wert:
I am trying to enhance a shell
tible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
>>> root=tkinter.Tk()
>>> root.eval('info patchlevel')
'8.5.9'
>&g
1
n.add(f1, text="Module1")
# repeat for your other "modules"
Christian
--
https://mail.python.org/mailman/listinfo/python-list
Am 04.04.20 um 22:31 schrieb Rich Shepard:
On Sat, 4 Apr 2020, Christian Gollwitzer wrote:
I'm not sure I fully understand it, because a "module" is not defined
in the language of tkinter.
Christian,
True, but it is in Python: a file ending in .py which, in this case,
cont
, GoogleDoc) and
Jupiter/IPython.
Did I make sense?
CSV is the most sensible option here. It is widely supported by
spreadsheets etc. and easily copy/pasteable.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
case where multiple functions access a common state. Usually it is best
to restrict the scope of a variable to the region of code where it
necessarily needs to be available.
Christian
--
https://mail.python.org/mailman/listinfo/python-list
I have some code I'd like to extend without modifying it.
I'm sure this is a common pattern. I wondered what the
options were for "extending without modifying (much)".
I'm aware one can import a module and add functions to decorators.
Are there other ways?
Thanks!
chris
--
https://mail.python
If you want to know, I'm trying to add metaprogramming (macros!) to a tiny Lisp
interpreter I wrote. I'm hesitant to mess with all that nice debugged code to
add this new stuff.
--
https://mail.python.org/mailman/listinfo/python-list
>
> a pattern like:
> if :
> elif :
>
>
Thanks. I really like this simple yet powerful suggestion you made. See
this...
import new_code
...
if foo:
new_code.do_new_stuff(..)
We can massively modify existing code by *ONLY* adding one import and a 2
line if snippet!!!
Very nice!
cs
-
Paul
Thanks! I'm glad there is theory about my concern. I knew
I wasn't the only one with that question.
cs
> > https://en.wikipedia.org/wiki/Open%E2%80%93closed_principle
>
> Also:
>
> https://en.wikipedia.org/wiki/Expression_problem
--
https://mail.python.org/mailman/listinfo/python-lis
iour, which was switched of because of Catalina last August
(this commit)
https://core.tcl-lang.org/tk/info/59b1d265c2444112
Christian
--
https://mail.python.org/mailman/listinfo/python-list
401 - 500 of 1986 matches
Mail list logo