Selenium/SauceLabs Open Space Session at Pycon in Atlanta

2010-02-04 Thread Raymond Hettinger
The Sauce Labs team, http://saucelabs.com/about/team, is hosting two free tutorial open space sessions at Pycon in Atlanta. In the short session, people bringing their laptops should be able to record a web session in their browser, convert the recorded activity to a Python script, modify the

Python-URL! - weekly Python news and links (Feb 3)

2010-02-04 Thread Gabriel Genellina
QOTW: I think, in the spirit of the topic, they should hold it at both places at the same time. - Brian Blais, on whether the Python Concurrency Workshop, v2.0, should be in Chicago or Denver (in January!) The fastest way to consume an iterable until exhaustion:

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.com/

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

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 --

Re: test -- please ignore

2010-02-04 Thread tinnews
kj no.em...@please.post wrote: In 87wryumvff@benfinney.id.au Ben Finney ben+pyt...@benfinney.id.au writes: kj no.em...@please.post 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

Re: Passing parameters in URL

2010-02-04 Thread John Bokma
Alan Harris-Reid a...@baselinedata.co.uk 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

Re: Passing parameters in URL

2010-02-04 Thread John Bokma
Diez B. Roggisch de...@nospam.web.de writes: Am 03.02.10 19:11, schrieb John Bokma: Alan Harris-Reida...@baselinedata.co.uk 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

Re: Passing parameters in URL

2010-02-04 Thread Diez B. Roggisch
Am 03.02.10 19:11, schrieb John Bokma: Alan Harris-Reida...@baselinedata.co.uk 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

Re: Passing parameters in URL

2010-02-04 Thread Diez B. Roggisch
Am 03.02.10 23:09, schrieb Paul Rubin: Diez B. Roggischde...@nospam.web.de 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

Re: Passing parameters in URL

2010-02-04 Thread Diez B. Roggisch
Am 04.02.10 00:39, schrieb Paul Rubin: Diez B. Roggischde...@nospam.web.de 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.

Re: Passing parameters in URL

2010-02-04 Thread Paul Rubin
Alan Harris-Reid a...@baselinedata.co.uk 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,

Re: simple and fast platform independent IPC

2010-02-04 Thread Paul Rubin
News123 news...@free.fr 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? --

Re: Passing parameters in URL

2010-02-04 Thread Paul Rubin
Diez B. Roggisch de...@nospam.web.de 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

Re: Passing parameters in URL

2010-02-04 Thread Paul Rubin
Diez B. Roggisch de...@nospam.web.de 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

Re: Overcoming python performance penalty for multicore CPU

2010-02-04 Thread Paul Rubin
John Nagle na...@animats.com 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

Re: Overcoming python performance penalty for multicore CPU

2010-02-04 Thread Paul Rubin
John Nagle na...@animats.com 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

Re: test -- please ignore

2010-02-04 Thread kj
In 87wryumvff@benfinney.id.au Ben Finney ben+pyt...@benfinney.id.au writes: kj no.em...@please.post 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.)

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

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

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

Re: Passing parameters in URL

2010-02-04 Thread Paul Rubin
Diez B. Roggisch de...@nospam.web.de 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

Re: Passing parameters in URL

2010-02-04 Thread Paul Rubin
Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid 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

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 bruno.42.desthuilli...@websiteburo.invalid 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

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 na...@animats.com 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

learn Sql Server 2000 2005 2008

2010-02-04 Thread groups_ads12
www.sqlserver.learn.net.in http://www.sqlserver.learn.net.in/ sql server http://www.sqlserver.learn.net.in/videos/index.php?search=sql+server sql server 2005 http://www.sqlserver.learn.net.in/videos/index.php?search=sql+server+20\ 05 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 line2

Re: Common area of circles

