Re: confusion with decorators

2013-01-30 Thread Steven D'Aprano
On Wed, 30 Jan 2013 19:34:03 -0500, Jason Swails wrote: > Hello, > > I was having some trouble understanding decorators and inheritance and > all that. This is what I was trying to do: > > # untested > class A(object): >def _protector_decorator(fcn): > def newfcn(self, *args, **kwarg

Re: pyrudp

2013-01-30 Thread wrw
On Jan 30, 2013, at 7:14 PM, Chris Angelico wrote: > On Thu, Jan 31, 2013 at 11:04 AM, Jorge Alberto Diaz Orozco > wrote: >> I have restrictions in my system that does not allow me to use TCP, so I >> want to make a pipe over UDP imitating TCP behavior. >> I have control over both endpoints, an

Re: looping versus comprehension

2013-01-30 Thread Steven D'Aprano
On Thu, 31 Jan 2013 02:49:31 +1100, Chris Angelico wrote: > it's worth > noting that list appending is not going to be O(N*N), because it's going > to allow room for expansion. This is true for list.append, which is amortized constant time. But it is not true for list addition, alist + blist, wh

Re: pyrudp

2013-01-30 Thread Chris Angelico
On Thu, Jan 31, 2013 at 3:26 PM, wrote: > Now, the good news is that because UDP-based protocols all run in user memory > space (as opposed to TCP that runs privileged in kernel space) it is > relatively straightforward for non-privledged users to write and test UDP > transport schemes and thi

Re: help

2013-01-30 Thread Dave Angel
On 01/30/2013 04:16 PM, aramilda...@gmail.com wrote: Hi everyone! I don't mean to intrude, but ive heard great things about this group and ive stumped myself with my python code. heres my code: #! /usr/bin/python import sys global labelList labelList= dict() global counter counter = 0 def e

Re: help

2013-01-30 Thread Steven D'Aprano
aramilda...@gmail.com wrote: > its giving me a bunch of errors thanks for the help in advance! Yay! Guessing games! I love guessing games! Let me see if I can guess the errors you have... /usr/bin/python: bad interpreter: No such file or directory You haven't actually got Python installed, or a

Re: security quirk

2013-01-30 Thread Arne Vajhøj
On 1/29/2013 11:55 PM, RichD wrote: I read Wall Street Journal, and occasionally check articles on their Web site. It's mostly free, with some items available to subscribers only. It seems random, which ones they block, about 20%. Anywho, sometimes I use their search utility, the usual author

Re: security quirk

2013-01-30 Thread alex23
On Jan 31, 5:39 am, RichD wrote: > well yeah, but what's going on, under the hood? > How does it get confused?  How could this > happen?  I'm looking for some insight, regarding a > hypothetical programmimg glitch - As has been stated, this has nothing to do with Python, so please stop posting yo

Re: confusion with decorators

2013-01-30 Thread Dave Angel
On 01/30/2013 07:34 PM, Jason Swails wrote: Hello, I was having some trouble understanding decorators and inheritance and all that. This is what I was trying to do: # untested class A(object): def _protector_decorator(fcn): def newfcn(self, *args, **kwargs): return fcn(sel

confusion with decorators

2013-01-30 Thread Jason Swails
Hello, I was having some trouble understanding decorators and inheritance and all that. This is what I was trying to do: # untested class A(object): def _protector_decorator(fcn): def newfcn(self, *args, **kwargs): return fcn(self, *args, **kwargs) return newfcn @_pro

Re: pyrudp

2013-01-30 Thread Chris Angelico
On Thu, Jan 31, 2013 at 11:04 AM, Jorge Alberto Diaz Orozco wrote: > I have restrictions in my system that does not allow me to use TCP, so I want > to make a pipe over UDP imitating TCP behavior. > I have control over both endpoints, and I´m writing both of them. > I just don´t want to re-invent

Re: pyrudp

