Re: Removing matching items from a list?

2013-08-04 Thread Christian Gollwitzer
Hi Kevin, Am 04.08.13 02:38, schrieb kevin4f...@gmail.com: Sorry for the repeated messages. I have no idea why I have such a long time delay. My messages didn't appear until just now after a few minutes (thought I was having some issues). you are posting to newsgroups from the USENET. It is

Re: Adding new lines to word document using zipfile module within python 2.7?

2013-08-27 Thread Christian Gollwitzer
Am 27.08.13 22:45, schrieb accessnew...@gmail.com: Writing text to a word document (word 2007) using the zipfile module via python coding (python 2.7). Below if the section of code I am using to do this. I can't figure out what character I need to use to get it to add new lines to the zipfile.

Re: Applying 4x4 transformation to 3-element vector with numpy

2013-10-08 Thread Christian Gollwitzer
Dear John, Am 09.10.13 07:28, schrieb John Nagle: This is the basic transformation of 3D graphics. Take a 3D point, make it 4D by adding a 1 on the end, multiply by a transformation matrix to get a new 4-element vector, discard the last element. Is there some way to do that in numpy

Re: I am never going to complain about Python again

2013-10-10 Thread Christian Gollwitzer
Am 10.10.13 06:36, schrieb Steven D'Aprano: Just came across this little Javascript gem: ,,, == Array((null,'cool',false,NaN,4)); = evaluates as true http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array I swear, I am never going to complain about Python again. More of this fun

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-10 Thread Christian Gollwitzer
Am 10.10.13 18:54, schrieb Grant Edwards: On 2013-10-10, Chris Angelico ros...@gmail.com wrote: On Fri, Oct 11, 2013 at 1:12 AM, Grant Edwards invalid@invalid.invalid wrote: Nope. i is electical current (though it's more customary to use upper case). j is the square root of -1. and that

Re: Process pending Tk events from GObject main loop?

2013-10-11 Thread Christian Gollwitzer
Am 11.10.13 14:52, schrieb Skip Montanaro: I know I have things bassackwards, but trying to process Gtk events from Tkinter's main loop using after() isn't working. (I suspect our underlying C++ (ab)use of Gtk may require a Gtk main loop). I'd like to process Tk events periodically from a

Re: What version of glibc is Python using?

2013-10-12 Thread Christian Gollwitzer
Am 12.10.13 08:34, schrieb John Nagle: I'm trying to find out which version of glibc Python is using. I need a fix that went into glibc 2.10 back in 2009. (http://udrepper.livejournal.com/20948.html) So I try the recommended way to do this, on a CentOS server: /usr/local/bin/python2.7 Python

Re: What version of glibc is Python using?

2013-10-12 Thread Christian Gollwitzer
Am 12.10.13 09:20, schrieb Ned Deily: In article l3as90$5bk$1...@dont-email.me, John Nagle na...@animats.com wrote: [...] Why is the info from plaform.libc_ver() so bogus? The code is here: http://hg.python.org/cpython/file/2.7/Lib/platform.py#l141 Perhaps you could open an issue on the

Re: What version of glibc is Python using?

2013-10-12 Thread Christian Gollwitzer
Am 12.10.13 09:53, schrieb Christian Gollwitzer: Am 12.10.13 09:20, schrieb Ned Deily: In article l3as90$5bk$1...@dont-email.me, John Nagle na...@animats.com wrote: [...] Why is the info from plaform.libc_ver() so bogus? The code is here: http://hg.python.org/cpython/file/2.7/Lib

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-17 Thread Christian Gollwitzer
Am 17.10.13 09:23, schrieb Peter Cacioppi: Do you have a clean little example of polymorphism being mocked in a reasonable way with pure C? There are many nice object-based C projects floating around, but real polymorphism? I think you can't do it without some bizarre work-arounds, but I'd be

Re: Retrieving possible list for use in a subsequent INSERT

2013-10-31 Thread Christian Gollwitzer
Am 31.10.13 17:49, schrieb Nick the Gr33k: Στις 31/10/2013 1:19 μμ, ο/η Nick the Gr33k έγραψε: someone please that is aware of what's wrong? Your attitude. -- https://mail.python.org/mailman/listinfo/python-list

Re: Providing a Python wrapper to a C++ type.

2012-10-16 Thread Christian Gollwitzer
Am 16.10.12 18:42, schrieb Evan Driscoll: For instance, I used it to wrap the OS's opendir/readdir (FindFirstFile/FindNextFile) functions: I just wrote a bit of code using Cython's extensions, and I get a module I can import and use as normal. Well, but for an existing library in C++ possibly

Re: Fwd: system tray or notification area in python

2012-10-16 Thread Christian Gollwitzer
Am 16.10.12 22:39, schrieb Daniel Fetchinson: Hi folks, So I thought I would write a brand new stand alone system tray or notification area in python. I guess I need to use gtk bindings or some such but don't really know what my options are. Where would I start something like this? Any pointers

Re: Fwd: system tray or notification area in python

2012-10-17 Thread Christian Gollwitzer
Am 17.10.12 09:49, schrieb Daniel Fetchinson: So I thought I would write a brand new stand alone system tray or notification area in python. I guess I need to use gtk bindings or some such but don't really know what my options are. Where would I start something like this? Any pointers would be

Re: bit count or bit set Python3

2012-10-25 Thread Christian Gollwitzer
Am 25.10.12 16:47, schrieb Charles Hixson: In Python3 is there any good way to count the number of on bits in an integer (after an operation)? Alternatively, is there any VERY light-weight implementation of a bit set? I'd prefer to use integers, as I'm probably going to need thousands of

Re: only .exe

2012-11-24 Thread Christian Gollwitzer
Am 24.11.12 12:36, schrieb bakie: in the last question I try how to run py script with pycharm . thank dear bro ... and then I wanna have that program with .exe ( standalone installer ) . How can i do that ? I tried with two ways 1) py2exe 2) cx_freeze but I don't like that It has many file

