Re: PyChecker under python's virtualenv

2010-02-04 Thread Diez B. Roggisch
Am 04.02.10 01:52, schrieb Steve Holden: Diez B. Roggisch wrote: Am 03.02.10 22:46, schrieb soltys: Hi Everybody, I've been doing some test on pythons' virtualenv and recently I've decided to run PyChecker. But I'm having some difficulties with importing modules available only on virtualenv by

Re: Dreaming of new generation IDE

2010-02-04 Thread purui
> This is obvious even in the Python documentation itself where one > frequently asks oneself "Uhh... so what is parameter X supposed to be... > a string... a list... ?" > That is partially why I created this search engine for python, to see what parameters other people feed in. http://nullege.co

Re: Passing parameters in URL

2010-02-04 Thread Diez B. Roggisch
I'm not sure what you mean by that. Obviously if users want to record their own conversations, then I can't stop them, but that's much different than a non-participant in the conversation leaving a recorder running 24/7. Is that so hard to understand? Is it so hard to understand that this is n

Re: How to guard against bugs like this one?

2010-02-04 Thread Tim Golden
On 03/02/2010 16:17, kj wrote: Boy, that was dumb of me. The above apology was meant for Stephen Hansen, not Steve Holden. I guess this is now a meta-apology... (Sheesh.) You see? That's what I like about the Python community: people even apologise for apologising :) TJG -- http://mail.pytho

Re: test -- please ignore