2013-01-30 Thread Jorge Alberto Diaz Orozco
I have restrictions in my system that does not allow me to use TCP, so I want to make a pipe over UDP imitating TCP behavior. I have control over both endpoints, and I´m writing both of them. I just don´t want to re-invent the wheel and I´m looking for a reliable UDP sockets implementation for Py

Re: security quirk

2013-01-30 Thread Auric__
Martin Musatov wrote: > On Jan 29, 8:55 pm, RichD wrote: >> I read Wall Street Journal, and occasionally check > [snip] > > Ignoring the big ol' unneccessary crosspost... What the fuck? -- Oooh, I just learned a new euphemism. -- http://mail.python.org/mailman/listinfo/python-list

Re: pyrudp

2013-01-30 Thread Chris Angelico
On Thu, Jan 31, 2013 at 6:55 AM, Jorge Alberto Diaz Orozco wrote: > I want to use a reliable UDP connection like you say, a TCP like connection > but over UDP. thaks for your recomendation, if I get good results I promise > to share them. To get something reliable over UDP, you're going to need

Re: help

2013-01-30 Thread Chris Angelico
On Thu, Jan 31, 2013 at 8:16 AM, wrote: > Hi everyone! I don't mean to intrude, but ive heard great things about this > group and ive stumped myself with my python code. Hi! As others have said, this is no intrusion, but it'd help a lot if you posted your errors and used a more useful subject l

Re: A new script which creates Python 3.3 venvs with Distribute and pip installed in them

2013-01-30 Thread Vinay Sajip
Ian Kelly gmail.com> writes: > > I have a shell script for this: > Sure - there's a similar one at https://gist.github.com/4591655 The main purpose of the script was to illustrate how to subclass venv.EnvBuilder, and I've added it as an example to the 3.3 and in-development documentation:

Re: pyrudp

2013-01-30 Thread Dave Angel
On 01/30/2013 02:55 PM, Jorge Alberto Diaz Orozco wrote: I want to use a reliable UDP connection like you say, a TCP like connection but over UDP. thaks for your recomendation, if I get good results I promise to share them. It's nice to "want" but what is your actual condition/problem? Are

Re: help

2013-01-30 Thread Joel Goldstick
On Wed, Jan 30, 2013 at 4:16 PM, wrote: > Hi everyone! I don't mean to intrude, but ive heard great things about > this group and ive stumped myself with my python code. > No intrusion. That is what the list is for. Two points: You should use a descriptive subject line -- "Help" isn't really

Re: help

2013-01-30 Thread Ian Kelly
On Wed, Jan 30, 2013 at 2:16 PM, wrote: > Hi everyone! I don't mean to intrude, but ive heard great things about this > group and ive stumped myself with my python code. > > heres my code: It would be helpful if you would also include the error that you get when trying to run the code. > globa

help

2013-01-30 Thread aramildaern
Hi everyone! I don't mean to intrude, but ive heard great things about this group and ive stumped myself with my python code. heres my code: #! /usr/bin/python import sys global labelList labelList= dict() global counter counter = 0 def execute(line): if line.find("::print") != -1:

Re: pyrudp

2013-01-30 Thread garabik-news-2005-05
Jorge Alberto Diaz Orozco wrote: > I want to use a reliable UDP connection like you say, a TCP like > connection but over UDP. thaks for your recomendation, if I get good > results I promise to share them. > utalk (long since disappeared from the surface of the internet) did have such an implemen

Re: A new script which creates Python 3.3 venvs with Distribute and pip installed in them

2013-01-30 Thread Ian Kelly
On Wed, Jan 30, 2013 at 1:09 PM, Vinay Sajip wrote: > Python 3.3 includes a script, pyvenv, which is used to create virtual > environments. However, Distribute and pip are not installed in such > environments - because, though they are popular, they are third-party > packages - not part of Pyth

Re: derived class name in python 2.6/2.7

