comp.lang.python
  Home FAQ Contact Sign in
comp.lang.python only
 
Advanced search
July 2008
motuwethfrsasuw
 123456 27
78910111213 28
14151617181920 29
21222324252627 30
28293031    31
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.python Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  system tray for Tk         


Author: Oguz Yarimtepe
Date: Jul 7, 2008 23:51

Hi,

Is there any binding that i can use for my python-tk application that
will show an icon at the system tray when the application runs which
will be able to be change during the process?

--
Oğuz Yarımtepe
1 Comment
  Tk overrideredirect problem         


Author: Oguz Yarimtepe
Date: Jul 7, 2008 22:10

Hi,

At my GUI application i am catching a key press action. The code is
working if i don't enable the overrideredirect. When i comment out the
overriderect part i can see the picture but i am not able to catch
the key presses. It seems like the GUI is stucked. But i want to have
windowless appereance that is just the picture itself. Also a working
application that will catch my key presses. So how can i fix it?

Here is the code part related with my question:

from Tkinter import *
from Xlib import *
import Image #PIL
import ImageTk #PIL

self.root = Tk()
#self.root.overrideredirect(1)
self.root.title("Status")
self.root.bind('', self.action)

dsp = display.Display()
self.screen = dsp.screen().root
Show full article (1.89Kb)
no comments
  Re: complex representation         


Author: Terry Reedy
Date: Jul 7, 2008 18:46

DSM wrote:
> ISTM the same reasoning applies equally to complex numbers. My interest
> arose because of what I think is a bug in pypy's complex printing:
>
>
> Python 2.4.1 (pypy 1.0.0 build 56124) on linux2...
Show full article (1.28Kb)
no comments
  Re: Memory error while saving dictionary of size 65000X50 using pickle         


Author: Nagu
Date: Jul 7, 2008 17:03

Thank you very much Martin. It worked like a charm.
no comments
  Re: complex representation         


Author: Robert Kern
Date: Jul 7, 2008 16:59

DSM wrote:
> From the nothing-is-so-trivial-it's-not-worth-a-usenet-post file:
>
> Shouldn't the default representation of complex numbers be like that of
> floats? That is, have a decimal point?
>
>>>> 1
> 1
>>>> 1.0
> 1.0
>>>> 1j
> 1j
>>>> 1.0j
> 1j
>>>> 1.0+1.0j
> (1+1j)
>
>
> In the relevant bit of floatobject.c, there's a comment explaining that
> 1.0 isn't accidental: ...
Show full article (1.23Kb)
no comments
  complex representation         


Author: DSM
Date: Jul 7, 2008 16:38

From the nothing-is-so-trivial-it's-not-worth-a-usenet-post file:

Shouldn't the default representation of complex numbers be like that of
floats? That is, have a decimal point?
>>> 1
1
>>> 1.0
1.0
>>> 1j
1j
>>> 1.0j
1j
>>> 1.0+1.0j
(1+1j)

In the relevant bit of floatobject.c, there's a comment explaining that
1.0 isn't accidental:
Show full article (1.54Kb)
no comments
  numeric emulation and __pos__         


Author: Ethan Furman
Date: Jul 7, 2008 16:12

Greetings, List!

I'm working on a numeric data type for measured values that will keep
track of and limit results to the number of significant digits
originally defined for the values in question.

I am doing this primarily because I enjoy playing with numbers, and also
to get some experience with unit testing.

At this point I have the __init__ portion finished, and am starting on
the various operator functions.

Questions for the group:

1) Any reason to support the less common operators?
i.e. <<, >>, &, ^, |

2) What, exactly, does .__pos__() do? An example would help, too.

Thanks for the feedback.
--
Ethan
6 Comments
  How to make python scripts .py executable, not bring up editor         


Author: korean_dave
Date: Jul 7, 2008 14:56

From command Prompt, i type in a script, "tryme.py".

This, instead, brings up PythonWin editor and Interactive Window.

Path variable is "C:\Python24". (I need Python 2.4 installed, not 2.5)

How do I make it so that the script runs?
8 Comments
  Re: Memory error while saving dictionary of size 65000X50 using pickle         


Author: Nagu
Date: Jul 7, 2008 14:48

I didn't have the problem with dumping as a string. When I tried to
save this object to a file, memory error pops up.

I am sorry for the mention of size for a dictionary. What I meant by
65000X50 is that it has 65000 keys and each key has a list of 50
tuples.

I was able to save a dictionary object with 65000 keys and a list of
15-tuple values to a file. But I could not do the same when I have a
list of 25-tuple values for 65000 keys.

You exmple works just fine on my side.

Thank you,
Nagu
1 Comment
  Python Agile Software Development Tools Screencasts         


Author: percious
Date: Jul 7, 2008 14:42

Hi All,

I started a new series about python on showmedo. Please feel free to
take a look. They are as follows:

virtualenv
pastescript
nosetests
coverage

Here is the link:
http://showmedo.com/videos/video?name=2910000&fromSeriesID=291

Tutorial materials can be found at http://pythontutorials.googlecode.com

cheers.
-chris
8 Comments
1 2 3 4