2010-02-04 Thread Chris Rebert
On Thu, Feb 4, 2010 at 2:39 AM, Shashwat Anand anand.shash...@gmail.com 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

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 c...@rebertia.com wrote: On Thu, Feb 4, 2010 at 2:39 AM, Shashwat Anand anand.shash...@gmail.com wrote: Given 'n' circles and the co-ordinates of their center, and the radius of all being equal i.e.

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 anand.shash...@gmail.comwrote: I wanted some general

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 apologising :)

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 de...@nospam.web.de 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

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

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 that

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 bearophileh...@lycos.com wrote: Shashwat Anand: Given 'n' circles and the

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 j...@castleamber.com wrote: Jonathan Gardner jgard...@jonathangardner.net 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

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: # Method2 x = [

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( ... SELECT * ...

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

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

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 tjre...@udel.edu 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

Re: YAML (was: Python and Ruby)

2010-02-04 Thread Lou Pecora
In article 87eil1ddjp.fsf...@castleamber.com, John Bokma j...@castleamber.com wrote: Lou Pecora pec...@anvil.nrl.navy.mil 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:

Re: Python and Ruby

2010-02-04 Thread Lou Pecora
In article 7x8wb9j4r2@ruckus.brouhaha.com, Paul Rubin no.em...@nospam.invalid wrote: Lou Pecora pec...@anvil.nrl.navy.mil 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()

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

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

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

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, and

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 read

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

Re: Passing parameters in URL

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

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

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

Re: Python and Ruby

2010-02-04 Thread John Bokma
Marius Gedminas mged...@gmail.com writes: On Feb 4, 1:03 am, John Bokma j...@castleamber.com wrote: Jonathan Gardner jgard...@jonathangardner.net 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

Re: YAML

2010-02-04 Thread John Bokma
Lou Pecora pec...@anvil.nrl.navy.mil writes: In article 87eil1ddjp.fsf...@castleamber.com, John Bokma j...@castleamber.com wrote: Lou Pecora pec...@anvil.nrl.navy.mil writes: That's a pretty accurate description of how I transitioned to Python from C and Fortran. Not C, but C++

Re: Passing parameters in URL

2010-02-04 Thread Diez B. Roggisch
Am 04.02.10 18:22, schrieb John Bokma: Diez B. Roggischde...@nospam.web.de writes: Am 04.02.10 01:42, schrieb John Bokma: [..] Maybe you should think about what happens if someone posts: img src=http://example.com/item_delete?id=123; to a popular forum... And the difference to posting

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 --

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

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

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

Re: Problem with __init__.py in Python3.1

2010-02-04 Thread Gabriel Genellina
En Thu, 04 Feb 2010 12:40:41 -0300, Hidura hid...@gmail.com 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

Re: Selenium/SauceLabs OpenSpace at Pycon

2010-02-04 Thread Paul Rubin
a...@pythoncraft.com (Aahz) writes: Raymond Hettinger pyt...@rcn.com 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

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 tompe...@gmail.com 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

Re: Python and Ruby

2010-02-04 Thread John Bokma
Marius Gedminas mged...@gmail.com writes: On Feb 4, 1:03 am, John Bokma j...@castleamber.com wrote: Jonathan Gardner jgard...@jonathangardner.net 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

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())

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

Re: Python and Ruby

2010-02-04 Thread Jonathan Gardner
On Feb 3, 3:39 pm, Steve Holden st...@holdenweb.com 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

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)

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 st...@remove-this-cybersource.com.au 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

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 line, but

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

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

Re: Problem with __init__.py in Python3.1

2010-02-04 Thread Ben Finney
Gabriel Genellina gagsl-...@yahoo.com.ar 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

Re: Background Zones in Pylab Plot

2010-02-04 Thread Wanderer
On Feb 3, 10:50 pm, CM cmpyt...@gmail.com wrote: On Feb 3, 10:49 am, Wanderer wande...@dialup4less.com 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

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 Holdenst...@holdenweb.com 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,

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. --

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 have a lot

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

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 arguments. No

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 IDLE and pass it

Re: Your beloved python features

2010-02-04 Thread Paul Rubin
Julian maili...@julianmoritz.de 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

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

2010-02-04 Thread John Bokma
Steven D'Aprano st...@remove-this-cybersource.com.au 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

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

2010-02-04 Thread John Bokma
John Bokma j...@castleamber.com writes: Steven D'Aprano st...@remove-this-cybersource.com.au 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

Re: Python 3 minor irritation

2010-02-04 Thread Gabriel Genellina
En Thu, 04 Feb 2010 17:50:29 -0300, Gib Bogle g.bo...@auckland.no.spam.ac.nz escribió: Gabriel Genellina wrote: Also, from the command line, execute: D:\tempreg query HKCR\.py ! REG.EXE VERSION 3.0 HKEY_CLASSES_ROOT\.py Sin nombreREG_SZ Python.File Content Type

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 j...@castleamber.com escribió: John Bokma j...@castleamber.com 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

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 st...@remove-this-cybersource.com.au escribió: class dualmethod(object): [...] Seems useful! Perhaps a better place to post it would be

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 mailman.1885.1265261952.28905.python-l...@python.org, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On 3 Feb 2010 08:38:47 -0800, a...@pythoncraft.com (Aahz) declaimed the following in gmane.comp.python.general: In article mailman.1585.1264743912.28905.python-l...@python.org, Dennis

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 j...@castleamber.com escribió: John Bokma j...@castleamber.com 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

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

  1   2   >