2013-01-30 Thread Dave Angel
On 01/30/2013 03:05 PM, Sells, Fred wrote: This is simple, but I just cannot find it after quite a bit of searching I have this basic design class A: def __init__(self): print 'I am an instance of ', self.__class__.name class B(A): pass X = B I would like thi

Re: derived class name in python 2.6/2.7

2013-01-30 Thread Oscar Benjamin
On 30 January 2013 20:05, Sells, Fred wrote: > This is simple, but I just cannot find it after quite a bit of searching > > I have this basic design > > class A: > def __init__(self): > print 'I am an instance of ', self.__class__.name Did you mean to use __name__ instead

A new script which creates Python 3.3 venvs with Distribute and pip installed in them

2013-01-30 Thread Vinay Sajip
Python 3.3 includes a script, pyvenv, which is used to create virtual environments. However, Distribute and pip are not installed in such environments - because, though they are popular, they are third-party packages - not part of Python. The Python 3.3 venv machinery allows customisation of vi

derived class name in python 2.6/2.7

2013-01-30 Thread Sells, Fred
This is simple, but I just cannot find it after quite a bit of searching I have this basic design class A: def __init__(self): print 'I am an instance of ', self.__class__.name class B(A): pass X = B I would like this to print "I am an instance of B" but I kee

Re: security quirk

2013-01-30 Thread Big Bad Bob
On 01/29/13 20:55, RichD so wittily quipped: I read Wall Street Journal, and occasionally check articles on their Web site. It's mostly free, with some items available to subscribers only. It seems random, which ones they block, about 20%. Anywho, sometimes I use their search utility, the usua

Re: how to use subprocess to execute an exe with args and an output

2013-01-30 Thread Terry Reedy
On 1/30/2013 1:11 PM, MRAB wrote: On 2013-01-30 17:15, noydb wrote: I am looking for some guidance on using subprocess to execute an EXE with arguments and an output. The below code works in that it returns a 0 exit code, but no output file is created. I have tried a few different versions of

Re: pyrudp

2013-01-30 Thread Jorge Alberto Diaz Orozco
I want to use a reliable UDP connection like you say, a TCP like connection but over UDP. thaks for your recomendation, if I get good results I promise to share them. - Original Message - From: "Michael Torrie" To: python-list@python.org Sent: Wednesday, January 30, 2013 9:16:15 AM Subj

Re: security quirk

2013-01-30 Thread Joel Goldstick
On Wed, Jan 30, 2013 at 2:39 PM, RichD wrote: > On Jan 30, Gandalf Parker > wrote: > > > Web gurus, what's going on? > > > > That is the fault of the site itself. > > If they are going to block access to users then they should also block > > access to the automated spiders that hit the site to

Re: security quirk

2013-01-30 Thread RichD
On Jan 30, Gandalf Parker wrote: > > Web gurus, what's going on? > > That is the fault of the site itself. > If they are going to block access to users then they should also block > access to the automated spiders that hit the site to collect data. well yeah, but what's going on, under the hood?

Re: how to use subprocess to execute an exe with args and an output

2013-01-30 Thread noydb
oh DUH! that was it, just missing the -F. Thank-you!! -- http://mail.python.org/mailman/listinfo/python-list

Re: how to use subprocess to execute an exe with args and an output

