Help needed!

2007-11-12 Thread SMALLp
I'm new in python and i got lost. Ima building an aplication that add's 2 panels and menu bar to the window. So i made base class that makes window, menuBarClass that inherits mainWindowClass. Problem is with PanelClass that would need to inherit MainWindowClass to add panels. So if someone ha

Re: Populating a dictionary, fast

2007-11-12 Thread MrJean1
On MacOS** your version #!/usr/bin/python v = {} for line in open('keys.txt'): v[long(line.strip())] = True using these keys takes 24.9 secs with ActivePython 2.5.1 and 212.3 secs with Apple's Python 2.3.5. However, this version #!/usr/bin/py

Re: preparing data for visualization

2007-11-12 Thread [EMAIL PROTECTED]
On Nov 12, 5:12 pm, John Machin <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > I would like to have my data in a format so that I can create a > > contour plot. > > > My data is in a file with a format, where there may be multiple fields > > > field = 1 > > > 1a 0 > > 2a 0 > >

Re: preparing data for visualization

2007-11-12 Thread John Machin
[EMAIL PROTECTED] wrote: > I would like to have my data in a format so that I can create a > contour plot. > > My data is in a file with a format, where there may be multiple fields > > field = 1 > > 1a 0 > 2a 0 The above is NOT consistent with the later listing of your data file. [bi

Re: Help needed!

2007-11-12 Thread SMALLp
I forgot, I'm using wxPython "SMALLp" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm new in python and i got lost. > > Ima building an aplication that add's 2 panels and menu bar to the window. > So i made base class that makes window, menuBarClass that inherits > mainWindowCl

persisting data within a module

2007-11-12 Thread Peter J. Bismuti
I'm having trouble understanding how namespaces work in modules. I want to execute a module within the interpreter and then have values that are calculated persist so that other modules that get executed can retrieve them. For example, consider the two simple modules below. The first method f

Re: Distributed RVS, Darcs, tech love

2007-11-12 Thread Marc Espie
In article <[EMAIL PROTECTED]>, llothar <[EMAIL PROTECTED]> wrote: >On 21 Okt., 22:45, Lew <[EMAIL PROTECTED]> wrote: > >> Evidence is that TeX development is dead. > >Exactly and Knuths only contribution to software development was the >theory of >"literate" programming. As i said for me algorith

Re: Distributed RVS, Darcs, tech love

2007-11-12 Thread Peter J. Bismuti
Be nice. > Boy, you really have to get a clue. -- http://mail.python.org/mailman/listinfo/python-list

Arrays

2007-11-12 Thread Gordon C
Absolute newbie here. In spite of the Python Software Foundation tutorial's ( http://www.python.org/doc/current/tut/tut.html ) use of the array declaration array(type[,initializer]), the Python interpreter does NOT accept the word array! It , presumably, needs to have an import included. Coul

Re: How to get a set of keys with largest values?

2007-11-12 Thread Davy
On Nov 12, 8:54 pm, Jeff <[EMAIL PROTECTED]> wrote: > Why are you doing that with key-value pairs? Why not with the array > module or lists? Hi, The original question is a bit complex. I have to implement a sparse matrix which use a dict of dict implementation. For example, sp_mat = {1:{2:1,3:4}

Re: Arrays

2007-11-12 Thread Bernard
On 12 nov, 20:19, "Gordon C" <[EMAIL PROTECTED]> wrote: > Absolute newbie here. In spite of the Python Software Foundation tutorial's > (http://www.python.org/doc/current/tut/tut.html) use of the array > declaration > array(type[,initializer]), the Python interpreter does NOT accept the word > ar

Multithreaded Python Mysql MAC Problems

2007-11-12 Thread Raja
Hi All, I wrote a multithreaded crawler program in Python 2.4 using Mysql 5.045 and MySqldb version as MySql-Python 1.2.2 on MAC OS 10.4.10 . The program strangely segfaults while it is running perfectly in Ubuntu and Windows as well. The gdb stack trace of program is below: LuLu:~/tempd

Multithreaded Python Mysql MAC Problems

2007-11-12 Thread Raja Pradeep Rokkam
Hi All, I wrote a multithreaded crawler program in Python 2.4 using Mysql 5.045 and MySqldb version as MySql-Python 1.2.2 on MAC OS 10.4.10 . The program strangely segfaults while it is running perfectly in Ubuntu and Windows as well. The gdb stack trace of program is below: LuLu:~/tempd

Re: A JEW hacker in California admits distributing malware that let him steal usernames and passwords for Paypal accounts.

2007-11-12 Thread Danyelle Gragsone
Please 2 stop feeding the trolls.. -- http://mail.python.org/mailman/listinfo/python-list

Define key in nlargest() of heapq?

2007-11-12 Thread Davy
Hi all, I have a dictionary with n elements, and I want to get the m(m<=n) keys with the largest values. For example, I have dic that includes n=4 elements, I want m=2 keys have the largest values) dic = {0:4,3:1,5:2,7:8} So, the the largest values are [8,4], so the keys are [7,0]. How to do thi

Re: Define key in nlargest() of heapq?

2007-11-12 Thread Raymond Hettinger
On Nov 12, 6:56 pm, Davy <[EMAIL PROTECTED]> wrote: > I have a dictionary with n elements, and I want to get the m(m<=n) > keys with the largest values. > > For example, I have dic that includes n=4 elements, I want m=2 keys > have the largest values) > dic = {0:4,3:1,5:2,7:8} > So, the the largest

Re: A JEW hacker in California admits distributing malware that let him steal usernames and passwords for Paypal accounts.