Re: Importing by file name

2013-11-24 Thread Christian Gollwitzer
Am 24.11.13 04:41, schrieb Chris Angelico: As part of a post on python-ideas, I wanted to knock together a quick little script that imports a file based on its name, in the same way that the Python interpreter will happily take an absolute pathname for the main script. Is it imp.load_source()

Re: Access database - GUI - Python - I need architectural advice

2013-11-28 Thread Christian Gollwitzer
Am 28.11.13 07:51, schrieb Ben Finney: Chris Angelico ros...@gmail.com writes: On Thu, Nov 28, 2013 at 4:55 PM, jm.almeras jm.alme...@nospam.net wrote: 2) dimensionable and editable arrays of columns and rows like when you open a table under Access. I'm not aware of a widget in Tkinter

Re: PIL(Pillow) fails with PNG image

2013-12-05 Thread Christian Gollwitzer
Am 05.12.13 21:26, schrieb tastyminerals: Hi, I am getting an error when trying to use Pillow library to display image PNG on a Tkinter Button widget. Here is my code. |image= Image.open(os.path.join('icons','bulb.png')) # using PIL for png images self.correctGuessImage=

Re: [newbie] problem trying out simple non object oriented use of Tkinter

2013-12-06 Thread Christian Gollwitzer
Am 06.12.13 14:12, schrieb Jean Dubois: It works but it's not all clear to me. Can you tell me what label.bind(1, quit) is standing for? What's the 1 meaning? bind connects events sent to the label with a handler. The 1 is the event description; in this case, it means a click with the left

Re: [newbie] struggling wth tkinter

2013-12-08 Thread Christian Gollwitzer
Am 07.12.13 17:52, schrieb Jean Dubois: I'm trying to go through a tutorial on tkinter which has the code below as an example. The only thing I see when running it is a little popup with Click mouse here to quit which works as expected but always shows the following error-message. However the

Re: [newbie] trying socket as a replacement for nc

2013-12-12 Thread Christian Gollwitzer
Am 12.12.13 00:08, schrieb Jean Dubois: I have an ethernet-rs232 adapter which allows me to connect to a measurement instrument by means of netcat on a linux system. e.g. entering nc 10.128.59.63 7000 allows me to enter e.g. *IDN? after which I get an identification string of the measurement

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-16 Thread Christian Gollwitzer
Let the flame war begin! Am 16.12.13 17:10, schrieb Chris Angelico: Here's the Tcl procedure that I tweaked. This is from gitk; I find the word diff not all that useful, but a character diff at times is very useful. I haven't found a way to configure the word diff regex through gitk's options,

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-16 Thread Christian Gollwitzer
Am 16.12.13 18:04, schrieb Grant Edwards: On 2013-12-16, Chris Angelico ros...@gmail.com wrote: On Tue, Dec 17, 2013 at 3:46 AM, Grant Edwards invalid@invalid.invalid wrote: * The everything is a string view of the world is severly limiting if you're not just processing strings. I

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread Christian Gollwitzer
Am 17.12.13 06:37, schrieb Rick Johnson: On Sunday, December 15, 2013 11:01:53 AM UTC-6, Steven D'Aprano wrote: low-level language with some interface to Python. The main difference between this hypothetical Python GUI and Tcl is that Tcl is a Turing-complete interpreter which lives in it's own

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread Christian Gollwitzer
Am 16.12.13 23:40, schrieb Chris Angelico: On Tue, Dec 17, 2013 at 9:06 AM, Christian Gollwitzer aurio...@gmx.de wrote: Let the flame war begin! I'll try to avoid flamage :) :) So let's vigorously discuss about facts;) But my rule of thumb with bash scripts is: If it exceeds a page or two