2013-01-30 Thread MRAB
On 2013-01-30 17:15, noydb wrote: I am looking for some guidance on using subprocess to execute an EXE with arguments and an output. The below code works in that it returns a 0 exit code, but no output file is created. I have tried a few different versions of this code (used Popen instead, s

Re: pyrudp

2013-01-30 Thread Rob Day
Have you seen http://pyraknet.slowchop.com/? It appears to do a similar thing. On 30 January 2013 17:02, Jorge Alberto Diaz Orozco wrote: > I´ve tried it but it´s not reliable. Datagrams can arive disorganised or just > not arive. > Some programmers said I most use TCP, but I need to use UDP. >

Re: looping versus comprehension

2013-01-30 Thread Robin Becker
On 30/01/2013 15:49, Chris Angelico wrote: On Thu, Jan 31, 2013 at 1:58 AM, Robin Becker wrote: however, when I tried an experiment in python 2.7 using the script below I find that the looping algorithms perform better. A naive loop using list += list would appear to be an O(n**2) operation, bu

Re: how to use subprocess to execute an exe with args and an output

2013-01-30 Thread Chris Rebert
On Wed, Jan 30, 2013 at 9:15 AM, noydb wrote: > I am looking for some guidance on using subprocess to execute an EXE with > arguments and an output. The below code works in that it returns a 0 exit > code, but no output file is created. I have tried a few different versions > of this code (us

Re: how to use subprocess to execute an exe with args and an output

2013-01-30 Thread noydb
To add on, I need to eventually write a script that takes input, feeds it into this exe, and takes the output file to perform more 'tools'/manipulations on it. Is call or Popen called for, why? Or maybe some other module??? -- http://mail.python.org/mailman/listinfo/python-list

how to use subprocess to execute an exe with args and an output

2013-01-30 Thread noydb
I am looking for some guidance on using subprocess to execute an EXE with arguments and an output. The below code works in that it returns a 0 exit code, but no output file is created. I have tried a few different versions of this code (used Popen instead, some stderr/stdout), but no luck. Ca

Re: pyrudp

2013-01-30 Thread Michael Torrie
On 01/30/2013 10:02 AM, Jorge Alberto Diaz Orozco wrote: > I´ve tried it but it´s not reliable. Datagrams can arive disorganised or just > not arive. > Some programmers said I most use TCP, but I need to use UDP. > that´s why I need pyrudp, but I can not find it. Excuse me for chuckling, but your

Re: pyrudp

2013-01-30 Thread Jorge Alberto Diaz Orozco
I´ve tried it but it´s not reliable. Datagrams can arive disorganised or just not arive. Some programmers said I most use TCP, but I need to use UDP. that´s why I need pyrudp, but I can not find it. On Jan 30, 2013, at 8:12 AM, Jorge Alberto Diaz Orozco What about the native socket call to SOCK_

Re: looping versus comprehension

2013-01-30 Thread Chris Angelico
On Thu, Jan 31, 2013 at 1:58 AM, Robin Becker wrote: > however, when I tried an experiment in python 2.7 using the script below I > find that the looping algorithms perform better. A naive loop using list += > list would appear to be an O(n**2) operation, but python seems to be doing > better than

looping versus comprehension

2013-01-30 Thread Robin Becker
An email in reportlab-us...@reportlab.com claimed that the following loop in a charting module was taking a long time I use ReportLab 2.6 but I also found the problem in ReportLab daily from 01/29/2013 in /src/reportlab/graphics/charts/lineplots.py: 276 # Iterate over data columns. 277 if se

Re: security quirk

2013-01-30 Thread Gandalf Parker
RichD contributed wisdom to news:b968c6c6-5aa9- 4584-bd7a-5b097f17c...@pu9g2000pbc.googlegroups.com: > Web gurus, what's going on? > That is the fault of the site itself. If they are going to block access to users then they should also block access to the automated spiders that hit the site t

Re: security quirk

2013-01-30 Thread Martin Musatov
On Jan 29, 8:55 pm, RichD wrote: > I read Wall Street Journal, and occasionally check 00commentBegin 01comment 02commentEnd 03 04 (); Open

Re: Reading data from 2 different files and writing to a single file

2013-01-30 Thread inshu chauhan
On Wed, Jan 30, 2013 at 2:23 PM, Dave Angel wrote: > On 01/30/2013 05:43 AM, inshu chauhan wrote: > >> On Mon, Jan 28, 2013 at 6:05 PM, Dennis Lee Bieber > >wrote: >> >> On Mon, 28 Jan 2013 14:31:31 +0100, inshu chauhan >>> declaimed the following in >>> gmane.comp.python.general: >>> >>> In t

Re: pyrudp

2013-01-30 Thread Rodrick Brown
On Jan 30, 2013, at 8:12 AM, Jorge Alberto Diaz Orozco wrote: > can someone give me a link to download pyrudp. > I tried here http://code.google.com/p/pyrudp/ but didn´t worked. > > if someone can give me another idea it will be great to. > I´m traying to make a reliable udp connection What abou

Re: GeoBases: data services and visualization

2013-01-30 Thread guil . genet
Le mercredi 30 janvier 2013 14:28:46 UTC+1, guil@gmail.com a écrit : > Le mardi 29 janvier 2013 22:25:39 UTC+1, Alex Prengere a écrit : > This new > project provides tools to play with geographical data. It also works with > non-geographical data, except for map visualizations :). There are e

Re: GeoBases: data services and visualization

2013-01-30 Thread guil . genet
Le mardi 29 janvier 2013 22:25:39 UTC+1, Alex Prengere a écrit : > This new project provides tools to play with geographical data. It also works > with non-geographical data, except for map visualizations :). There are > embedded data sources in the project, but you can easily play with your own