2010-02-04 Thread tinnews
kj wrote: > In <87wryumvff@benfinney.id.au> Ben Finney > writes: > > >kj writes: > > >> (my replies in a different comp.lang.python thread are getting > >> rejected by the server; i have no problem posting to alt.test; and > >> i'm trying to toubleshoot the problem further.) > > >Thank y

Re: Passing parameters in URL

2010-02-04 Thread John Bokma
Alan Harris-Reid writes: > I have a web-page where each row in a grid has edit/delete buttons to > enable the user to maintain a selected record on another page. The > buttons are in the form of a link with href='/item_edit?id=123', but > this string appears in the URL and gives clues as to how

Re: Passing parameters in URL

2010-02-04 Thread John Bokma
"Diez B. Roggisch" writes: > Am 03.02.10 19:11, schrieb John Bokma: >> Alan Harris-Reid writes: >> >>> I have a web-page where each row in a grid has edit/delete buttons to >>> enable the user to maintain a selected record on another page. The >>> buttons are in the form of a link with href='/i

Re: Passing parameters in URL

2010-02-04 Thread Diez B. Roggisch
Am 03.02.10 19:11, schrieb John Bokma: Alan Harris-Reid writes: I have a web-page where each row in a grid has edit/delete buttons to enable the user to maintain a selected record on another page. The buttons are in the form of a link with href='/item_edit?id=123', but this string appears in

Re: Passing parameters in URL

2010-02-04 Thread Diez B. Roggisch
Am 03.02.10 23:09, schrieb Paul Rubin: "Diez B. Roggisch" writes: Also, your claim of it being more risky is simply nonsense. GET is a tiny bit more prone to tinkering by the average user. But calling this less risky is promoting security by obscurity, at most. GET parameters also tend to get

Re: Passing parameters in URL

2010-02-04 Thread Diez B. Roggisch
Am 04.02.10 00:39, schrieb Paul Rubin: "Diez B. Roggisch" writes: Of course only information not gathered is really safe information. But every operation that has side-effects is reproducable anyway, and if e.g. your chat-app has a history, you can as well log the parameters. No I can't. The

Re: Passing parameters in URL

2010-02-04 Thread Paul Rubin
Alan Harris-Reid writes: > As each link contains row-id, I guess there is nothing to stop someone > from getting the id from the page source-code. Is it safe to use the > above href method if I test for authorised credentials (user/password > stored as session variables, perhaps?) before performi

Re: simple and fast platform independent IPC

2010-02-04 Thread Paul Rubin
News123 writes: > Perhaps I'll stick initially with xmlrpc, as it is quite simple, > though a little heavy. I just have to see how to deal with servers > which are not up, no more up, being restarted. Something wrong wtih nagios? -- http://mail.python.org/mailman/listinfo/python-list

Re: Passing parameters in URL

2010-02-04 Thread Paul Rubin
"Diez B. Roggisch" writes: > Also, your claim of it being more risky is simply nonsense. GET is a > tiny bit more prone to tinkering by the average user. But calling this > less risky is promoting security by obscurity, at most. GET parameters also tend to get recorded in the http logs of web pro

Re: Passing parameters in URL

2010-02-04 Thread Paul Rubin
"Diez B. Roggisch" writes: >> But it would be outrageous for the shop owner to record the >> conversations of patrons. > > Which is the exact thing that happens when you use an email-provider > with IMAP. Or google wave. Or groups. Or facebook. Or twitter. Which I > wouldn't call outrageous. Thos

Re: Overcoming python performance penalty for multicore CPU

2010-02-04 Thread Paul Rubin
John Nagle writes: > Analysis of each domain is > performed in a separate process, but each process uses multiple > threads to read process several web pages simultaneously. > >Some of the threads go compute-bound for a second or two at a time as > they parse web pages. You're probably bett

Re: Overcoming python performance penalty for multicore CPU

2010-02-04 Thread Paul Rubin
John Nagle writes: >There's enough intercommunication between the threads working on > a single site that it's a pain to do them as subprocesses. And I > definitely don't want to launch subprocesses for each page; the > Python load time would be worse than the actual work. The > subprocess mo

Re: test -- please ignore

2010-02-04 Thread kj
In <87wryumvff@benfinney.id.au> Ben Finney writes: >kj writes: >> (my replies in a different comp.lang.python thread are getting >> rejected by the server; i have no problem posting to alt.test; and >> i'm trying to toubleshoot the problem further.) >Thank you for this explanation. It is

Re: Passing parameters in URL

2010-02-04 Thread Diez B. Roggisch
Am 04.02.10 03:52, schrieb Nobody: On Wed, 03 Feb 2010 14:09:07 -0800, Paul Rubin wrote: Also, your claim of it being more risky is simply nonsense. GET is a tiny bit more prone to tinkering by the average user. But calling this less risky is promoting security by obscurity, at most. GET para

Re: Dreaming of new generation IDE

2010-02-04 Thread Vladimir Ignatov
> That is partially why I created this search engine for python, to see > what parameters other people feed in. > http://nullege.com/ Thank you for excellent effort! I found it very useful and start using it on almost everyday basis. It's much simple to learn from real live examples. Vladimir Ign

Re: Passing parameters in URL

2010-02-04 Thread Bruno Desthuilliers
Alan Harris-Reid a écrit : I have a web-page where each row in a grid has edit/delete buttons to enable the user to maintain a selected record on another page. The buttons are in the form of a link with href='/item_edit?id=123', but this string appears in the URL and gives clues as to how to b

Re: Passing parameters in URL

2010-02-04 Thread Paul Rubin
"Diez B. Roggisch" writes: > Your web-based chat uses HTTP, no P2P-protocol, and thus the service > provider *can* log conversations. I don't say he should, I don't say I > want that, I don't say there are now laws that prevent them from doing > so, all I say is he *can*. Sure, my complaint is th

Re: Passing parameters in URL

2010-02-04 Thread Paul Rubin
Bruno Desthuilliers writes: >> The buttons are in the form of a link with href='/item_edit?id=123', > ...At least use "POST" requests for anything that Create/Update/Delete > resources. There's also the issue that a user can change "123" to "125" and possibly mess with someone else's resource, un

Re: Dreaming of new generation IDE

2010-02-04 Thread Vladimir Ignatov
> http://sourceforge.net/mailarchive/message.php?msg_name=9c768dc61001121642t5bd1a7ddmd1fe9e088e1d9...@mail.gmail.com Thanks a lot! That is a great reference (a must read for everybody interested). Reading just this: "Internally at Google we have a language-neutral representation shared by all our

Re: Passing parameters in URL

2010-02-04 Thread Bruno Desthuilliers
Paul Rubin a écrit : Bruno Desthuilliers writes: The buttons are in the form of a link with href='/item_edit?id=123', ...At least use "POST" requests for anything that Create/Update/Delete resources. There's also the issue that a user can change "123" to "125" and possibly mess with someone

Common area of circles

2010-02-04 Thread Shashwat Anand
Given 'n' circles and the co-ordinates of their center, and the radius of all being equal i.e. 'one', How can I take out the intersection of their area. hope the picture makes it clear http://imagebin.us/images/p5qeo7hgc3547pnyrb6.gif -- http://mail.python.org/mailman/listinfo/python-list

Re: Overcoming python performance penalty for multicore CPU

2010-02-04 Thread Anh Hai Trinh
On Feb 4, 10:46 am, John Nagle wrote: > >     There's enough intercommunication between the threads working on > a single site that it's a pain to do them as subprocesses. And I > definitely don't want to launch subprocesses for each page; the > Python load time would be worse than the actual work

learn Sql Server 2000 2005 2008

2010-02-04 Thread groups_ads12
www.sqlserver.learn.net.in sql server sql server 2005 sql server 2008

Building a multiline string

2010-02-04 Thread lallous
Hello Maybe that's already documented, but it seems the parser accepts to build a long string w/o really using the first method: # Method1 x = "line1" + \ # cannot use comments! "line2"+ \ "line3" and instead using a list with one element like this: # Method2 x = [ "line1" # can use comments "l

Re: Common area of circles

2010-02-04 Thread Chris Rebert
On Thu, Feb 4, 2010 at 2:39 AM, Shashwat Anand wrote: > Given 'n' circles and the co-ordinates of their center, and the radius of > all being equal i.e. 'one', How can I take out the intersection of their > area. How is this at all specific to Python? This also sounds suspiciously like homework,

Re: Common area of circles

2010-02-04 Thread Shashwat Anand
I wanted some general suggestion/tips only On Thu, Feb 4, 2010 at 5:11 PM, Chris Rebert wrote: > On Thu, Feb 4, 2010 at 2:39 AM, Shashwat Anand > wrote: > > Given 'n' circles and the co-ordinates of their center, and the radius of > > all being equal i.e. 'one', How can I take out the intersect

Re: Common area of circles

2010-02-04 Thread Xavier Ho
I'm not sure what you're after. Are you after how to calculate the area? Or are you trying to graph it? Or an analytical solution? What do you mean by "take out the intersection"? -Xav On Thu, Feb 4, 2010 at 9:47 PM, Shashwat Anand wrote: > I wanted some general suggestion/tips only > > > On Th

Re: How to guard against bugs like this one?

2010-02-04 Thread Steve Holden
Tim Golden wrote: > On 03/02/2010 16:17, kj wrote: >> Boy, that was dumb of me. The above apology was meant for Stephen >> Hansen, not Steve Holden. I guess this is now a meta-apology... >> (Sheesh.) > > You see? That's what I like about the Python community: > people even apologise for apologis

Re: Common area of circles

2010-02-04 Thread Shashwat Anand
I want to calculate areas. like for two circles (0, 0) and (0, 1) : the output is '1.228370' similarly my aim is to take 'n' co-ordinates, all of radius '1' and calculate the area common to all. The best I got was monte-carlo methods which is inefficient. Is there any other approach possible. On

Re: Passing parameters in URL

2010-02-04 Thread Steve Holden
Paul Rubin wrote: > "Diez B. Roggisch" writes: >>> But it would be outrageous for the shop owner to record the >>> conversations of patrons. >> Which is the exact thing that happens when you use an email-provider >> with IMAP. Or google wave. Or groups. Or facebook. Or twitter. Which I >> wouldn't

Re: Building a multiline string

2010-02-04 Thread Ulrich Eckhardt
Just for the record: Neither of the below methods actually produce a multiline string. They only spread a string containing one line over multiple lines of source code. lallous wrote: > Maybe that's already documented, but it seems the parser accepts to > build a long string w/o really using the f

Re: Common area of circles

2010-02-04 Thread Bearophile
Shashwat Anand: > > Given 'n' circles and the co-ordinates of their center, and the radius of > > all being equal i.e. 'one', How can I take out the intersection of their > > area. I can see two possible solutions, both approximate. In both solutions you first look if there are a pair of circles t

Re: Common area of circles

2010-02-04 Thread Shashwat Anand
I needed 6 decimal places of accuracy, so first way of solution will not work for my case. However, your second strategy seems promising. Working on it. Thanks :D ~l0nwlf On Thu, Feb 4, 2010 at 5:49 PM, Bearophile wrote: > Shashwat Anand: > > > Given 'n' circles and the co-ordinates of their cen

read a process output with subprocess.Popen

2010-02-04 Thread Ashok Prabhu
Hi, I m trying a read the output of a process which is running continuously with subprocess.Popen. However the readline() method hangs for the process to finish. Please let me know if the following code can be made to work with subprocess.Popen with threads or queues. I tried a lot of methods but

Re: Python and Ruby

2010-02-04 Thread Marius Gedminas
On Feb 4, 1:03 am, John Bokma wrote: > Jonathan Gardner writes: > > I can explain all of Python in an hour; > > OK, in that case I would say give it a go. Put it on YouTube, or write a > blog post about it (or post it here). I am sure you will help a lot of > people that way. Someone already did

Re: Building a multiline string

2010-02-04 Thread Steve Holden
lallous wrote: > Hello > > Maybe that's already documented, but it seems the parser accepts to > build a long string w/o really using the first method: > > # Method1 > x = "line1" + \ # cannot use comments! > "line2"+ \ > "line3" > > and instead using a list with one element like this: > > # Me

Re: Repeat an exception

2010-02-04 Thread Jean-Michel Pichavant
MRAB wrote: In other words: for attempt in range(2): try: spanish_field = translate(english_field, lang_to='es', lang_from='en') break except TranslationError: pass else: # Didn't break out of the loop, therefore not successful. print "Translation failed

Re: Building a multiline string

2010-02-04 Thread Marco Mariani
On 02/04/2010 12:34 PM, lallous wrote: > Now should I be using method 2 or 3 in production code? Another way... depending on what you are using the string for, of course. If it's an HTML/XML/SQL/whatever piece of code: from textwrap import dedent sql = dedent(""" > ... SEL

Re: Common area of circles

2010-02-04 Thread Xavier Ho
It's an interesting problem. Never thought it was this difficult. I can't account for all geometrical enumerations, but assuming all 4 circles intersect, here's the solution for this particular senario. It's probably not going to be useful to you since you're working on geometrical approximations n

Re: Common area of circles

2010-02-04 Thread Terry Reedy
On 2/4/2010 7:05 AM, Shashwat Anand wrote: I want to calculate areas. like for two circles (0, 0) and (0, 1) : the output is '1.228370' similarly my aim is to take 'n' co-ordinates, all of radius '1' and calculate the area common to all. The best I got was monte-carlo methods which is inefficien

Re: Common area of circles

2010-02-04 Thread Shashwat Anand
thanks, all of you On Thu, Feb 4, 2010 at 7:31 PM, Terry Reedy wrote: > On 2/4/2010 7:05 AM, Shashwat Anand wrote: > >> I want to calculate areas. >> like for two circles (0, 0) and (0, 1) : the output is '1.228370' >> >> similarly my aim is to take 'n' co-ordinates, all of radius '1' and >> cal

Re: YAML (was: Python and Ruby)

2010-02-04 Thread Lou Pecora
In article <87eil1ddjp.fsf...@castleamber.com>, John Bokma wrote: > Lou Pecora writes: > > > That's a pretty accurate description of how I transitioned to Python > > from C and Fortran. > > Not C, but C++ (but there are also C implementations): YAML, see: > http://code.google.com/p/yaml-cpp/

Re: Python and Ruby

2010-02-04 Thread Lou Pecora
In article <7x8wb9j4r2@ruckus.brouhaha.com>, Paul Rubin wrote: > Lou Pecora writes: > > after much noodling around and reading it hit me that I could just put > > all that output of different types of variables into a list, hit it > > with a repr() function to get a string version, and writ

Re: Problem with __init__.py in Python3.1

2010-02-04 Thread Hidura
Thanks, I read it and try to put my code in the correct form, but now give me another error, inside the Writer Package says: "ValueError: Attempted relative import in non-package", if somebody knows a clue of how fix it i will glad to read opinions. [?] On Thu, Feb 4, 2010 at 2:11 AM, Gabriel Gene

Re: Common area of circles

2010-02-04 Thread Gerard Flanagan
On 2/4/2010 7:05 AM, Shashwat Anand wrote: I want to calculate areas. like for two circles (0, 0) and (0, 1) : the output is '1.228370' similarly my aim is to take 'n' co-ordinates, all of radius '1' and calculate the area common to all. The best I g

Re: Repeat an exception

2010-02-04 Thread MRAB
Jean-Michel Pichavant wrote: MRAB wrote: In other words: for attempt in range(2): try: spanish_field = translate(english_field, lang_to='es', lang_from='en') break except TranslationError: pass else: # Didn't break out of the loop, therefore not successful.

Re: Repeat an exception

2010-02-04 Thread Stephen Hansen
On Thu, Feb 4, 2010 at 4:59 AM, Jean-Michel Pichavant < jeanmic...@sequans.com> wrote: > What the hell is this 'for else' loop !! :D First time I see this statement > for years. > I'd never thought I'd still learn something that basic. > Its one of the least used constructs in Python, I think, an

Re: Common area of circles

2010-02-04 Thread Gary Herron
Gerard Flanagan wrote: On 2/4/2010 7:05 AM, Shashwat Anand wrote: I want to calculate areas. like for two circles (0, 0) and (0, 1) : the output is '1.228370' similarly my aim is to take 'n' co-ordinates, all of radius '1' and calculate the area common

Re: Refreshing of urllib.urlopen()

2010-02-04 Thread Nobody
On Wed, 03 Feb 2010 21:33:08 -0600, Michael Gruenstaeudl wrote: > I am fairly new to Python and need advice on the urllib.urlopen() > function. The website I am trying to open automatically refreshes > after 5 seconds and remains stable thereafter. With > urllib.urlopen().read() I can only r

Re: read a process output with subprocess.Popen

2010-02-04 Thread Nobody
On Thu, 04 Feb 2010 04:28:20 -0800, Ashok Prabhu wrote: > I m trying a read the output of a process which is running > continuously with subprocess.Popen. However the readline() method > hangs for the process to finish. Please let me know if the following > code can be made to work with subprocess

Re: Passing parameters in URL

2010-02-04 Thread John Bokma
"Diez B. Roggisch" writes: > Am 04.02.10 01:42, schrieb John Bokma: [..] >> Maybe you should think about what happens if someone posts: >> http://example.com/item_delete?id=123";> to a popular forum... > > And the difference to posting > > from urrlib2 import open > from urllib import encode >

Re: Common area of circles

2010-02-04 Thread Gerard Flanagan
Gary Herron wrote: Gerard Flanagan wrote: A brute force approach - create a grid of small squares and calculate which squares are in all circles. I don't know whether it is any better than monte-carlo: That's just what the monte-carlo method is -- except the full family of monte-carlo met

Re: Common area of circles

2010-02-04 Thread Dave Angel
Shashwat Anand wrote: I want to calculate areas. like for two circles (0, 0) and (0, 1) : the output is '1.228370' similarly my aim is to take 'n' co-ordinates, all of radius '1' and calculate the area common to all. The best I got was monte-carlo methods which is inefficient. Is there any other

Re: Python and Ruby

2010-02-04 Thread John Bokma
Marius Gedminas writes: > On Feb 4, 1:03 am, John Bokma wrote: >> Jonathan Gardner writes: >> > I can explain all of Python in an hour; >> >> OK, in that case I would say give it a go. Put it on YouTube, or write a >> blog post about it (or post it here). I am sure you will help a lot of >> peo

Re: YAML

2010-02-04 Thread John Bokma
Lou Pecora writes: > In article <87eil1ddjp.fsf...@castleamber.com>, > John Bokma wrote: > >> Lou Pecora writes: >> >> > That's a pretty accurate description of how I transitioned to Python >> > from C and Fortran. >> >> Not C, but C++ (but there are also C implementations): YAML, see: >> h

Re: Passing parameters in URL

2010-02-04 Thread Diez B. Roggisch
Am 04.02.10 18:22, schrieb John Bokma: "Diez B. Roggisch" writes: Am 04.02.10 01:42, schrieb John Bokma: [..] Maybe you should think about what happens if someone posts: http://example.com/item_delete?id=123";> to a popular forum... And the difference to posting from urrlib2 import op

Re: Selenium/SauceLabs OpenSpace at Pycon

2010-02-04 Thread Raymond Hettinger
> >For those who are interested, the Sauce Labs team, > >http://saucelabs.com/about/team, is hosting two free tutorial open > >space sessions at Pycon in Atlanta. [Aahz] > Congrats on the new job! Thanks. I'm really enjoying working with Jim Baker and Frank Wierzbicki. Raymond -- http://mail

Re: Common area of circles

2010-02-04 Thread Mark Dickinson
On 2/4/2010 7:05 AM, Shashwat Anand wrote: > I want to calculate areas. > like for two circles (0, 0) and (0, 1) : the output is '1.228370' > > similarly my aim is to take 'n' co-ordinates, all of radius '1' and > calculate the area common to all. > The best I got was monte-carlo methods which is i

how to run part of my python code as root

2010-02-04 Thread Tomas Pelka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, is there possibility how to run part of my code (function for example) as superuser. Or only way how to do this is create a wrapper and run is with Popen through sudo (but I have to configure sudo to run "whole" python as root). Thanks for advi

Re: Common area of circles

2010-02-04 Thread Shashwat Anand
maximum number of circles = 10**6 runtime <= 5 sec center of circles , -1000<=xi,yi<=1000 (float) [for int it was easier] intersection is there and the area will be non-zero (it can always be checked if intersection is taking place and if no, then area = 0.00) This was a programming contest pro

Re: Problem with __init__.py in Python3.1

2010-02-04 Thread Gabriel Genellina
En Thu, 04 Feb 2010 12:40:41 -0300, Hidura escribió: Thanks, I read it and try to put my code in the correct form, but now give me another error, inside the Writer Package says: "ValueError: Attempted relative import in non-package", if somebody knows a clue of how fix it i will glad to re

Re: Selenium/SauceLabs OpenSpace at Pycon

2010-02-04 Thread Paul Rubin
a...@pythoncraft.com (Aahz) writes: > Raymond Hettinger wrote: >>For those who are interested, the Sauce Labs team, >>http://saucelabs.com/about/team, is hosting two free tutorial open >>space sessions at Pycon in Atlanta. > > Congrats on the new job! Yes, cool! I don't recognize several of the

Re: how to run part of my python code as root

2010-02-04 Thread sjdevn...@yahoo.com
On Feb 4, 2:05 pm, Tomas Pelka wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hey, > > is there possibility how to run part of my code (function for example) > as superuser. > > Or only way how to do this is create a wrapper and run is with Popen > through sudo (but I have to configu

Re: Python and Ruby

2010-02-04 Thread John Bokma
Marius Gedminas writes: > On Feb 4, 1:03 am, John Bokma wrote: >> Jonathan Gardner writes: >> > I can explain all of Python in an hour; >> >> OK, in that case I would say give it a go. Put it on YouTube, or write a >> blog post about it (or post it here). I am sure you will help a lot of >> peo

Re: Python 3 minor irritation

2010-02-04 Thread Gib Bogle
Gabriel Genellina wrote: But the associated program might change the current directory - that's not the case with the default associations created by the Python installer, but one should verify this. To the OP: please create this small test script import os print("curdir=", os.getcwd()) print(

Passing command line argument to program from within IDLE?

2010-02-04 Thread Alan Biddle
Just finishing my first Python (2.6 on Win XP) program, which is working fine. My "Duh?" question is about how to run it from within IDLE and pass it command line arguments. No problem using sys.argv from a Windows command line, but I have missed how you can do that from within IDLE, which compl

Re: Python and Ruby

2010-02-04 Thread Jonathan Gardner
On Feb 3, 3:39 pm, Steve Holden wrote: > Robert Kern wrote: > > On 2010-02-03 15:32 PM, Jonathan Gardner wrote: > > >> I can explain all of Python in an hour; I doubt anyone will understand > >> all of Python in an hour. > > > With all respect, talking about a subject without a reasonable chance o

Re: YAML (was: Python and Ruby)

2010-02-04 Thread Steven D'Aprano
On Thu, 04 Feb 2010 09:57:59 -0500, Lou Pecora wrote: > Well, that looks a bit more complicated than I would like, but maybe > it's doing more stuff than I can grok. Here's what I needed and how I > did it in Python: [...] > # Reading same list in: > instr=fp.readline() > inlist=eval(instr) > x1,

Re: Passing command line argument to program from within IDLE?

2010-02-04 Thread Terry Reedy
On 2/4/2010 3:55 PM, Alan Biddle wrote: Just finishing my first Python (2.6 on Win XP) program, which is working fine. My "Duh?" question is about how to run it from within IDLE and pass it command line arguments. No problem using sys.argv from a Windows command line, but I have missed how you

Re: YAML

2010-02-04 Thread John Bokma
Steven D'Aprano writes: > However, be aware that neither marshal nor pickle guarantees to be safe > against malicious data either. The docs for both warn against using them > on untrusted data. YAML or JSON *might* be safer, I haven't looked. Regarding malicious data, from the Loading YAML sec

Re: Passing command line argument to program from within IDLE?

2010-02-04 Thread Steve Holden
Terry Reedy wrote: > On 2/4/2010 3:55 PM, Alan Biddle wrote: >> Just finishing my first Python (2.6 on Win XP) program, which is >> working fine. My "Duh?" question is about how to run it from within >> IDLE and pass it command line arguments. No problem using sys.argv >> from a Windows command

Re: python admin abuse complaint

2010-02-04 Thread Xah Lee
2010-02-04 Hi Steve, thank you for the reply. I appreciate that you taking this more seriously than normal newsgroups postings. In fact, for this complaint, the response you made is all i asked for. I have a lot things to say about the various political struggle that one sees everyday in just a

xmlrpc slow in windows 7 if hostnames are used

2010-02-04 Thread News123
Hi, I wrote a small xmlrpc client on Windows 7 with python 2.6 srv = xmlrpclib.Server('http://localhost:80') I was able to perform about 1 rpc call per second After changing to srv = xmlrpclib.Server('http://127.0.0.1:80') I was able to perform about 10 to 16 rpc calls per second. So it seem

Re: Problem with __init__.py in Python3.1

2010-02-04 Thread Ben Finney
"Gabriel Genellina" writes: > If you directly run a script from inside a package, Python does not > know that it belongs to a package, and treats it as a simple, lonely > script. In that case, relative imports won't work. Which I consider to be a bug. Fortunately, it's already addressed in PEP 3

Re: Background Zones in Pylab Plot

2010-02-04 Thread Wanderer
On Feb 3, 10:50 pm, CM wrote: > On Feb 3, 10:49 am, Wanderer wrote: > > > I would like to add background zones in pylab plots. Colored sections > > of the background that the curves pass through. Is this possible? My > > google searches don't turn up anything but maybe my search terms > > aren't

Re: Python and Ruby

2010-02-04 Thread Robert Kern
On 2010-02-04 14:55 PM, Jonathan Gardner wrote: On Feb 3, 3:39 pm, Steve Holden wrote: Robert Kern wrote: On 2010-02-03 15:32 PM, Jonathan Gardner wrote: I can explain all of Python in an hour; I doubt anyone will understand all of Python in an hour. With all respect, talking about a sub

Pixel control

2010-02-04 Thread joao abrantes
Hello everyone. For example i am using a screen resolution of 800x600 is it possible to make python control the color of the pixels? For example paint the pixel (100,200) in red! And it would stay red when i am seeing a webpage, a movie, playing a game... etc.. Regards, João Abrantes. -- http://ma

Re: PyQt4 designer custom properties - combo box style

2010-02-04 Thread David Boddie
On Tuesday 02 February 2010 22:25, Andrew wrote: > I am creating custom widgets for the PyQt4 Designer. I can create > custom properties, but I'm looking for how to create a custom property > that has a combo box drop down. I've seen them in the example widgets > and tried following them, but they

Re: python admin abuse complaint

2010-02-04 Thread Steve Holden
Xah Lee wrote: > 2010-02-04 > > Hi Steve, > > thank you for the reply. > > I appreciate that you taking this more seriously than normal > newsgroups postings. In fact, for this complaint, the response you > made is all i asked for. > OK, in that case I won't trouble anyone else about it. > I h

Your beloved python features

2010-02-04 Thread Julian
Hello, I've asked this question at stackoverflow a few weeks ago, and to make it clear: this should NOT be a copy of the stackoverflow-thread "hidden features of Python". I want to design a poster for an open source conference, the local usergroup will have a table there, and in the past years th

Re: Passing command line argument to program from within IDLE?

2010-02-04 Thread Steven D'Aprano
On Thu, 04 Feb 2010 16:28:17 -0500, Steve Holden wrote: > Terry Reedy wrote: >> On 2/4/2010 3:55 PM, Alan Biddle wrote: >>> Just finishing my first Python (2.6 on Win XP) program, which is >>> working fine. My "Duh?" question is about how to run it from within >>> IDLE and pass it command line a

Re: Your beloved python features

2010-02-04 Thread R Fritz
My favorite feature is its readability. It's as near to pseudo-code as any language we have, and that's valuable in open source projects or when I return to code to modify it. -- http://mail.python.org/mailman/listinfo/python-list

Re: Passing command line argument to program from within IDLE?

2010-02-04 Thread Steve Holden
Steven D'Aprano wrote: > On Thu, 04 Feb 2010 16:28:17 -0500, Steve Holden wrote: > >> Terry Reedy wrote: >>> On 2/4/2010 3:55 PM, Alan Biddle wrote: Just finishing my first Python (2.6 on Win XP) program, which is working fine. My "Duh?" question is about how to run it from within

Re: Your beloved python features

2010-02-04 Thread Paul Rubin
Julian writes: > I want to design a poster for an open source conference, the local > usergroup will have a table there, and in the past years there were > some people that came to the python-table just to ask "why should I > use python?". It's terrible, but all the alternatives are even worse. ;

Re: Passing command line argument to program from within IDLE?

2010-02-04 Thread John Bokma
Steven D'Aprano writes: > On Thu, 04 Feb 2010 16:28:17 -0500, Steve Holden wrote: > >> Terry Reedy wrote: >>> On 2/4/2010 3:55 PM, Alan Biddle wrote: Just finishing my first Python (2.6 on Win XP) program, which is working fine. My "Duh?" question is about how to run it from within >>

Re: Passing command line argument to program from within IDLE?

2010-02-04 Thread John Bokma
John Bokma writes: > Steven D'Aprano writes: > >> On Thu, 04 Feb 2010 16:28:17 -0500, Steve Holden wrote: >> >>> Terry Reedy wrote: On 2/4/2010 3:55 PM, Alan Biddle wrote: > Just finishing my first Python (2.6 on Win XP) program, which is > working fine. My "Duh?" question is abou

Re: Python 3 minor irritation

2010-02-04 Thread Gabriel Genellina
En Thu, 04 Feb 2010 17:50:29 -0300, Gib Bogle escribió: Gabriel Genellina wrote: Also, from the command line, execute: D:\temp>reg query HKCR\.py ! REG.EXE VERSION 3.0 HKEY_CLASSES_ROOT\.py REG_SZ Python.File Content TypeREG_SZ text/plain HKEY_CLASSES_ROOT\.py\

Re: Passing command line argument to program from within IDLE?

2010-02-04 Thread Gabriel Genellina
En Thu, 04 Feb 2010 20:46:52 -0300, John Bokma escribió: John Bokma writes: On 2/4/2010 3:55 PM, Alan Biddle wrote: Just finishing my first Python (2.6 on Win XP) program, which is working fine. My "Duh?" question is about how to run it from within IDLE and pass it command line arguments

Re: Code snippet: dualmethod descriptor

2010-02-04 Thread Steven D'Aprano
On Thu, 04 Feb 2010 00:09:02 -0300, Gabriel Genellina wrote: > En Sat, 30 Jan 2010 03:06:18 -0300, Steven D'Aprano > escribió: > >> class dualmethod(object): [...] > Seems useful! > Perhaps a better place to post it would be > , at least it's >

Re: Passing command line argument to program from within IDLE?

2010-02-04 Thread Terry Reedy
On 2/4/2010 6:29 PM, Steve Holden wrote: Steven D'Aprano wrote: On Thu, 04 Feb 2010 16:28:17 -0500, Steve Holden wrote: Terry Reedy wrote: On 2/4/2010 3:55 PM, Alan Biddle wrote: Just finishing my first Python (2.6 on Win XP) program, which is working fine. My "Duh?" question is about how

Re: Your beloved python features

2010-02-04 Thread Terry Reedy
Iterators, and in particular, generators. A killer feature. Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Wrap a function

2010-02-04 Thread Aahz
In article , Dennis Lee Bieber wrote: >On 3 Feb 2010 08:38:47 -0800, a...@pythoncraft.com (Aahz) declaimed the >following in gmane.comp.python.general: >> In article , >> Dennis Lee Bieber wrote: >>> >>> I shall blaspheme, and suggest that maybe the language you want to >>>use is REXX (ooRE

Re: Passing command line argument to program from within IDLE?

2010-02-04 Thread Steve Holden
Gabriel Genellina wrote: > En Thu, 04 Feb 2010 20:46:52 -0300, John Bokma > escribió: >> John Bokma writes: > >> On 2/4/2010 3:55 PM, Alan Biddle wrote: >>> Just finishing my first Python (2.6 on Win XP) program, which is >>> working fine. My "Duh?" question is about how to run it

Re: Python 3 minor irritation

2010-02-04 Thread Gib Bogle
Gabriel Genellina wrote: Sorry, I should have removed that line. This is just my setup; a normal Python install doesn't create that registry entry. It allows Desktop Search (or Windows Search, or whatever it is called nowadays; the F3 key) to search inside .py files (default behavior is to jus

Re: xmlrpc slow in windows 7 if hostnames are used

2010-02-04 Thread Gabriel Genellina
En Thu, 04 Feb 2010 19:34:20 -0300, News123 escribió: I wrote a small xmlrpc client on Windows 7 with python 2.6 srv = xmlrpclib.Server('http://localhost:80') I was able to perform about 1 rpc call per second After changing to srv = xmlrpclib.Server('http://127.0.0.1:80') I was able to per

Re: python admin abuse complaint

2010-02-04 Thread Stephen Thorne
On Feb 5, 8:26 am, Xah Lee wrote: > I appreciate that you taking this more seriously than normal > newsgroups postings. In fact, for this complaint, the response you > made is all i asked for. > > I am taking this as seriously as all the articles you have posted to usenet. Stephen. -- http://m

  1   2   >