Re: Python use growing fast

2011-01-14 Thread rantingrick
On Jan 10, 9:24 pm, Dan Stromberg wrote: > About JavaScript's popularity: > 1) I've been getting the impression that JavaScript is popular in a > manner similar to how x86 machine language is popular: That is, it's > used all over, but few people hand code it (though admittedly, there > are proba

Re: Elliptic Curve Prime factorisation

2011-01-14 Thread mukesh tiwari
On Jan 15, 7:02 am, Steven D'Aprano wrote: > On Fri, 14 Jan 2011 11:52:21 -0800, mukesh tiwari wrote: > > Hello all , I have implemented Elliptic curve prime factorisation using > > wikipedia [ > >http://en.wikipedia.org/wiki/Lenstra_elliptic_curve_factorization]. I > > think that this code is not

Re: Elliptic Curve Prime factorisation

2011-01-14 Thread Dan Stromberg
On Fri, Jan 14, 2011 at 11:52 AM, mukesh tiwari wrote: > Hello all , I have implemented Elliptic curve prime factorisation > using wikipedia [ > http://en.wikipedia.org/wiki/Lenstra_elliptic_curve_factorization]. > I think that this code is not optimised and posting for further > improvement. Fee

Re: Developing a program to make a family tree.

2011-01-14 Thread Tim Harig
On 2011-01-14, Ata Jafari wrote: > I'm trying to develop a program like family tree maker. I have all > information, so there is no need to search on the net. This must be > something like trees. Can someone help me? I'm at the beginning. I don't know anything specific about family tree software

Re: Elliptic Curve Prime factorisation

2011-01-14 Thread Steven D'Aprano
On Fri, 14 Jan 2011 11:52:21 -0800, mukesh tiwari wrote: > Hello all , I have implemented Elliptic curve prime factorisation using > wikipedia [ > http://en.wikipedia.org/wiki/Lenstra_elliptic_curve_factorization]. I > think that this code is not optimised and posting for further > improvement. Fe

Re: python 3 and Unicode line breaking

2011-01-14 Thread Steven D'Aprano
On Fri, 14 Jan 2011 14:26:09 -0800, leoboiko wrote: ... > As for taking the time to provide information, I wonder if there was any > technical problem that prevented you from seeing my reply to Stefan, > sent Jan 14, 12:29PM? Presumably, since I haven't got it in my news client. This is not the

Re: Developing a program to make a family tree.

2011-01-14 Thread Kushal Kumaran
- Original message - > Hi there. > I'm trying to develop a program like family tree maker. I have all > information, so there is no need to search on the net. This must be > something like trees. Can someone help me? I'm at the beginning. > Thanks. > Family trees are nothing like trees, a

Re: Developing a program to make a family tree.

2011-01-14 Thread Billy Earney
try http://gramps-project.org/, which is created in python.. :) On Fri, Jan 14, 2011 at 1:39 PM, Ata Jafari wrote: > Hi there. > I'm trying to develop a program like family tree maker. I have all > information, so there is no need to search on the net. This must be > something like trees. Can so

Re: python 3 and Unicode line breaking

2011-01-14 Thread Antoine Pitrou
On Fri, 14 Jan 2011 06:29:27 -0800 (PST) leoboiko wrote: > > And it generally doesn’t try to pick good places to break lines > at all, just making the assumption that 1 character = 1 column > and that breaking on ASCII whitespaces/hyphens is enough. We > can’t really blame textwrap for that, it

Re: python 3 and Unicode line breaking

2011-01-14 Thread Antoine Pitrou
On 14 Jan 2011 22:10:02 GMT Steven D'Aprano wrote: > > This is good, helpful advice, and far more useful to the OP than just > ignoring his post. You have jumped to his defense (or rather, you have > jumped to criticise me) but I see that you haven't replied to his > question or given him any

Re: Is it possible to let a virtual file created by cStringIO have a filename so that functions can read it by its filename?

2011-01-14 Thread Steven Howe
On 01/14/2011 12:51 PM, Chris Rebert wrote: On Fri, Jan 14, 2011 at 7:52 AM, Cun Zhang wrote: Hi,all I hope use cStringIO to create virtual file, but my customed function which is from a shared library imported by ctypes just accepts a filename(string type) as parameter. So I'm wondering wheth

Re: python 3 and Unicode line breaking

2011-01-14 Thread leoboiko
On Jan 14, 8:10 pm, Steven D'Aprano wrote: > The only other person I can see who has attempted to actually help the OP > is Stefan Behnel, who tried to get more information about the problem > being solved in order to better answer the question. The OP has, so far > as I can see, not responded, al

Re: Tkinter: The good, the bad, and the ugly!

2011-01-14 Thread Zeissmann
> Seriously, get off of WoW and go write some code. If you'd spent the > last year programming instead of doing your best Xah Lee impression you > might have actually made some progress on this. I'm curious, is Xah Lee some sort of a Usenet meme? Cause this is not the first time I see his name in

Re: python 3 and Unicode line breaking

2011-01-14 Thread Steven D'Aprano
On Fri, 14 Jan 2011 20:47:35 +0100, Antoine Pitrou wrote: > You would never have reacted this way if the same question had been > phrased by a regular poster here (let alone on python-dev). Taking cheap > shots at newcomers is certainly not the best way to welcome them. You're absolutely correct.

Re: wx Just Print!

2011-01-14 Thread Miki
I think you need to create a wxApp first. Try adding app = wx.PySimpleApp() at the beginning. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python use growing fast

2011-01-14 Thread John Ladasky
On Jan 10, 1:43 pm, Alice Bevan–McGregor wrote: > On 2011-01-10 13:02:09 -0800, MRAB said: > > Wikipedia is a Wiki; everyone is free to contribute and correct mistakes. > >         - Alice. Except for some of us. I tried to make a correction to a chemistry Wikipedia entry several months back. I

Re: Tkinter: The good, the bad, and the ugly!

2011-01-14 Thread geremy condra
On Wed, Dec 29, 2010 at 5:03 PM, rantingrick wrote: > On Dec 29, 6:41 pm, Gerry Reno wrote: >> Also, what do you think about frameworks such as pyjamas?  It lets you >> write in python and compiles everything down to Javascript so it can be >> used across the Web as well as on the desktop. > > H

do you know what's CGI? (web history personal story)

2011-01-14 Thread Xah Lee
some extempore thought. Do you know what is CGI? Worked with Mathematica for 5 hours yesterday. Fantastic! This old hand can still do something! lol. My plane curve packages soon to be out n am gonna be rich. ...gosh what godly hours i've spend on Mathematica in 1990s. Surprised to find that i e

Re: python 3 and Unicode line breaking

2011-01-14 Thread Colin J. Williams
On 14-Jan-11 14:47 PM, Antoine Pitrou wrote: Hey, On 14 Jan 2011 16:07:12 GMT Steven D'Aprano wrote: I also see no reason to reply to a simple question with such discourtesy, and cannot understand why someone would be so aggressive to a stranger. If you think my reply was aggressive and d

Re: Tkinter: The good, the bad, and the ugly!

2011-01-14 Thread Albert van der Horst
In article , Adam Skutt wrote: > >Replacing TkInter with some sort of minimized wxwidgets is a dumb idea >for some very obvious reasons, reasons that are obvious if you simply >look at a widget gallery and then the applications you run on your own >computer. Quite honestly, if you're not capabl

Re: Is it possible to let a virtual file created by cStringIO have a filename so that functions can read it by its filename?

2011-01-14 Thread Chris Rebert
On Fri, Jan 14, 2011 at 7:52 AM, Cun Zhang wrote: > Hi,all > I hope use cStringIO to create virtual file, but my customed function which > is from a shared library imported by ctypes > just accepts a filename(string type) as parameter. > > So I'm wondering whether there is any method that make the

Re: how to use priority queue with multiprocessing

2011-01-14 Thread Adam Tauno Williams
On Fri, 2011-01-14 at 10:57 -0800, John Nagle wrote: > On 1/13/2011 9:07 AM, Marco Hornung wrote: > I want to run several jobs on a server. The jobs are being sent by > users. However, all jobs have a different priority, and high-priority > jobs should be processed before any low-priority job ge

Re: Developing a program to make a family tree.

2011-01-14 Thread Jon Clements
On Jan 14, 7:39 pm, Ata Jafari wrote: > Hi there. > I'm trying to develop a program like family tree maker. I have all > information, so there is no need to search on the net. This must be > something like trees. Can someone help me? I'm at the beginning. > Thanks. > > -- > Ata J. Tabrizi > atae.t

Elliptic Curve Prime factorisation

2011-01-14 Thread mukesh tiwari
Hello all , I have implemented Elliptic curve prime factorisation using wikipedia [ http://en.wikipedia.org/wiki/Lenstra_elliptic_curve_factorization]. I think that this code is not optimised and posting for further improvement. Feel free to comment and if you have any link regarding Elliptic curv

Re: python 3 and Unicode line breaking

2011-01-14 Thread Antoine Pitrou
Hey, On 14 Jan 2011 16:07:12 GMT Steven D'Aprano wrote: > > > I also see no reason to reply to a simple question with such > > discourtesy, and cannot understand why someone would be so aggressive to > > a stranger. > > If you think my reply was aggressive and discourteous, you've got a lot >

Developing a program to make a family tree.

2011-01-14 Thread Ata Jafari
Hi there. I'm trying to develop a program like family tree maker. I have all information, so there is no need to search on the net. This must be something like trees. Can someone help me? I'm at the beginning. Thanks. -- Ata J. Tabrizi atae.tabr...@metu.edu.tr -- http://mail.python.org/mailman/li

Re: how to use priority queue with multiprocessing

2011-01-14 Thread John Nagle
On 1/13/2011 9:07 AM, Marco Hornung wrote: Hey, -- question -- How can I use a priority queue to schedule jobs wit

Re: unbalanced tree iteration issue

2011-01-14 Thread kost BebiX
14.01.2011, 20:19, "Ian Kelly" : > 2011/1/14 kost BebiX ;: > >>  Well, isn't tree is a root node and it's children? > > And its grandchildren, great-grandchildren, etc.  What Alex is saying > is that the implementation you posted traverses the root and its > immediate children, but does not recur a

Re: unbalanced tree iteration issue

2011-01-14 Thread Ian Kelly
2011/1/14 kost BebiX : > Well, isn't tree is a root node and it's children? And its grandchildren, great-grandchildren, etc. What Alex is saying is that the implementation you posted traverses the root and its immediate children, but does not recur any further than that. That is why it was so fa

Re: unbalanced tree iteration issue

2011-01-14 Thread Ian Kelly
On Fri, Jan 14, 2011 at 11:07 AM, Ian Kelly wrote: > class PostOrderIter(object): > >    def __iter__(self, node): >        self.stack = [(node, 0)] That __iter__ should actually be __init__, of course. -- http://mail.python.org/mailman/listinfo/python-list

Re: unbalanced tree iteration issue

2011-01-14 Thread kost BebiX
14.01.2011, 18:57, "Alex Boyko" : > 2011/1/14 kost BebiX >> 14.01.2011, 14:15, "Alex Boyko" : >> >>> Dear All! >>> >>> I have deal with large unbalanced trees and I have to implement post-order >>> tree traversal. My first attempt is shown below ("Node" and "Tree" classes) >>> and based on recur

Re: unbalanced tree iteration issue

2011-01-14 Thread Ian Kelly
On Fri, Jan 14, 2011 at 5:15 AM, Alex Boyko wrote: > So, I'd like to know how should I implement (if it's possible of course) > __iter__ for my tree class based on recursion without generators? You could try something like this (untested): from itertools import chain, imap ... def postorde

Re: unbalanced tree iteration issue

2011-01-14 Thread Alex Boyko
So I mean, your approach with generators showed good results in terms of time efficiency 'cos iteration was done for root and root's children. On 14 January 2011 18:57, Alex Boyko wrote: > Thank you for your reply, but I have question about your code. Your > defined: > >def post_order(self)

Re: unbalanced tree iteration issue

2011-01-14 Thread Alex Boyko
Thank you for your reply, but I have question about your code. Your defined: def post_order(self): for child in self.childs: yield child yield self just for "Node" , not for "Tree", and do w("doing generator post_order...") _t = datetime.now() for item in roo

Re: python 3 and Unicode line breaking

2011-01-14 Thread Steven D'Aprano
On Fri, 14 Jan 2011 05:06:15 -0800, leoboiko wrote: > Of course I searched for one and couldn’t find; that goes without > saying. Otherwise I wouldn’t even bother writing a message, isn’t it? You wouldn't say that if you had the slightest idea about how many people write to newsgroups and web

Is it possible to let a virtual file created by cStringIO have a filename so that functions can read it by its filename?

2011-01-14 Thread Cun Zhang
Hi,all I hope use cStringIO to create virtual file, but my customed function which is from a shared library imported by ctypes just accepts a filename(string type) as parameter. So I'm wondering whether there is any method that make the virtual file created by cStringIO like a normal file which ha

Re: FTP problem

2011-01-14 Thread Anurag Chourasia
Please make the below change to get past this problem Change *ftp.*indexftp.barcap.com to indexftp.barcap.com Regards, Anurag On Fri, Jan 14, 2011 at 5:25 PM, Thomas Philips wrote: > I'm using ftplib for the first time, and am having trouble getting it > to work. I type > > >>> from ftplib

Re: TestFixtures 1.8.0 Released!

2011-01-14 Thread Jack Keegan
Hi Chris, Thanks for that. I'll give it a go. Cheers, Jack On Fri, Jan 14, 2011 at 2:49 PM, Chris Withers wrote: > Hi Jack, > > > On 14/01/2011 14:39, Jack Keegan wrote: > >> objects. In particular, at the moment, testing some code that needs to >> access hardware IOs using DLLs. I do this usi

Re: TestFixtures 1.8.0 Released!

2011-01-14 Thread Chris Withers
Hi Jack, On 14/01/2011 14:39, Jack Keegan wrote: objects. In particular, at the moment, testing some code that needs to access hardware IOs using DLLs. I do this using Ctypes. However, on my dev machine, I don't have the same hardware so calling the DLL functions will not work as expected. There

Re: TestFixtures 1.8.0 Released!

2011-01-14 Thread Jack Keegan
Appologies, please read the 2nd last line as: Can you give me an indication of how you would go about doing this with TestFixtures? :) Thanks Jack On Fri, Jan 14, 2011 at 2:39 PM, Jack Keegan wrote: > I'm new to python and have just been looking into a solution for Mocking > objects. In partic

Re: TestFixtures 1.8.0 Released!

2011-01-14 Thread Jack Keegan
I'm new to python and have just been looking into a solution for Mocking objects. In particular, at the moment, testing some code that needs to access hardware IOs using DLLs. I do this using Ctypes. However, on my dev machine, I don't have the same hardware so calling the DLL functions will not wo

Re: python 3 and Unicode line breaking

2011-01-14 Thread leoboiko
On Jan 14, 11:48 am, Stefan Behnel wrote: > Sadly, the OP did not clearly state that the required feature > is really not supported by "textwrap" and in what way textwrap > behaves differently. That would have helped in answering. Oh, textwrap doesn’t work for arbitrary Unicode text at all. For

Re: [TIP] TestFixtures 1.8.0 Released!

2011-01-14 Thread Phlip
[ please set the reply-to to testing-in-python@ !] > The package is on PyPI and a full list of all the links to docs, issue > trackers and the like can be found here: > > http://www.simplistix.co.uk/software/python/testfixtures The number one problem with all the test fixture systems I ever audi

Re: python 3 and Unicode line breaking

2011-01-14 Thread Stefan Behnel
Steven D'Aprano, 14.01.2011 01:15: On Thu, 13 Jan 2011 12:45:31 -0800, leoboiko wrote: Is there an equivalent to the textwrap module that knows about the Unicode line breaking algorithm (UAX #14, http://unicode.org/reports/tr14/ )? Is access to Google blocked where you are, or would you just l

Re: python 3 and Unicode line breaking

2011-01-14 Thread Stefan Behnel
leoboiko, 14.01.2011 14:06: Of course I searched for one and couldn’t find; that goes without saying. Otherwise I wouldn’t even bother writing a message, isn’t it? I disagree people should cruft their messages with details about how they failed to find information, as that is unrelated to the q

Re: unbalanced tree iteration issue

2011-01-14 Thread kost BebiX
14.01.2011, 14:17, "Alex Boyko" : > Dear All! > > I have deal with large unbalanced trees and I have to implement post-order > tree traversal. My first attempt is shown below ("Node" and "Tree" classes) > and based on recursive generators approach. > > class Node(): >     def __init__(self,value)

Re: unbalanced tree iteration issue

2011-01-14 Thread kost BebiX
14.01.2011, 14:15, "Alex Boyko" : > Dear All! > > I have deal with large unbalanced trees and I have to implement post-order > tree traversal. My first attempt is shown below ("Node" and "Tree" classes) > and based on recursive generators approach. > > class Node(): >     def __init__(self,value)

Re: unbalanced tree iteration issue

2011-01-14 Thread kost BebiX
14.01.2011, 14:15, "Alex Boyko" : > Dear All! > > I have deal with large unbalanced trees and I have to implement post-order > tree traversal. My first attempt is shown below ("Node" and "Tree" classes) > and based on recursive generators approach. > > class Node(): >     def __init__(self,value)

Re: python 3 and Unicode line breaking

2011-01-14 Thread leoboiko
Of course I searched for one and couldn’t find; that goes without saying. Otherwise I wouldn’t even bother writing a message, isn’t it? I disagree people should cruft their messages with details about how they failed to find information, as that is unrelated to the question at hand and has no poi

TestFixtures 1.8.0 Released!

2011-01-14 Thread Chris Withers
Hi All, I'm very happy to announce the first fully-documented release of TestFixtures, my collection of testing fixtures and helpers that I've been collecting for the last couple of years. Along with my own take on a lot of the common fixtures and helpers, it has some bits that I haven't see

wx Just Print!

2011-01-14 Thread Mark Carter
I'm using Python 2.6.5. I would like to be able to print an RTF file, with no prompts for printers or anything like that. Here's the code so far: import wx.richtext rtp = wx.richtext.RichTextPrinting() rtp.PrintFile('C:\\path\\to\\file.rtf') When I run it, it says: ... assert "(wxThePrintPaperDat

unbalanced tree iteration issue

2011-01-14 Thread Alex Boyko
Dear All! I have deal with large unbalanced trees and I have to implement post-order tree traversal. My first attempt is shown below ("Node" and "Tree" classes) and based on recursive generators approach. class Node(): def __init__(self,value): self.childs = [] self.value = va

Re: FTP problem

2011-01-14 Thread Sudheer Satyanarayana
gaierror: [Errno 11001] getaddrinfo failed That part of the error indicates, your computer is unable to resolve the IP address for the hostname ftp.indexftp.barcap.com Make sure the hostname is valid. -- With warm regards, Sudheer. S Personal home page - http://sudheer.net | Tech Chorus -

Re: FTP problem

2011-01-14 Thread python
Thomas, > ftp = FTP('ftp.indexftp.barcap.com', 'A Valid Username', ' A Valid Password') Your FTP URI is bad. When I try to connect to your site from the Windows FTP client, I get the following response: Unknown host ftp.indexftp.barcap.com. Malcolm -- http://mail.python.org/mailman/listinfo/py

FTP problem

2011-01-14 Thread Thomas Philips
I'm using ftplib for the first time, and am having trouble getting it to work. I type >>> from ftplib import FTP >>> ftp = FTP('ftp.indexftp.barcap.com', 'A Valid Username', ' A Valid >>> Password') where I have suppressed the user name and password, and I get Traceback (most recent call last):

Re: Resolve circular reference

2011-01-14 Thread Hrvoje Niksic
Magnus Lyckå writes: a = X() del a > Deleted <__main__.X instance at 0x00CCCF80> a=X() b=X() a.b=b b.a=a del a gc.collect() > 0 del b gc.collect() > 4 If your method has a __del__ at all, the automatic cyclic collector is disabled. It detects th

Re: Multiple independently started python processes and sharing of a module

2011-01-14 Thread Martin P. Hellwig
On 01/14/11 10:05, Kushal Kumaran wrote: This might help though: https://code.google.com/p/modwsgi/wiki/ProcessesAndThreading It seems if you're not using 'daemon' mode, global data might be shared. Yes I read that thoroughly before I started out implementing a solution. But in my case I want

Re: Multiple independently started python processes and sharing of a module

2011-01-14 Thread Kushal Kumaran
On Fri, Jan 14, 2011 at 1:51 PM, Martin P. Hellwig wrote: > On 01/14/11 03:04, Kushal Kumaran wrote: >> >> - Original message - >>> >>> Hi all, >>> >>> I have the following problem (which I already have a hacked around >>> solution that works but I'd would like some more input on it): >>>

ANNOUNCE: NHI1-0.11, PLMK-2.0 und libmsgque-5.0

2011-01-14 Thread Andreas Otto
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear User, ANNOUNCE:Major Feature Release libmsgque: Application-Server-Toolkit for C, C++, JAVA, C#, Go, TCL, PERL, PHP, PYTHON, RUBY, VB.NET PLMK: Programming-Language-Microkernel NH

how to use priority queue with multiprocessing

2011-01-14 Thread Marco Hornung
Hey, -- question -- How can I use a priority queue to schedule jobs within the "multiprocessing pool" module? -

Re: Multiple independently started python processes and sharing of a module

2011-01-14 Thread Martin P. Hellwig
On 01/14/11 03:04, Kushal Kumaran wrote: - Original message - Hi all, I have the following problem (which I already have a hacked around solution that works but I'd would like some more input on it): I have a situation where multiple python processes are started independently from each