Re: Reading data from 2 different files and writing to a single file

2013-01-30 Thread Dave Angel
On 01/30/2013 05:43 AM, inshu chauhan wrote: On Mon, Jan 28, 2013 at 6:05 PM, Dennis Lee Bieber wrote: On Mon, 28 Jan 2013 14:31:31 +0100, inshu chauhan declaimed the following in gmane.comp.python.general: In the code below I am trying to read 2 files f1 and f2 , extract some data from th

pyrudp

2013-01-30 Thread Jorge Alberto Diaz Orozco
can someone give me a link to download pyrudp. I tried here http://code.google.com/p/pyrudp/ but didn´t worked. if someone can give me another idea it will be great to. I´m traying to make a reliable udp connection help will be really appreciated -- http://mail.python.org/mailman/listinfo/py

Sorting a hierarchical table (SQL)

2013-01-30 Thread Frank Millman
Hi all This is not really a python question, but I am hoping that some of you can offer some suggestions. I have a SQL table with hierarchical data. There are two models that can be used to represent this - Adjacency Lists and Nested Sets. Here is a link to an article that discusses and comp

Re: Reading data from 2 different files and writing to a single file

2013-01-30 Thread Chris Angelico
On Wed, Jan 30, 2013 at 9:43 PM, inshu chauhan wrote: > I actually dont want nested loops but cant find another way to achieve what > I want, But for these files I am sure that they have equal lengths, thats > why I am taking the risk of using nested loops.. Can you suggest any > different way to

Re: Reading data from 2 different files and writing to a single file

2013-01-30 Thread inshu chauhan
On Mon, Jan 28, 2013 at 6:05 PM, Dennis Lee Bieber wrote: > On Mon, 28 Jan 2013 14:31:31 +0100, inshu chauhan > declaimed the following in > gmane.comp.python.general: > > > In the code below I am trying to read 2 files f1 and f2 , extract some > data > > from them and then trying to write them i

Re: Fonts & Tinker

2013-01-30 Thread Angel
THis one workd fine: .option_add('*Font', "Heveltica 14") Thanks! Á. -- http://mail.python.org/mailman/listinfo/python-list

Re: Ways to apply while learning....

2013-01-30 Thread Ritchie Flick
It's perfectly normal that you need to look things up, even the most seasoned programmer has to look up something at some point. Finding small projects is often difficult, because many projects grow to such an extent, that they're simply to difficult to grasp for a beginner and even for an experie

Re: Please provide a better explanation of tuples and dictionaries

2013-01-30 Thread rusi
On Jan 30, 7:55 am, "Daniel W. Rouse Jr." wrote: > Or, can an anyone provide an example of > more than a three-line example of a tuple or dictionary? Have you seen this byt the creator of python -- GvR? http://www.python.org/doc/essays/graphs.html > I have recently started learning Python (2.7.3