Re: how to develop code using a mix of an existing python-program and console-commands

2013-12-18 Thread Christian Gollwitzer
Am 18.12.13 21:17, schrieb Jean Dubois: I have a python-program which I want to perform its task first, then switch to the python console to experiment with further commands, using what was already defined in the python-program. Excellent way to use/debug a scripting langugage. Use ipython,

Re: Why Python is like C++

2013-12-21 Thread Christian Gollwitzer
Am 21.12.13 09:06, schrieb Gregory Ewing: Michael Torrie wrote: Maybe BASIC's of the 70s. But Not QB. QuickBasic was a pretty impressive compiler in its day. Completely modern, structured language. I may have been thinking of GW-BASIC. There was definitely something that was pretty much an

Re: Using asyncio in event-driven network library

2013-12-25 Thread Christian Gollwitzer
Am 24.12.13 16:41, schrieb Tobias M.: On 23.12.2013 20:59, Terry Reedy wrote: What would be easiest for user-developers would be if someone were able to wrap a gui loop in a way to give it the needed interface, so the gui loop itself replaced and became the asyncio loop. That's a good idea,

Re: On radio buttons in tkinter

2014-01-04 Thread Christian Gollwitzer
Am 04.01.14 11:17, schrieb eneskri...@gmail.com: So the issue is like this. I have to make a 2 x N grid like this: o Radio - 1 o Radio - 2 o Radio - 3 o Radio - 4 ... o Radio - N - 1 o Radio - N How to do so with a loop? Create the buttons and append them into a list, so you can later refer

Re: Tkinter GUI Error

