Re: Tkinter not working

2022-08-01 Thread Matthew Barnett
On 01/08/2022 13:17, Daniel Lee wrote: Hello, I my code with tkinter was working before, and now, it has many errors in it. I’m not sure what has happened. The results after running are below: "D:\Python Projects\tes\venv\Scripts\python.exe" "D:/Python Projects/tes/main.py" Traceback (most rec

Re: Python path and append

2016-04-19 Thread Matthew Barnett
On 2016-04-19 23:38, Chris Angelico wrote: On Wed, Apr 20, 2016 at 8:29 AM, Seymore4Head wrote: handle = open("\\Winmx\New$\q.txt") for line in handle: line=line.strip() print line Traceback (most recent call last): File "\\Winmx\New$\add viewed.py", line 2, in handle = open("

Re: Great Math Mystery

2015-04-16 Thread Matthew Barnett
Do you mean Pythonesque or Pythonic?-- https://mail.python.org/mailman/listinfo/python-list

Re: [OT] fortran lib which provide python like data type

2015-02-01 Thread Matthew Barnett
On 2015-02-02 02:04, Chris Angelico wrote: On Mon, Feb 2, 2015 at 12:59 PM, Steven D'Aprano wrote: And there are underspecified rules too. What is the plural of octopus? No fair looking it up in the dictionary. Standard and well-known piece of trivia, and there are several options. "Octopodes

Re: Proper deletion of selected items during map iteration in for loop

2014-04-25 Thread Matthew Barnett
On 2014-04-25 18:53, Charles Hixson wrote: What is the proper way to delete selected items during iteration of a map? What I want to do is: for (k, v) in m.items(): if f(k): # do some processing of v and save result elsewhere del m[k] But this gives (as should be expected

Re: Getting started with IDLE and Python - no highlighting and no execution

2012-08-05 Thread Matthew Barnett
On 06/08/2012 01:58, MRAB wrote: On 06/08/2012 01:09, Rotwang wrote: On 06/08/2012 00:46, PeterSo wrote: I am just starting to learn Python, and I like to use the editor instead of the interactive shell. So I wrote the following little program in IDLE # calculating the mean data1=[49, 66, 24,

Re: off topic but please forgive me me and answer

2010-04-03 Thread Matthew Barnett
superpollo wrote: Steve Holden ha scritto: superpollo wrote: Patrick Maupin ha scritto: On Apr 2, 2:41 pm, Andreas Waldenburger wrote: While everyone else is mocking you: Can you please elaborate on why you want to know and what kind of problem you're trying to solve with this? Also, don'

Re: Download unnamed web image?

2010-02-16 Thread Matthew Barnett
galileo228 wrote: On Feb 16, 9:40 pm, galileo228 wrote: On Feb 16, 8:48 pm, John Bokma wrote: galileo228 writes: Using BeautifulSoup, mechanize, and urllib, I've constructed the following: br.open("http://www.school.edu/students/facebook/";) br.select_form(nr = 1) br.form['fulltextsearch

Re: ANN: obfuscate

2010-02-11 Thread Matthew Barnett
Paul Rubin wrote: Gregory Ewing writes: Actually I gather it had a lot to do with the fact that the Germans made some blunders in the way they used the Enigma that seriously compromised its security. There was reportedly a branch of the German forces that used their Enigmas differently, avoidin

Re: EAFP gone wrong

2010-02-09 Thread Matthew Barnett
Arnaud Delobelle wrote: Hi all, Hi have a set of classes that represent mathematical objects which can be represented as a string using a 'latex' method (after Knuth's famous typesetting system). As I want to be able to typeset some builtin types as well, I have a generic function, latex(), as

Re: syntax

2010-01-18 Thread Matthew Barnett
marlowe wrote: I wrote this program, but i have a feeling like there might be a more practical way of writing it. Can someone give me an idea of how to simplify this? Here is an example of the csv file i am using. This program calculates the exponential moving average of the 20 day range. USOtab

Re: What is built-in method sub

2010-01-11 Thread Matthew Barnett
Jeremy wrote: I just profiled one of my Python scripts and discovered that >99% of the time was spent in {built-in method sub} What is this function and is there a way to optimize it? Thanks, Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: 3 byte network ordered int, How To ?

2010-01-06 Thread Matthew Barnett
mudit tuli wrote: For a single byte, struct.pack(') For two bytes, struct.pack(') what if I want three bytes ? Four bytes and then discard the most-significant byte: struct.pack(')[ : -1] -- http://mail.python.org/mailman/listinfo/python-list

Re: KeyboardInterrupt

2009-12-10 Thread Matthew Barnett
mattia wrote: Il Thu, 10 Dec 2009 04:56:33 +, Brad Harms ha scritto: On Thu, 10 Dec 2009 00:29:45 +, mattia wrote: Il Wed, 09 Dec 2009 16:19:24 -0800, Jon Clements ha scritto: On Dec 9, 11:53 pm, mattia wrote: Hi all, can you provide me a simple code snippet to interrupt the execu

Re: An assessment of the Unicode standard

2009-09-01 Thread Matthew Barnett
Kurt Mueller wrote: Am 01.09.2009 um 09:39 schrieb Terry Reedy: But this same problem also extends into monies, nation states, units of measure, etc. There is, of course, an international system of measure. The US is the only major holdout. (I recall Burma, or somesuch, is another.) An inte

Re: Einstein summation notation

2009-07-17 Thread Matthew Barnett
Steven D'Aprano wrote: On Fri, 17 Jul 2009 16:09:03 +0100, MRAB wrote: Python did always have True and False. Oops! I meant "didn't", of course. $ python1.5 Python 1.5.2 (#1, Apr 1 2009, 22:55:54) [GCC 4.1.2 20070925 (Red Hat 4.1.2-27)] on linux2 Copyright 1991-1995 Stichting Mathematis

Re: Fwd: Problem with writing a long line in a text file

2008-11-20 Thread Matthew Barnett
Steve Holden wrote: Mohsen Akbari wrote: Dear guys, I'm a newbie in python and I have this problem with the code that I'm writing. There is a very long line which I wish to output it to a text file.But when I do this, in the output file, the result appears in two lines. I thought maybe that's b