Re: sending through non-default gateway

2011-02-05 Thread Nikola Skoric
Dana Sat, 5 Feb 2011 14:13:11 -0800, Dan Stromberg kaze: > IIRC, this is an instance of what's called "source routing", and was > largely shut off after network admins realized it was a security > issue. > > Of course, if you have root/administrator permission, you could > probably do it. But if

P2PU Python Challenges

2011-02-05 Thread Corey Richardson
In my journeys across the face of the Internet, I found this: http://p2pu.org/general/python-challenges Not sure what it's really going to be, but any new programmers/people looking for something to do might be interested. I'm not quite sure how a class can be organised around a web riddle, but it

Re: Unable to register com component built with python2.7

2011-02-05 Thread sniffer
Stephen thanks for your reply but my python installation directory is in my path any other pointers -- http://mail.python.org/mailman/listinfo/python-list

Fully functioning email client in Python

2011-02-05 Thread iaoua iaoua
Hi all, I'm a complete newbie to this newsgroup and to Python (pretty much) so please be nice and give me a warm welcome. First of all please allow me to properly introduce myself. My name is James Christian and I am a PhD student at the University of Essex in England doing research on Machine Tr

Re: psd estimation no matplotlib

2011-02-05 Thread Corey Richardson
On 02/05/2011 05:19 AM, Jack Yu wrote: > Hi all, > Is there a function psd() for estimating power spectral density that is not > dependent on the importing of matplotlib or pylab [snip] > There is not built into Python, but you could rip the function right out of pylab's or matplotlib's source an

Oktest 0.7.0 released - a new-style testing library

2011-02-05 Thread Makoto Kuwata
I released Oktest 0.7.0. http://pypi.python.org/pypi/Oktest/ http://packages.python.org/Oktest/ Oktest is a new-style testing library for Python. :: from oktest import ok ok (x) > 0 # same as assert_(x > 0) ok (s) == 'foo'# same as assertEqual(s, 'foo')

Re: sending through non-default gateway

2011-02-05 Thread Dan Stromberg
IIRC, this is an instance of what's called "source routing", and was largely shut off after network admins realized it was a security issue. Of course, if you have root/administrator permission, you could probably do it. But if you have that, you could probably just fix the routing table. On Sat

sending through non-default gateway

2011-02-05 Thread Nikola Skoric
Is there a way to create a TCP connection using a gateway of my choice? I have a regular user account on a WinXP machine. It has a DNS server and default gateway configured, and that DNS server and default gateway don't see the rest of the Internet, just the local network. But, I know an IP addres

Re: Guy Steele on Parallel Programing

2011-02-05 Thread Rui Maciel
Xah Lee wrote: > might be interesting. > > 〈Guy Steele on Parallel Programing〉 > http://xahlee.org/comp/Guy_Steele_parallel_computing.html Very interesting. Thanks for the link. Rui Maciel -- http://mail.python.org/mailman/listinfo/python-list

Re: Unable to register com component built with python2.7

2011-02-05 Thread Stephen Hansen
On 2/5/11 2:33 AM, sniffer wrote: > Hi all, > I have built a com component using python2.7 on win 7 but the > component refuses to register ,every time i try to register it says > the specified module could not be found unable to load python.dll ,i > also tried building the same com server with pyt

Re: Create classes at runtnime

2011-02-05 Thread Miki Tebeka
> I need to create a pretty complex class at runtime. You can take the approach that namedtuple does and create a python code for the class as string and then exec it. See http://svn.python.org/view/python/trunk/Lib/collections.py?view=markup HTH, -- Miki http://pythonwise.blogspot.com -- http:

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-05 Thread Robert
On 2011-02-04 13:34:42 -0500, rantingrick said: I don't care who *that* person is as long as *they* are willing to push IDLE forward. I would be honored to accept the reigns and lead OR follow someone else's lead. But we need to receive the old idlefork or have them delete the old idle fork as t

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-05 Thread MRAB
On 05/02/2011 09:44, flebber wrote: On Feb 5, 10:24 am, Stephen Hansen wrote: On 2/4/11 3:01 PM, rantingrick wrote: Put your money where your mouth is. ditto! I thought as much. My money is where my mouth is: but that is not IDLE, as I have no use for it and no interest in it at all. Th