2014-01-13 Thread Christian Gollwitzer
Am 13.01.14 19:49, schrieb fluttershy...@gmail.com: Inside the function is where I am having the problem, I am trying to get it to delete the label so that it may then replace it with a shorter text. Here is the full code: from tkinter import * import random main = Tk() main.title(Crack

Re: Tkinter GUI Error

2014-01-14 Thread Christian Gollwitzer
Am 14.01.14 22:27, schrieb Lewis Wood: Also anyone know how to create an entry box for Tkinter where you can only enter in 2 digits? You must use a validator to achieve this. This is a more advanced topic though. A validator is a function that is called whenever the user keys something in -

Re: Using a static library in a C extension for Python

2014-01-22 Thread Christian Gollwitzer
Hi, Am 22.01.14 12:01, schrieb lgabiot: Is it possible to link statically cairo to my extension, so that even if cairo is not installed on a computer, the code will run? I guess I would need to modify the setup.py file using distutils to compile cairo statically into my .so file? I've done

Re: Tkinter widgets into classes.

2014-02-02 Thread Christian Gollwitzer
Am 01.02.14 20:43, schrieb Lewis Wood: I was wandering if I could dynamically change my GUI and after a few searches on Google found the grid_remove() function. What I'm wandering now is if there is a way to group a lot of widgets up into one, and then use the one grid_remove function which

Re: Tkinter widgets into classes.

2014-02-02 Thread Christian Gollwitzer
Am 02.02.14 00:07, schrieb Lewis Wood: It does, this is the whole code: from tkinter import * root=Tk() root.title(Second Root Testing) def secondwindow(): root2=Tk() root2.mainloop() button1=Button(root,text=Root2,command=secondwindow).grid(row=0,column=0) root.mainloop() I

Re: Explanation of list reference

2014-02-15 Thread Christian Gollwitzer
Hi Dave, Am 14.02.14 19:08, schrieb dave em: He is asking a question I am having trouble answering which is how a variable containing a value differs from a variable containing a list or more specifically a list reference. as others have explained better and in more detail, there are mutable

Re: Explanation of list reference

2014-02-15 Thread Christian Gollwitzer
Am 15.02.14 01:57, schrieb Chris Angelico: Can you give an example of an ambiguous case? Fundamentally, the 'is' operator tells you whether its two operands are exactly the same object, nothing more and nothing less, so I assume your ambiguous cases are ones where it's possible for two things to

Re: 'complex' function with string argument.

2014-03-18 Thread Christian Gollwitzer
Am 15.03.14 17:26, schrieb Jayanth Koushik: This is regarding the inbuilt 'complex' function. The python docs say: Note: When converting from a string, the string must not contain whitespace around the central + or - operator. For example, complex('1+2j') is fine, but complex('1 + 2j') raises

Re: 'complex' function with string argument.

2014-03-18 Thread Christian Gollwitzer
Hi Steven, Am 18.03.14 09:00, schrieb Steven D'Aprano: On Tue, 18 Mar 2014 08:04:44 +0100, Christian Gollwitzer wrote: Am 15.03.14 17:26, schrieb Jayanth Koushik: This is regarding the inbuilt 'complex' function. The python docs say: Note: When converting from a string, the string must

Re: OT: This Swift thing

2014-06-07 Thread Christian Gollwitzer
Am 06.06.14 13:20, schrieb Alain Ketterlin: Chris Angelico ros...@gmail.com writes: It's impossible to accidentally call a base class's method when you ought to have called the overriding method in the subclass, which is a risk in C++ [2]. I don't how this can happen in C++, unless you

Re: Under what kind of situation, time.sleep(n) would sleep much longer than n seconds?

2014-06-19 Thread Christian Gollwitzer
Am 19.06.14 01:38, schrieb Chris Angelico: a good console UI just requires this: something = raw_input(Enter something: ) print(Result: +result) That is actually one of the worst console UIs possible. Almost all beginner's courses start with programs like that, requiring the user to key

Re: Under what kind of situation, time.sleep(n) would sleep much longer than n seconds?

2014-06-19 Thread Christian Gollwitzer
Am 19.06.14 09:42, schrieb Chris Angelico: On Thu, Jun 19, 2014 at 5:18 PM, Christian Gollwitzer aurio...@gmx.de wrote: Am 19.06.14 01:38, schrieb Chris Angelico: a good console UI just requires this: something = raw_input(Enter something: ) print(Result: +result) That is actually one

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-06-25 Thread Christian Gollwitzer
Hi Peter, Am 24.06.14 20:11, schrieb Peter Tomcsanyi: I use the Python 3.4.1 installer from https://www.python.org/downloads/release/python-341/ The Windows installation comes with Tcl/Tk version 8.6 which has some new features (compared to 8.5) that are very important to me. may I ask which

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-06-25 Thread Christian Gollwitzer
Am 25.06.14 21:26, schrieb Peter Tomcsanyi: Christian Gollwitzer aurio...@gmx.de wrote in message news:lodruv$k45$1...@dont-email.me... may I ask which features of 8.6 you need in particular? I need two of them: - Angled text - PNG image support with alpha channel (even if it seems a bit

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-06-26 Thread Christian Gollwitzer
Am 26.06.14 12:39, schrieb Peter Tomcsanyi: Christian Gollwitzer aurio...@gmx.de wrote in message news:lofciv$nq6$1...@dont-email.me... For PNG image support you can load either the Img package which gives support for a large variety of images, or the smaller tkpng package. My first Google

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-06-26 Thread Christian Gollwitzer
Am 26.06.14 14:37, schrieb Christian Gollwitzer: Am 26.06.14 12:39, schrieb Peter Tomcsanyi: Christian Gollwitzer aurio...@gmx.de wrote in message news:lofciv$nq6$1...@dont-email.me... For PNG image support you can load either the Img package which gives support for a large variety of images

Re: cmd.exe on WIndows - problem with displaying some Unicode characters

2014-08-04 Thread Christian Gollwitzer
Am 04.08.14 01:08, schrieb Chris Angelico: On Mon, Aug 4, 2014 at 8:52 AM, Wiktor look@signature.invalid wrote: I have to ask - is there a way to make that original concept work? I know, that CP437 has symbols ╖, ╢ and ╘, but does not have polish letters - and I need to display them too.

Re: how to write file into my android phone?

2014-08-10 Thread Christian Gollwitzer
Am 10.08.14 11:39, schrieb Steven D'Aprano: Android phones don't mount as storage devices? Oh well, that's Android crossed off my list. Not any longer. They used to, but the support for mass storage was dropped in favour of MTP to allow concurrent access from both the computer and the

Re: Idle crashes when using accentuated letters in Mac OS X

2014-08-10 Thread Christian Gollwitzer
Am 10.08.14 15:03, schrieb Anamaria Martins Moreira I am facing a problem with using accentuated characters in idle (2.7.6 or 2.7.8). When I type the accent, idle crashes. If I call python from a terminal, there is no such problem. Try updating your Tcl/Tk to the latest version, e.g. via

Re: Begginer in python trying to load a .dll

2014-08-12 Thread Christian Gollwitzer
Am 12.08.14 20:36, schrieb c1223: Hi, Im working in the development of a program based in python that allow us to contrl a spectometer. The spectometer has an .dll file. The idea is to work through this dll and operate the spectometer. The name of the .dll is AS5216.dll. I've trying with ctype,

Re: PyMatch Tool.

2014-08-15 Thread Christian Gollwitzer
Am 14.08.14 21:50, schrieb rafinha.u...@gmail.com: Hello, I created this tool to help me develop on formatting text using regular expressions. Any questions, I am available. Thank you. Tool - https://github.com/rfunix/PyMatch I expected something like visual regexp:

Re: PyMatch Tool.

2014-08-18 Thread Christian Gollwitzer
Am 18.08.14 14:21, schrieb Rafael Francischini: Em sexta-feira, 15 de agosto de 2014 17h59min28s UTC-3, Christian Gollwitzer escreveu: I expected something like visual regexp: http://laurent.riesterer.free.fr/regexp/ Since RegExp-Syntax is very similar across tools, yours is almost

Re: Matplotlib Contour Plots

2014-08-18 Thread Christian Gollwitzer
Am 18.08.14 18:51, schrieb Jamie Mitchell: On Friday, August 15, 2014 4:13:26 PM UTC+1, Steven D'Aprano wrote: So I have two 1D arrays: 1st array - ([8, 8.8,8.5,7.9,8.6 ...], dtype=float32) It has a shape (150,) 2nd array - ([2, 2.2, 2.5, 2.3, ...],dtype=float32) It has a shape (150,) What

Re: Python vs C++

2014-08-22 Thread Christian Gollwitzer
Am 21.08.14 14:54, schrieb David Palao: I consider myself a python programmer, although C++ was one of the first languages I learned (not really deeply and long time ago). Now I decided to retake C++, to broaden my view of the business. However, as I progress in learning C++, I cannot take out

Re: Python vs C++

2014-08-22 Thread Christian Gollwitzer
Am 22.08.14 11:29, schrieb Marko Rauhamaa: So my advise is, use as high-level programming language as you can. If you can't, deal with it, but often you can break your system into parts where only a small corner needs to be implemented at the low level. Agreed. This is called Ousterhout's

Re: Global indent

2014-08-23 Thread Christian Gollwitzer
Am 23.08.14 11:08, schrieb Steven D'Aprano: I just started up emacs, and got a GUI window with an abstract picture of a gnu and a bunch of instructions which I didn't get a chance to read. I clicked on the text, and the instructions disappeared. I don't know how to get them back. They were

Re: Global indent

2014-08-23 Thread Christian Gollwitzer
Hi Steven, I agree with all you said. Am 23.08.14 16:56, schrieb Steven D'Aprano: Christian Gollwitzer wrote: There are ways to put these editors into Beginner's mode, for vim there is evim, and for sure emacs has something similar, where the editor behaves more like you expect. In evim

Re: Global indent

2014-08-23 Thread Christian Gollwitzer
Am 23.08.14 16:19, schrieb Joshua Landau: (Since this is already an editor war...) On 23 August 2014 10:41, Christian Gollwitzer aurio...@gmx.de wrote: Sometimes I impress my colleagues with what they call magic, i.e. creating special repeated lists of numbers by a few keystrokes in gvim

Re: What is acceptable as 'open-source'? [was Python vs C++]

2014-08-27 Thread Christian Gollwitzer
Am 27.08.14 09:50, schrieb Frank Millman: This is quite a timely message for me. I am inching closer to releasing a version of my accounting software, and a lot of the above comments apply to me as well. At present I am the only developer, and my project is not hosted anywhere, so I have to

Re: very lightweight gui for win32 + python 3.4

2014-09-14 Thread Christian Gollwitzer
Am 13.09.14 13:31, schrieb Thomas Heller: Am 13.09.2014 03:19, schrieb Grant Edwards: On 2014-09-12, Thomas Heller thel...@ctypes.org wrote: Am 12.09.2014 18:38, schrieb Chris Angelico: Does Tkinter really work well with cx_Freeze? I doubt it (from my experiences with py2exe). I never had

Re: Lists

2014-09-15 Thread Christian Gollwitzer
Am 15.09.14 04:40, schrieb Seymore4Head: nums=range(1,11) print (nums) I don't understand why the command nums=range(1,11) doesn't work. I would think that print(nums) should be 1,2,3 ect. Instead it prints range(1,11) It does work, but in a different way than you might think. range() does

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-10-03 Thread Christian Gollwitzer
Am 03.10.14 00:08, schrieb Ned Deily: So, to really support Tk 8.6, the only viable option at the moment would be for us to ship our own versions of Tk, like the Windows installer does. But it wouldn't be acceptable, IMO, to force other projects and users to migrate to 8.6 in the middle of a

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-10-05 Thread Christian Gollwitzer
Am 04.10.14 07:53, schrieb Ned Deily: In article m0n3n3$48j$1...@dont-email.me, Kevin Walzer k...@codebykevin.com wrote: A Tcl library compiled for 8.5 can be loaded into 8.6 with no re-compiling required because of stubs. It has nothing to do with Python per se; that's just the way linking

Re: Syntax Highlighting in a tkinter Text widget

2014-10-06 Thread Christian Gollwitzer
Am 07.10.14 07:35, schrieb Nicholas Cannon: Hey guys Im working on an open source text editor(https://github.com/nicodasiko/Text-Config-2) and I would like to add syntax highlighting(mainly for python code). I have built the editor in python and the text input is a Text tkinter widget. I know

Re: [OT] spelling colour / color was Re: Toggle

2014-10-11 Thread Christian Gollwitzer
Am 10.10.14 22:05, schrieb alister: Would the French tolerate me using an alternative Variant (Canadian or Carribean)? I think not UK English as spoken in England is the definitive version. The clue is in the Name - English not American I tend to agree that British English is the correct

Re: What does %%(%s)s mean/expand to in Python? What does rowshtml += (rowhtml % ((fieldname, ) * 3)) expand to? Kindly explain.

2014-10-29 Thread Christian Gollwitzer
Am 29.10.14 07:15, schrieb satishmlm...@gmail.com: What does %%(%s)s mean in Python? Instead of posting all those questions here, you can simply try it in an interactive python interpreter: Apfelkiste:VecTcl chris$ python Python 2.7.2 (default, Oct 11 2012, 20:14:37) [GCC 4.2.1 Compatible

Re: Has color Green changed from Python 33 to 34 ?

2014-10-31 Thread Christian Gollwitzer
Am 30.10.14 12:23, schrieb ast: I just updated this morning my Python from a 3.3rc to 3.4 (Windows) and I noticed that the 'Green' color in tkinter GUI is not the same at all. 'Green' in 3.4 is very dark. I had to replace it with 'Lime' to get back a nice 'Green'. If you are dependent on the

Re: Challenge: optimizing isqrt

2014-11-01 Thread Christian Gollwitzer
Hi Steven, let me start by answering from reverse: Q3: What is the largest value of n beyond which you can never use the float optimization? A3: There is no such value, besides the upper limit of floats (DBL_MAX~ 10^308) P3: If you feed a perfect square into the floating point square

Re: Challenge: optimizing isqrt

2014-11-01 Thread Christian Gollwitzer
Addendum: If my method below works, you can also use it to speed up computations for n2*1022, by splitting off an even power of two from the integer and computing the FP sqrt of the mantissa for the seed, i.e. doing the FP manually. Am 01.11.14 09:02, schrieb Christian Gollwitzer: Hi Steven

Re: Challenge: optimizing isqrt

2014-11-01 Thread Christian Gollwitzer
Am 01.11.14 09:13, schrieb Chris Angelico: On Sat, Nov 1, 2014 at 7:02 PM, Christian Gollwitzer aurio...@gmx.de wrote: Your above algorithm is obviously doing Heron- or Newton-Raphson iterations, so the same as with floating point math. The first line before the while loop computes some

Re: Challenge: optimizing isqrt

2014-11-01 Thread Christian Gollwitzer
Am 01.11.14 09:33, schrieb Chris Angelico: On Sat, Nov 1, 2014 at 7:25 PM, Christian Gollwitzer aurio...@gmx.de wrote: Part of the point of that algorithm is that it never uses FP, and is therefore not limited by FP restrictions. which are??? Most notably, the inability to represent every

Re: GUI toolkit(s) status

2014-11-20 Thread Christian Gollwitzer
Am 20.11.14 09:40, schrieb Chris Angelico: On Thu, Nov 20, 2014 at 7:25 PM, Paul Rubin no.email@nospam.invalid wrote: wxjmfa...@gmail.com writes: Today, there are simply no more valid and working GUI toolkit running out of the box. Tkinter still works for me. What's the problem? Ignore

Re: GUI toolkit(s) status

2014-11-21 Thread Christian Gollwitzer
Am 21.11.14 05:49, schrieb Paul Rubin: Terry Reedy tjre...@udel.edu writes: Tcl/Tk currently use UCS-2, which only handles BMP chars. Alternatives to support astral chars: [other encodings] This is not entirely true: Tcl supports lazy typing, i.e. values (Tcl_Obj) are cast upon request into

Re: Python newbie trying to embed in C++

2013-02-27 Thread Christian Gollwitzer
Am 27.02.13 09:51, schrieb Marwan: And I'd appreciate it if you could give me pointers to how to easily call Python from C++. Maybe you can use boost::python? http://www.boost.org/doc/libs/1_53_0/libs/python/doc/ Cave: I haven't used it and don't know if it is up-to-date. Christian

Re: Python script not working on windows 7 but works fine on linux

2013-03-04 Thread Christian Gollwitzer
Am 04.03.13 20:06, schrieb io: The following scripts are working fine on linux but, using the same version, can't work on windows because i receive the following message: snip f = open(/home/io/btc_trading/markets.csv,wb) Windows error : Traceback (most recent call last): File

Re: What am I doing wrong in this simple tkinter example?

2013-03-16 Thread Christian Gollwitzer
Am 16.03.13 16:14, schrieb Yves S. Garret: On Saturday, March 16, 2013 11:08:24 AM UTC-4, Chris Angelico wrote: self.secret_txt.delete(0.0, END) self.secret_txt.delete(0.0, message) Is the second one supposed to be adding text? I'm not familiar with tkinter but that's the line with

Re: Excel column 256 limit

2013-03-18 Thread Christian Gollwitzer
Am 18.03.13 20:00, schrieb Ana Dionísio: But I still get the error and I use Excel 2010. I'm trying to export data in a list to Excel Unless you tell *how exactly* do you export the data into excel format, we probably can't help you. You could try to write a .csv ASCII file, for instance.

Re: tkinter: invisible PanedWindow sashes on OS X

2013-03-21 Thread Christian Gollwitzer
Am 21.03.13 15:37, schrieb Arnaud Delobelle: Hi Python List, I'm trying to use PanedWindow on OS X (10.8.3). I've started with the effbot docs example (http://effbot.org/tkinterbook/panedwindow.htm), namely: -- from Tkinter import * m = PanedWindow(orient=VERTICAL) m.pack(fill=BOTH,

Re: Confusing Algorithm

2013-04-22 Thread Christian Gollwitzer
Am 22.04.13 16:57, schrieb Oscar Benjamin: On 22 April 2013 13:56, Chris Angelico ros...@gmail.com wrote: On Mon, Apr 22, 2013 at 10:39 PM, RBotha r...@ymond.co.za wrote: Threads are straight lines and cannot intersect towers. Your task is to write a program that finds the minimal number of

Re: Drag and drop in Windows

2013-04-29 Thread Christian Gollwitzer
Hi Robert, Am 29.04.13 12:25, schrieb Robert Flintham: I’ve found this (TkDND): http://wiki.tcl.tk/2768 But I don’t know how to implement this in Python. The Windows binary for it comes as a set of “.tcl” files and a single “.dll” file. 2.direct implementation of the Tcl file

Re: Drag and drop in Windows

2013-04-30 Thread Christian Gollwitzer
Hi Robert, Am 30.04.13 10:39, schrieb Robert Flintham: Thanks Christian. I've tried the following code: import Tkinter root = Tkinter.Tk() root.title(DICOM Opener) root.tk.eval('lappend auto_path {K:/Python27/Lib/site-packages/tkdnd2.6}') root.tk.eval('package require tkdnd')

Re: Drag and drop in Windows

2013-05-01 Thread Christian Gollwitzer
Hi Robert, Am 01.05.13 10:06, schrieb Robert Flintham: Thanks Kevin, that looks great. It's having trouble finding TkDND though - is there a certain place in the Python27 directory that it's most likely to look? It's currently under Lib/site-packages, but I'm suspicious that Tk/Tkinter has

Re: Unicode humor

2013-05-08 Thread Christian Gollwitzer
Am 08.05.13 15:19, schrieb Roy Smith: Apropos to any of the myriad unicode threads that have been going on recently: http://xkcd.com/1209/ http://xkcd.com/1137/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Harmonic distortion of a input signal

2013-05-20 Thread Christian Gollwitzer
Am 20.05.13 19:23, schrieb jmfauth: Non sense. Dito. The discrete fft algorithm is valid only if the number of data points you transform does correspond to a power of 2 (2**n). Where did you get this? The DFT is defined for any integer point number the same way. Just if you want to get

Re: Harmonic distortion of a input signal

2013-05-20 Thread Christian Gollwitzer
Oops, I thought we were posting to comp.dsp. Nevertheless, I think numpy.fft does mixed-radix (can't check it now) Am 20.05.13 19:50, schrieb Christian Gollwitzer: Am 20.05.13 19:23, schrieb jmfauth: Non sense. Dito. The discrete fft algorithm is valid only if the number of data points

Re: Utility to locate errors in regular expressions

2013-05-24 Thread Christian Gollwitzer
Am 24.05.13 14:58, schrieb Malte Forkel: Finding out why a regular expression does not match a given string can very tedious. I would like to write a utility that identifies the sub-expression causing the non-match. Try http://laurent.riesterer.free.fr/regexp/ it shows the

Re: Beginner Question: 3D Models

2013-06-19 Thread Christian Gollwitzer
Am 19.06.13 04:47, schrieb andrewblun...@gmail.com: However, for one part of the program I'd like to be able to create a 3D model based on the user input. The model would be very basic consisting of a number of lines and objects. We have 3D models of each component within our CAD system so it

Re: tkinter

2013-06-23 Thread Christian Gollwitzer
Ahoj, Am 23.06.13 18:06, schrieb JK: Nazdar mládenci, this is an English (only) speaking group. Therefore you will not get much response by posting in Czech. měl bych zájem dokončit překlad Tkinteru (http://tkinter.programujte.com/index.htm), na kterém před šesti lety pracovali zejména

Re: io module and pdf question

2013-06-25 Thread Christian Gollwitzer
Am 25.06.13 08:33, schrieb rusi: On Tuesday, June 25, 2013 9:48:44 AM UTC+5:30, jyou...@kc.rr.com wrote: 1. Is there another way to get metadata out of a pdf without having to install another module? 2. Is it safe to assume pdf files should always be encoded as latin-1 (when trying to read it

Re: Best Scripting Language for Embedded Work?

2013-07-10 Thread Christian Gollwitzer
Hi David, you have multi-posted this to comp.lang.tcl. Please don't do that - use crossposting and a proper follow-up (as I did now) Am 10.07.13 03:29, schrieb David T. Ashley: We develop embedded software for 32-bit micros using Windows as the development platform. Robert's answer made me

Re: Best Scripting Language for Embedded Work?

2013-07-12 Thread Christian Gollwitzer
Hi David, Am 12.07.13 03:18, schrieb David T. Ashley: On Wed, 10 Jul 2013 09:03:54 +0200, Christian Gollwitzer aurio...@gmx.de wrote: Robert's answer made me hesitate - what exactly is your platform? Are you writing the scripts for the embedded platform, or for Windows, or does the embedded

Re: tkinter redraw rates

2013-07-18 Thread Christian Gollwitzer
Am 18.07.13 06:38, schrieb fronag...@gmail.com: On Thursday, July 18, 2013 9:07:24 AM UTC+8, Dave Angel wrote: Nope - don't use that. Instead, post an event on the queue, and return to the mainloop() from whence we came. def test_thread(self): if

Re: How can I make this piece of code even faster?

2013-07-21 Thread Christian Gollwitzer
How about using numpy? Am 20.07.13 22:22, schrieb pablobarhamal...@gmail.com: Ok, I'm working on a predator/prey simulation, which evolve using genetic algorithms. At the moment, they use a quite simple feed-forward neural network, which can change size over time. Each brain tick is performed

Re: tkinter progress bar

2013-07-23 Thread Christian Gollwitzer
Am 23.07.13 08:52, schrieb hsiw...@walla.com: Hi, How can I add a tkinter progress bar in python 3.2 to start before a loop and end after it. I am looking for a very simple solution. def MyFunc(): Start progress bar for fileName in fileList: … End progress bar 1. There is a

Re: GUI toolkit(s) status

2014-11-22 Thread Christian Gollwitzer
Am 22.11.14 19:33, schrieb wxjmfa...@gmail.com: As you are rewriting unicode, a small suggestion/request. Assume that one processes a part of the Bible in polytonic Greek, one has to create a ton of temporary (locale) letters, °)))o αὐτὸν τὸν ἰχθύα ὁ Χριστιανὸς ἔγραψε τρόλλοι --

Re: SQLite3 in Python 2.7 Rejecting Foreign Key Insert

2014-11-23 Thread Christian Gollwitzer
Am 23.11.14 07:32, schrieb Chris Angelico: did a sequence of commands which ought to have failed, but didn't. Let's see if I can recreate this: rosuav@sikorsky:~$ sqlite3 SQLite version 3.7.13 2012-06-11 02:05:22 Enter .help for instructions Enter SQL statements terminated with a ; sqlite

Re: Python, C++ interaction

2014-12-04 Thread Christian Gollwitzer
Am 03.12.14 09:29, schrieb Michael Kreim: I did some googleing on extending Python by C++ code but I did not find something that satisfies me. I gave SWIG a try, but several webpages disadvised me of using it. Also my small experiments did not work. I don't know why SWIG is discouraged; in my

Re: list comprehension return a list and sum over in loop

2014-12-12 Thread Christian Gollwitzer
Am 12.12.14 09:30, schrieb KK Sasa: Mark Lawrence於 2014年12月12日星期五UTC+8下午3時17分43秒寫道: Hi Mark and Yotam, Thanks for kind reply. I think I didn't make my problem clear enough. The slow part is [d2(t[k]) for k in xrange(1000)]. In addition, I don't need to construct a list of 1000 lists inside, but

Re: Moving 1 Picture in a Programm - How to?

2015-01-01 Thread Christian Gollwitzer
Am 01.01.15 um 19:43 schrieb lucasvfxd...@gmail.com: Hey Guys! I need your help! So i want to make a programm like the app called Feed Me There are 2 Pictures (I got that) than you can click the food picture and drag it on the boys mouth and than the sad boys face disappears and a happy face

Re: Looking for sample python script using Tkinter

2015-01-02 Thread Christian Gollwitzer
Am 03.01.15 um 00:03 schrieb accessnew...@gmail.com: I have a script that I trying to go from command line entry to interface entry. I am tinkering with Tkinter and want to review some Tkinter interface building scripts. Really basic stuff covering file selection and making some of the data

  1   2   3   4   5   6   >