kevind0...@gmail.com wrote:
>from Tkinter import *
>
>def butContinue():
>root1.destroy()
As Christian said, you're destroying the root window and its children,
so instead use root1.quit() here.
> ...
>
>root1.mainloop()
>
>print entryName.get("1.0", "end-1c" )
>print entryPWord.get("1.0", "
Dave Farrance wrote:
>It occurs to me now that the trackback might misidentify the module in
>use, if say, you'd named a file "numbers.py" then got rid of it later
>leaving a "numbers.pyc" somewhere. If so, see where it is:
>
>import numbers
>print nu
It occurs to me now that the trackback might misidentify the module in
use, if say, you'd named a file "numbers.py" then got rid of it later
leaving a "numbers.pyc" somewhere. If so, see where it is:
import numbers
print numbers.__file__
--
https://mail.python.org/mailman/listinfo/python-list
jenswaelk...@gmail.com wrote:
> File "/usr/lib/python2.7/decimal.py", line 3744, in
>_numbers.Number.register(Decimal)
>AttributeError: 'module' object has no attribute 'Number'
Your decimal module seems broken. Confirm that in the Python shell:
import numbers
print numbers.Number
I'm gue
gemjack...@gmail.com wrote:
>This fixed my problem with thkinter. sudo cp ~/.Xauthority ~root/
Which means that you were creating a GUI window with Python as root,
which is to be avoided if you can. If you can't avoid it and you're
running it with sudo in a bash console, rather than a root
Dave Farrance wrote:
>I'd like to install Numba on Debian Jessie to work with the system
>Python 2.7.9 (rather than installing Anaconda).
OK, never mind. Fixed.
By Googling the first error code, finding a suggested fix for that,
running again, Googling the new error, and several
I'd like to install Numba on Debian Jessie to work with the system
Python 2.7.9 (rather than installing Anaconda).
When I follow the instructions at
https://github.com/numba/numba#custom-python-environments
...I get errors when trying to install Numba either with the git clone
method or installin
sam Rogers wrote:
> I have downloaded python 2.7 with no problem. It works. I am trying to get
>pyserial to work. I have tried many different solutions. I am not sure if it
>works or not. How can I be sure? I am using windows 7. I did not see any help
>at python.org. Can you help?
>PS my g
Stallone Carl wrote:
>I am currently using python 3.5.0 and I have been trying to write a program
>using turtle but is not seem to be working. I have followed all tutarial on
>the web and when i compare it with my code my am duing everything the same
>way but it still don't seems to be working I
"D'Arcy J.M. Cain" wrote:
>On Fri, 4 Dec 2015 18:28:22 -0500
>Terry Reedy wrote:
>> Tk widgets, and hence IDLE windows, will print any character from
>> \u to \u without raising, even if the result is blank or ?.
>> Higher codepoints fail, but allowing the entire BMP is better than
>> an
I was taking it for granted that you knew how to set environment
variables, but just in case you don't: In the shell, (are you using
BASH?), put this:
export PYTHONIOENCODING=UTF-8
...then run your script.
Remember that this is *not* a permanent fix.
--
https://mail.python.org/mailman/listinfo/
"D'Arcy J.M. Cain" wrote:
>...
>utf-8
>Traceback (most recent call last):
> File "./g", line 5, in
>print(u"\N{TRADE MARK SIGN}")
>UnicodeEncodeError: 'ascii' codec can't encode character '\u2122' in
>position 0: ordinal not in range(128)
I *presume* that you're using Linux since you've go
Ben Finney wrote:
>Dave Farrance writes:
>
>> Marko Rauhamaa wrote:
>>
>> >Dave Farrance :
>> >
>> >> (Conversely, I see that unlike CPython, all PyPy's numbers have
>> >> unchanging ids, even after exiting PyPy and r
Marko Rauhamaa wrote:
>Dave Farrance :
>
>> (Conversely, I see that unlike CPython, all PyPy's numbers have
>> unchanging ids, even after exiting PyPy and restarting, so it seems
>> that PyPy's numerical ids are "faked".)
>
>What's a fake
Cecil Westerhof wrote:
>On Wednesday 25 Nov 2015 23:58 CET, Laura Creighton wrote:
>>
>> Your Suse system probably wants to use python for something. If your
>> system python is damaged, you badly need to fix that, using the
>> system package managers tools, before Suse does some sort of update
>
Alan Bawden wrote:
>Chris Angelico writes:
> ...
>> Python 2.7.8 (2.4.0+dfsg-3, Dec 20 2014, 13:30:46)
>> [PyPy 2.4.0 with GCC 4.9.2] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>> tuple([]) is tuple([])
>> False
>
>I said I wouldn't be suprised if it
fl wrote:
>Hi,
>I find the following code snippet, which is useful in my project:
> ...
>correctly. Could you see something useful with variable 'sz'?
So that's example code in "An Introduction to the Kalman Filter" by Greg
Welch and Gary Bishop, and no, that construct was unnecessary. As you've
Steven D'Aprano wrote:
>On Mon, 16 Nov 2015 05:15 pm, Gregory Ewing wrote:
>
>> Ints are not the only thing that // can be applied to:
>>
>> >>> 1.0//0.01
>> 99.0
>
>Good catch!
Hmmm. I see that the float for 0.01 _is_ slightly larger than 0.01
>>> Decimal(0.01)
Decimal('0.012
fl wrote:
>I read the following code snippet. A question is here about '@'.
>I don't find the answer online yet.
I recommend this:
"Understanding Python Decorators in 12 Easy Steps!"
http://simeonfranklin.com/blog/2012/jul/1/python-decorators-in-12-steps/
--
https://mail.python.org/mailman/li
PythonDude wrote:
>On Thursday, 12 November 2015 22:57:21 UTC+1, Robert Kern wrote:
>> He simply instantiated the two vectors as row-vectors instead of
>> column-vectors,
>> which he could have easily done, so he had to flip the matrix expression.
>
>Thank you very much Robert - I just had to
Random832 wrote:
>The opposite of line buffering is not no buffering, but full
>(i.e. block) buffering, that doesn't get flushed until it runs
>out of space. TextIOWrapper has its own internal buffer, and its
>design apparently doesn't contemplate the possibility of using
>it with a raw FileIO ob
Tim Golden wrote:
>I'm afraid you've been bitten by the fact that we no longer support
>Windows XP and haven't communicated this very well. We have a new
>version of the installer almost ready for release which indicates this
>much earlier (and more obviously). I'm afraid if you're on XP you'r
Rob Gaddi wrote:
>So, this is odd. I'm running Ubuntu 14.04, and my system did a kernel
>upgrade from the repository from 3.13.0-63-generic to 3.13.0-65-generic.
>And pyserial (2.7, installed through pip) stopped working.
When KDE's "Plasma 5" appeared with Kubuntu 15.04, I found it to be to
Laura Creighton wrote:
>In a message of Thu, 01 Oct 2015 20:03:26 +0100, Dave Farrance writes:
>>Laura Creighton wrote:
>>
>>>In a message of Thu, 01 Oct 2015 18:45:06 +0100, Dave Farrance writes:
>>>>Yet the documentation says that it's mandatory for t
Laura Creighton wrote:
>In a message of Thu, 01 Oct 2015 18:45:06 +0100, Dave Farrance writes:
>>Yet the documentation says that it's mandatory for the GUI backend base
>>to implement stop() but that single_shot is optional. Ho hum.
>
>report as a bug. its a doc bug a
Laura Creighton wrote:
>In a message of Thu, 01 Oct 2015 17:36:50 +0100, Dave Farrance writes:
>>I'm trying to set up the basics of a timer-scheduled function in
>>matplotlib and I can't figure out how to stop the timer. Maybe the
>>stop() method is dysfunction
I'm trying to set up the basics of a timer-scheduled function in
matplotlib and I can't figure out how to stop the timer. Maybe the
stop() method is dysfunctional in Ubuntu 14.04 or maybe I'm getting the
syntax wrong.
If anybody's got matplotlib installed, can you try this code and tell me
if it s
"ast" wrote:
>DISPLAYSURF = pygame.display.set_mode((400, 300))
>pygame.display.set_caption('Hello World!')
>
>The first line opens a 400x300 pygame window.
>The second one writes "Hello World" on top of it.
>
>I am just wondering how function set_caption finds the windows
>since the window's nam
shiva upreti wrote:
>Hi
>I am new to linux. I tried various things in attempt to install kivy. I
>installed python 2.7.10
Just to make clear what others have said -- replacing Ubuntu 14.04's
system Python 2.7.6 is a bad idea and will break stuff, so if you really
must have the latest version of
Dwight GoldWinde wrote:
>Here are the results I got below, showing the same error. The first line
>says,
>"2.7.6 (default, Sep 9 2014, 15:04:36)”. Does that mean I am running the
>old Python? How could that be since I am SURE I downloaded 3.4.3 (it even
>gives the folder name as “Python 3.4” in
ryguy7272 wrote:
>PERFECT!! SO SIMPLE!!
>I don't know why the author didn't do that in the book.
The book is evidently giving you code snippets to enter into Python's
own interactive interpreter, i.e., you enter "python" at the command
line, then you manually type each command which immediately
Fabien wrote:
>another solution with less "(([[]]))", and less ";". There are way too
>many ";" in Matlab ;)
>
>import numpy as np
>v1 = [1, 2, 3]
>v2 = [4, 5, 6]
>v3 = [7, 8, 9]
>v4 = [10, 11, 12]
>np.hstack([[v1, v2], [v3, v4]]).T
>Out[]:
>array([[ 1, 4],
>[ 2, 5],
>[ 3, 6],
Rustom Mody wrote:
>On Saturday, June 6, 2015 at 10:20:49 AM UTC+5:30, Steven D'Aprano wrote:
>> On Sat, 6 Jun 2015 01:20 pm, Rustom Mody wrote:
>> > As a parallel here is Dijkstra making fun of AI-ers use of the word
>> > 'intelligent'
>> > http://www.cs.utexas.edu/users/EWD/transcriptions/EWD0
Skip Montanaro wrote:
>P.S., Dave, your "omitthis" and "andthis" kind of sucks for the rest of us.
>And I just invalidated your attempts at
>obscurity by replying to your correct email address. I suggest you just
>omit that stuff going forward. Unfortunately,
>I now I have a crap address in my Gm
Steven D'Aprano wrote:
>On Mon, 1 Jun 2015 07:36 pm, Marko Rauhamaa wrote:
>
>> However, I constantly run into engineers who don't understand what
>> zero means.
>
>Okay, I'll bite.
>
>What does zero mean, and how do engineers misunderstand it?
There are two hard things in computer science: cach
Laura Creighton wrote:
>If you are giving a talk about Decimal -- and trying to stamp out the
>inappropriate use of floats you have to first inform people that
>what they learned as 'decimals' as children was not floating point,
>despite the fact that we write them the same way. ...
To be fair,
Peter Otten <__pete...@web.de> wrote:
>so both +0.0 and -0.0 would be skipped anyway.
Maybe the coder was simply aiming for visibility. The unary minus can
be hard to spot in some circumstances. e.g.: I've sneaked a unary minus
into this maths proof, which makes it horrible (although correct):
Steven D'Aprano wrote:
>I'd like to do a little survey, and get a quick show of hands.
>
>How many people have written GUI or text-based applications or scripts where
>a "Move file to trash" function would be useful?
>
>Would you like to see that in the standard library, even if it meant that
>th
Christian Gollwitzer wrote:
>Yes, the default theme is terrible on Linux (Mac & Windows uses native
>widgets). There are additional themes available, which are buried in
>some packages and a bit difficult to install, but give reasonable
>approximations to the QT look; I'm talking about plastik
Mario Figueiredo wrote:
>Other than replacing the random module with the probability density
>function for the exponential distribution, do you have a suggestion of
>how I could smooth the curve?
Moving average. Try:
def movingaverage(interval, window_size):
window= numpy.ones(int(window_si
Cecil Westerhof wrote:
>I am working again with Python and I am impressed again. ;-)
>
>I thought there was a Python shell that could be used instead of Bash
>(or whichever shell you are using), but I can not find anything about
>it. Am I wrong, or are my search engine skills so bad?
You're prob
David Aldrich wrote:
>Hi
>
>I wonder if someone could help me with this problem please?
>
>On an Ubuntu 10.04 platform, I want to run the latest version of Meld, which
>is a Python program.
>
>Ubuntu 10.04 runs Python 2.6 as standard. Meld requires Python 2.7. So I
>have installed Python 2.7
$ python2
Python 2.7.8 (default, Oct 20 2014, 15:05:19)
[GCC 4.9.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a = 256
>>> b = 256
>>> a is b
True
>>> a = 257
>>> b = 257
>>> a is b
False
>>>
It's not safe to use 'is' to compare integers.
Use ==
--
htt
otaksoftspamt...@gmail.com wrote:
>I have a list containing 9600 integer elements - each integer is either 0 or 1.
>Starting at the front of the list, I need to combine 8 list elements into 1 by
>treating them as if they were bits of one byte with 1 and 0 denoting bit
>on/off (the 8th element wo
Jason Heeris wrote:
>In terms of toolkit bindings, (a) I prefer GTK, but (b) it's impossible to
>tell what the greater proportion of people using one vs. the other is. Or
>if they're wise to do so. Are there more Google hits/SO questions because
>it's harder to use? Or because everyone loves to u
In the past, I've used Visual-C++ for creating dialog-based interfaces for
controlling equipment and displaying data, and I'm looking for something
of similar ease-of-use in Python since that's now my preferred language.
A web-search told me that Glade seems to be most peoples choice (over
QT-Desig
Mark Lawrence wrote:
>http://pyfound.blogspot.co.uk/2015/03/bbc-launches-microbit.html may be
>of interest to some of you.
"Python is one of the three languages that work with the device."
That's cool, and the article says that the Raspberry Pi Foundation is
involved in creating learning conte
Ben Finney wrote:
>Chris Angelico writes:
>
>> import base64; exec(…)
>
>That's all I need to know. Code with ‘exec()’ calls, I consider unsafe
>by default.
Indeed. replacing exec with print...
>>> print(base64.b64decode(b"eD0neD0lcjsgZXhlYyh4JSV4KSc7IGV4ZWMoeCV4KQ=="))
x='x=%r; exec(x%%x)'; e
Dave Cook wrote:
>On 2015-02-22, Dave Farrance wrote:
>
>> It's still quicker to do a re-write in the more cumbersome C
>
>You should try Cython.
I did try Cython when I was trying to figure out what to do about the slow
speed. My initial attempt showed no speedup at
Laura Creighton wrote:
>Good news -- it seems to be working fine with PyPy.
>https://travis-ci.org/hugovk/Pillow/builds
>
>for me, not extensively tested, it just seems to be working.
>
>I have several pypy's floating around here, each within its own
>virtualenv. If you aren't familiar with vir
Dave Farrance wrote:
>Steven D'Aprano wrote:
>
>>I assume you're talking about drawing graphics rather than writing text. Can
>>you tell us which specific library or libraries won't run under PyPy?
>
>Yes, mainly the graphics. I'm a hardware enginee
Steven D'Aprano wrote:
>I assume you're talking about drawing graphics rather than writing text. Can
>you tell us which specific library or libraries won't run under PyPy?
Yes, mainly the graphics. I'm a hardware engineer, not a software
engineer, so I might well be misunderstanding PyPy's curr
Laura Creighton wrote:
>I don't understand 'an interpreter rather than a JIT'. PyPy has a
>JIT, that sort of is the whole point.
Yes. I meant that from my end-user, non-software-engineer perspective, it
looked as though CPython was proceeding with leaps and bounds and that
PyPy remained mostly
jkn wrote:
> I'm curious what ...behavioural... models you are creating quickly in
> Python that then need rewriting in C for speed. SPICE? some other CAD?
> Might be interesting to learn more about what and how you are actually
> doing.
The convert-to-C cases were complex filtering functions.
As an engineer, I can quickly knock together behavioural models of
electronic circuits, complete units, and control systems in Python, then
annoyingly in a few recent cases, have to re-write in C for speed.
I've tried PyPy, the just-in-time compiler for Python, and that is
impressively, hugely fa
55 matches
Mail list logo