Re: Create classes at runtnime

2011-02-05 Thread Marc Aymerich
On Feb 5, 1:06 pm, Marc Aymerich wrote: > Thank you all for the answers! > > I'll try to give you the context in which I need to generate classes > like this. > > I'm developing a reusable control panel for an ISP. I have several > modules (VirtualUser, SystemUser, VPS, VirtualHost, ...) and they

Re: Init a dictionary with a empty lists

2011-02-05 Thread Daniel Urban
On Sat, Feb 5, 2011 at 15:38, Steven D'Aprano wrote: > On Sat, 05 Feb 2011 14:38:29 +0100, Daniel Urban wrote: > >> On Sat, Feb 5, 2011 at 14:08, Lisa Fritz Barry Griffin >> wrote: >>> Hi there, >>> >>> How can I do this in a one liner: >>> >>>        maxCountPerPhraseWordLength = {} >>>        f

Guy Steele on Parallel Programing

2011-02-05 Thread Xah Lee
might be interesting. 〈Guy Steele on Parallel Programing〉 http://xahlee.org/comp/Guy_Steele_parallel_computing.html -- Guy Steele on Parallel Programing Xah Lee, 2011-02-05 A fascinating talk by the well respected computer scientist Guy Steele. (

Re: Init a dictionary with a empty lists

2011-02-05 Thread Steven D'Aprano
On Sat, 05 Feb 2011 14:38:29 +0100, Daniel Urban wrote: > On Sat, Feb 5, 2011 at 14:08, Lisa Fritz Barry Griffin > wrote: >> Hi there, >> >> How can I do this in a one liner: >> >>        maxCountPerPhraseWordLength = {} >>        for i in range(1,MAX_PHRASES_LENGTH+1): >>            maxCountPerP

Re: code structure advise for a model