2007-11-12 Thread zionist . news
On Nov 12, 5:39 pm, ChairmanOfTheBored <[EMAIL PROTECTED]> wrote: > On Mon, 12 Nov 2007 22:07:39 -, [EMAIL PROTECTED] wrote: > >On Nov 12, 11:29 am, "radiosrfun" <[EMAIL PROTECTED]> wrote: > > >> It was MUSLIMS who killed close to 3000 people of all races/religions. > > >Where is your proof ???

templatetaizing exceptions

2007-11-12 Thread alf
Hi, I have a few places in the code where I use: try: code_block except A: exception_handling the code block is different each time while exception_handling the same. What would be the best technique to abstract that out? -- A. -- http://mail

Re: persisting data within a module

2007-11-12 Thread [EMAIL PROTECTED]
On Nov 12, 5:30 pm, "Peter J. Bismuti" <[EMAIL PROTECTED]> wrote: > I'm having trouble understanding how namespaces work in modules. I want to > execute a module within the interpreter and then have values that are > calculated persist so that other modules that get executed can retrieve them. >

Re: Override method name and original method access

2007-11-12 Thread Donn Ingle
> You need to be a new-style class (that is, you must inherit from > object) for super() to work. Problem is that my classes inherit already, from others I wrote. So, should I explicitly put (object) into the ones at the top? > Other than that, you are using it > correctly here. Well, even with

Re: 911 was a hoax!

2007-11-12 Thread Shane Geiger
ChairmanOfTheBored, Since a friend of mine found in his WTC dust little iron-rich spheres because I asked him to look for them, I have verification for myself what RJ Lee Group already stated in their report: These iron-rich spheres are characteristic of the WTC dust. This is evidence of tempera

Re: Binary search tree

2007-11-12 Thread Terry Reedy
"Scott SA" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | On 11/12/07, Scott SA ([EMAIL PROTECTED]) wrote: | I decided to test the speeds of the four methods: | |set_example |s = set() |for url in urls: |if not url in s: |s.add(url)

Re: Define key in nlargest() of heapq?

2007-11-12 Thread Davy
Hi Raymond, Your code work well, thank you :) Best regards, Davy On Nov 13, 11:33 am, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > On Nov 12, 6:56 pm, Davy <[EMAIL PROTECTED]> wrote: > > > I have a dictionary with n elements, and I want to get the m(m<=n) > > keys with the largest values. > >

hopping in a list

2007-11-12 Thread Beema shafreen
hi everybody, I have a created list, my code: res_value = [] fh = open('test','r') for line in fh.readlines(): data = line.strip().split('\t') current_span = data[3].strip() probe = data[2].strip() length = data[4].strip() res_value.append(cu

Re: A JEW hacker in California admits distributing malware that let him steal usernames and passwords for Paypal accounts.

2007-11-12 Thread Tonico
On Nov 11, 12:10 am, [EMAIL PROTECTED] wrote: .. As long as you're not a biased, full-of-hatred, antisemite bigot... Regards Tonio -- http://mail.python.org/mailman/listinfo/python-list

PyCon 2008 Call for proposals

2007-11-12 Thread Dougn
Proposals for PyCon 2008 talks & tutorials are now being accepted. The deadline for proposals is November 16. http://pycon.blogspot.com/2007/10/call-for-talk-tutorial-proposals.html PyCon 2008 will be held in Chicago, Illinois, USA, from March 13-20. Tutorial Day: Half-Day Tutorials Do you enjoy

pyopenglcontext binaries for 2.5 on win32

2007-11-12 Thread gz
no, I don't have them... I need them :) I'd like to thank Giovanni Bajo for providing binaries for the various package dependencies, and geting me going with pyopengl. Unfortunately I only menaged to run a basic example, where there's no animation. The glwindow only get's redrawn when it's resize

Can we get rid of unrelated non-python posts?

2007-11-12 Thread Bruce
I joined this to read about python. Please don't respond and move to another list. Thanks! -Bruce -- http://mail.python.org/mailman/listinfo/python-list

2007.comp.lang.python

2007-11-12 Thread ashik
comp.lang.python.com http://www.freewebs.com/thuiss/ http://indianfriendfinder.com/go/g906725-pmem -- http://mail.python.org/mailman/listinfo/python-list

Re: Arrays

2007-11-12 Thread John Machin
Bernard wrote: > On 12 nov, 20:19, "Gordon C" <[EMAIL PROTECTED]> wrote: > > Absolute newbie here. In spite of the Python Software Foundation tutorial's > > (http://www.python.org/doc/current/tut/tut.html) use of the array > > declaration > > array(type[,initializer]), the Python interpreter doe

Concept of God in Islam

2007-11-12 Thread abdo911
WAMY Series: On Islam No.9.Introduction God's Attributes The Oneness of God The Believer's Attitude Introduction It is a known fact that every language has one or more terms that are used in reference to God and sometimes to lesser deities. This is not the case with Allah. Allah is the personal na

Issue with wxPython GUI

2007-11-12 Thread tarun
Hi All, I've a probelm and solution for it to build the preface. Below it is the new problem I'm facing. Can someone help me out? *Problem:* I've have created a GUI (using wxPython widgets) where in I've a message log window (A TextCtrl window). I've a router.dll that helps me putting in message

Re: Issue with wxPython GUI

2007-11-12 Thread Laszlo Nagy
> > *New Problem: *I am opening and executing a script from the GUI. The > script has a many log messages, > which it posts on some shared memory. The GUI reads the messages from > the shared memory, > in the Idle loop. But the script is huge and so the logging is not > run-time. > Rather this

<    1   2