Re: List of Functions

2016-03-28 Thread Christian Gollwitzer
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

Re: Re-using TCL code from python over network

2016-03-29 Thread Christian Gollwitzer
. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Serious error in int() function?

2016-04-14 Thread Christian Gollwitzer
: https://groups.google.com/forum/#!topic/comp.lang.python/70D5yVj7mIY Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Serious error in int() function?

2016-04-14 Thread Christian Gollwitzer
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

Re: scipy install error,need help its important

2016-04-17 Thread Christian Gollwitzer
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

Re: setrecursionlimit

2016-05-18 Thread Christian Gollwitzer
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

Re: Image loading problem

2016-05-22 Thread Christian Gollwitzer
(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

Re: Coding systems are political (was Exended ASCII and code pages)

2016-05-29 Thread Christian Gollwitzer
for yourself here: http://www.math.ucsd.edu/~crypto/java/ENTROPY/ Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Tie dictionary to database table?

2016-06-10 Thread Christian Gollwitzer
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

Re: value of pi and 22/7

2016-06-18 Thread Christian Gollwitzer
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

Re: best text editor for programming Python on a Mac

2016-06-19 Thread Christian Gollwitzer
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 -

Re: best text editor for programming Python on a Mac

2016-06-19 Thread Christian Gollwitzer
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

Re: best text editor for programming Python on a Mac

2016-06-19 Thread Christian Gollwitzer
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

Re: best text editor for programming Python on a Mac

2016-06-20 Thread Christian Gollwitzer
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

Re: best text editor for programming Python on a Mac

2016-06-20 Thread Christian Gollwitzer
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

Re: best text editor for programming Python on a Mac

2016-06-20 Thread Christian Gollwitzer
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

Re: Request for opinions: A cross language development tool

2016-06-21 Thread Christian Gollwitzer
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

Re: [tkinter] widget size adjustment

2016-06-21 Thread Christian Gollwitzer
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

Re: Operator Precedence/Boolean Logic

2016-06-21 Thread Christian Gollwitzer
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

Re: [tkinter] widget size adjustment

2016-06-22 Thread Christian Gollwitzer
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

Re: [tkinter] widget size adjustment

2016-06-22 Thread Christian Gollwitzer
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

Re: [tkinter] widget size adjustment

2016-06-22 Thread Christian Gollwitzer
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

Re: Operator Precedence/Boolean Logic

2016-06-23 Thread Christian Gollwitzer
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

Re: Were is a great place to Share your finished projects?

2016-06-30 Thread Christian Gollwitzer
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

Re: fastest way to read a text file in to a numpy array

2016-06-30 Thread Christian Gollwitzer
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

Re: Controlling the Mac OSX GUI via Python?

2016-06-30 Thread Christian Gollwitzer
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

Re: Were is a great place to Share your finished projects?

2016-06-30 Thread Christian Gollwitzer
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

Re: Were is a great place to Share your finished projects?

2016-06-30 Thread Christian Gollwitzer
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

Re: Need help in python program

2016-07-01 Thread Christian Gollwitzer
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

Re: Controlling the Mac OSX GUI via Python?

2016-07-01 Thread Christian Gollwitzer
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

Re: Well, I finally ran into a Python Unicode problem, sort of

2016-07-03 Thread 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. Parentheses? Christian -- https://mail.python.org/mailman

Re: Well, I finally ran into a Python Unicode problem, sort of

2016-07-03 Thread Christian Gollwitzer
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

Re: file.seek() and file.tell() look inconsistent to me

2016-07-04 Thread Christian Heimes
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

Re: How well do you know Python?

2016-07-05 Thread Christian Gollwitzer
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

Re: NumPy frombuffer giving nonsense values when reading C float array on Windows

2016-07-26 Thread Christian Gollwitzer
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

Re: pyinstaller

2016-07-26 Thread Christian Gollwitzer
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,

Re: Is it possible to draw a BUTTON?

2016-07-28 Thread Christian Gollwitzer
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

Re: Tcl/Tk for Python 3.6.0a3 on Os X 10.9.5

2016-08-02 Thread Christian Gollwitzer
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

Re: Debugging (was Re: Why not allow empty code blocks?)

2016-08-02 Thread Christian Gollwitzer
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

Re: Tcl/Tk for Python 3.6.0a3 on Os X 10.9.5

2016-08-03 Thread Christian Gollwitzer
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

Re: Make sure you removed all debugging print statements error

2016-08-08 Thread Christian Gollwitzer
end of the script. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: on the prng behind random.random()

2018-11-20 Thread Christian Gollwitzer
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

Re: tkinter resizable text with grid

2018-12-06 Thread Christian Gollwitzer
their homework and provide wrappers to the most common Tk extensions. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about slight deviations when using integer division with large integers.

2018-12-30 Thread Christian Seberino
Perhaps the "secret" is *not* do integer division with negative numbers? -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about slight deviations when using integer division with large integers.

2018-12-30 Thread Christian Seberino
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

Question about slight deviations when using integer division with large integers.

2018-12-31 Thread Christian Seberino
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

Re: Question about slight deviations when using integer division with large integers.

2018-12-31 Thread Christian Seberino
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

Re: Question about slight deviations when using integer division with large integers.

2018-12-31 Thread Christian Seberino
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 /

Re: Implement C's Switch in Python 3

2019-02-03 Thread Christian Gollwitzer
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

Re: Implement C's Switch in Python 3 [OT languages]

2019-02-04 Thread Christian Gollwitzer
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

Re: Implement C's Switch in Python 3 [OT languages]

2019-02-04 Thread Christian Gollwitzer
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

Re: Implement C's Switch in Python 3 [OT languages]

2019-02-07 Thread Christian Gollwitzer
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

Re: The sum of ten numbers inserted from the user

2019-02-09 Thread Christian Gollwitzer
s is avery bad thing. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: The slash "/" as used in the documentation

2019-02-09 Thread Christian Gollwitzer
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 do subprocess.getoutput(["curl", .....]) ??

2019-02-16 Thread Christian Seberino
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",

Re: Why this curl command works in shell but NOT when I do subprocess.getoutput(["curl", .....]) ??

2019-02-16 Thread Christian Seberino
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

Re: What is a, b, c, and d in: rect1 = drawing.create_rectangle(a, b, c, d) and circle1 = drawing.create_oval(a, b, c, d)

2019-04-09 Thread Christian Gollwitzer
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

Re: CAD Application

2019-05-06 Thread Christian Gollwitzer
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

Re: Tkinter on Mac OS crashes python

2019-05-16 Thread Christian Gollwitzer
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

Re: repr = expression representation?

2019-05-17 Thread Christian Gollwitzer
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: Amber Brown: Batteries Included, But They're Leaking

2019-05-19 Thread Christian Heimes
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:/

Re: More CPUs doen't equal more speed

2019-05-24 Thread Christian Gollwitzer
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

Re: Why Python has no equivalent of JDBC of Java?

2019-05-26 Thread Christian Gollwitzer
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

How control a GUI for an unrelated application from a Python script?

2019-06-13 Thread Christian Seberino
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

Re: How control a GUI for an unrelated application from a Python script?

2019-06-14 Thread Christian Seberino
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

Re: How control a GUI for an unrelated application from a Python script?

2019-06-14 Thread Christian Seberino
> Out of curiosity, what hardware? Texas Instruments ADS1675REF card -- https://mail.python.org/mailman/listinfo/python-list

Re: How control a GUI for an unrelated application from a Python script?

2019-06-14 Thread Christian Seberino
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

Re: Embedding Python in C

2019-07-17 Thread Christian Gollwitzer
ntation you are using. Best regards, Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Embedding Python in C

2019-07-18 Thread Christian Gollwitzer
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

Re: Embedding Python in C

2019-07-19 Thread Christian Gollwitzer
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

Re: Proper shebang for python3

2019-07-21 Thread 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

What about idea of making a "Pythonic Lisp"...i.e. a Lisp that more closely resembles the syntax of Python?

2019-09-14 Thread Christian Seberino
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

Re: What about idea of making a "Pythonic Lisp"...i.e. a Lisp that more closely resembles the syntax of Python?

2019-09-15 Thread Christian Seberino
> 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

Re: What about idea of making a "Pythonic Lisp"...i.e. a Lisp that more closely resembles the syntax of Python?

2019-09-15 Thread Christian Seberino
> 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

Re: Funny code

2019-09-26 Thread Christian Gollwitzer
. https://en.wikipedia.org/wiki/Quine_(computing) Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Christian Gollwitzer
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

OT language barrier, was: How execute at least two python files at once when imported?

2019-11-07 Thread Christian Gollwitzer
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

Re: array and struct 64-bit Linux change in behavior Python 3.7 and 2.7

2019-12-02 Thread Christian Heimes
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

Re: Developers are advised to purge these malicious packages

2019-12-04 Thread Christian Heimes
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

Re: scrollable Frame object

2019-12-27 Thread Christian Gollwitzer
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

Re: PyInstaller needs Funding by your Company

2020-01-07 Thread Christian Gollwitzer
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

Re: Documentation of __hash__

2020-02-05 Thread Christian Gollwitzer
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

Re: Tkinter layout designer

2020-02-24 Thread Christian Gollwitzer
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

Re: Application setup like windows msi

2020-03-05 Thread Christian Gollwitzer
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

Re: Application setup like windows msi

2020-03-06 Thread Christian Gollwitzer
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

Re: Application setup like windows msi

2020-03-06 Thread Christian Gollwitzer
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

Re: Application setup like windows msi

2020-03-07 Thread Christian Gollwitzer
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

Re: Reduce waiting queue at supermarket from Corona with Python-Webapp

2020-03-17 Thread Christian Gollwitzer
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

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

2020-03-18 Thread Christian Gollwitzer
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

Re: Converting program from shell to tkinter

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

Re: Identifying tkinter version [ANSWERED]

2020-04-01 Thread Christian Gollwitzer
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

Re: Adding tkinter modules to notebook tabs

2020-04-04 Thread Christian Gollwitzer
1 n.add(f1, text="Module1") # repeat for your other "modules" Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Adding tkinter modules to notebook tabs

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

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

2020-04-06 Thread Christian Gollwitzer
, 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

Re: Function to avoid a global variable

2020-04-28 Thread Christian Gollwitzer
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

Techniques to extend code without modifying it? (besides modules and decorators)

2020-04-29 Thread Christian Seberino
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

Re: Techniques to extend code without modifying it? (besides modules and decorators)

2020-04-29 Thread Christian Seberino
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

Re: Techniques to extend code without modifying it? (besides modules and decorators)

2020-04-29 Thread Christian Seberino
> > 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 -

Re: Techniques to extend code without modifying it? (besides modules and decorators)

2020-05-01 Thread Christian Seberino
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

Re: SaveAs on macOS Catalina.

2020-05-08 Thread Christian Gollwitzer
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

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