2011-02-05 Thread Martin De Kauwe
On Feb 4, 8:41 pm, Marco Nawijn wrote: > On Feb 4, 3:43 am, Martin De Kauwe wrote: > > > > > > > Hi, > > > I am translating some c++ code to python and just wanted to ask some > > advise on structure. The original has everything declared globally and > > nothing passed via function (I assume, but

Re: Init a dictionary with a empty lists

2011-02-05 Thread Vlastimil Brom
2011/2/5 Lisa Fritz Barry Griffin : > Hi there, > > How can I do this in a one liner: > >        maxCountPerPhraseWordLength = {} >        for i in range(1,MAX_PHRASES_LENGTH+1): >            maxCountPerPhraseWordLength[i] = 0 > > Thanks! > -- > http://mail.python.org/mailman/listinfo/python-list >

Re: Init a dictionary with a empty lists

2011-02-05 Thread Peter Otten
Lisa Fritz Barry Griffin wrote: > How can I do this in a one liner: > > maxCountPerPhraseWordLength = {} > for i in range(1,MAX_PHRASES_LENGTH+1): > maxCountPerPhraseWordLength[i] = 0 You can init a dictionary with zeroes with d = dict.fromkeys(range(1, MAX_PHRASES_L

Re: Init a dictionary with a empty lists

2011-02-05 Thread Daniel Urban
On Sat, Feb 5, 2011 at 14:08, Lisa Fritz Barry Griffin wrote: > Hi there, > > How can I do this in a one liner: > >        maxCountPerPhraseWordLength = {} >        for i in range(1,MAX_PHRASES_LENGTH+1): >            maxCountPerPhraseWordLength[i] = 0 maxCountPerPhraseWordLength = {0 for i in ra

Re: Init a dictionary with a empty lists

2011-02-05 Thread Shashwat Anand
On Sat, Feb 5, 2011 at 6:38 PM, Lisa Fritz Barry Griffin < lisaochba...@gmail.com> wrote: > Hi there, > > How can I do this in a one liner: > >maxCountPerPhraseWordLength = {} >for i in range(1,MAX_PHRASES_LENGTH+1): >maxCountPerPhraseWordLength[i] = 0 > maxCountPerPhr

Init a dictionary with a empty lists

2011-02-05 Thread Lisa Fritz Barry Griffin
Hi there, How can I do this in a one liner: maxCountPerPhraseWordLength = {} for i in range(1,MAX_PHRASES_LENGTH+1): maxCountPerPhraseWordLength[i] = 0 Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: itertools.groupby usage to get structured data

2011-02-05 Thread Peter Otten
Slafs wrote: > Hi there! > > I'm having trouble to wrap my brain around this kind of problem: > > What I have : > 1) list of dicts > 2) list of keys that i would like to be my grouping arguments of > elements from 1) > 3) list of keys that i would like do "aggregation" on the elements > of

Re: Create classes at runtnime

2011-02-05 Thread Peter Otten
Carl Banks wrote: > On Feb 4, 1:32 pm, Peter Otten <__pete...@web.de> wrote: >> Marc Aymerich wrote: >> > I need to create a pretty complex class at runtime. something like >> > this one: >> >> I have a hunch that you've never heard the famous Kernighan quote: >> >> "Everyone knows that debugging

Re: Create classes at runtnime

2011-02-05 Thread Marc Aymerich
Thank you all for the answers! I'll try to give you the context in which I need to generate classes like this. I'm developing a reusable control panel for an ISP. I have several modules (VirtualUser, SystemUser, VPS, VirtualHost, ...) and they all share the fact that you can have limits on resour

Re: Use the Source Luke

2011-02-05 Thread Daniel Fetchinson
> For the Python world though, there does seem > to have been a change. A decade ago in this newsgroup, there were > frequent references to standard library source. I don't see that > much anymore. Popularity has a price. A decade ago only hackers were exposed to python who are happy to chat abo

Re: itertools.groupby usage to get structured data

2011-02-05 Thread Slafs
On 5 Lut, 05:58, Paul Rubin wrote: > Slafs writes: > > What i want to have is: > > a "big" nested dictionary with 'g1' values as 1st level keys and a > > dictionary of aggregates and "subgroups" in it > > > I was looking for a solution that would let me do that kind of > > grouping with varia

Unable to register com component built with python2.7

2011-02-05 Thread sniffer
Hi all, I have built a com component using python2.7 on win 7 but the component refuses to register ,every time i try to register it says the specified module could not be found unable to load python.dll ,i also tried building the same com server with python2.7 again on a win- xp system but to no

psd estimation no matplotlib

2011-02-05 Thread Jack Yu
Hi all, Is there a function psd() for estimating power spectral density that is not dependent on the importing of matplotlib or pylab, like there is numpy.linalg.svd() to pylab.svd(). I would like to run some codes which estimate psd on the computing nodes on a cluster, but the system administrato

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-05 Thread flebber
On Feb 5, 10:24 am, Stephen Hansen wrote: > On 2/4/11 3:01 PM, rantingrick wrote: > > >> Put your money where your mouth is. > > > ditto! > > I thought as much. > > My money is where my mouth is: but that is not IDLE, as I have no use > for it and no interest in it at all. The status quo with rega

Re: python crash problem

2011-02-05 Thread John Machin
On Feb 3, 8:21 am, Terry Reedy wrote: > On 2/2/2011 2:19 PM, Yelena wrote: > . > > When having a problem with a 3rd party module, not part of the stdlib, > you should give a source. >    http://sourceforge.net/projects/dbfpy/ > This appears to be a compiled extension. Nearly always, when Python >