SQLObject 0.13.0

2010-08-11 Thread Oleg Broytman
Hello! I'm pleased to announce version 0.13.0, the first stable release of branch 0.13 of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be

Re: GUI automation tool (windows)

2010-08-11 Thread Grant Edwards
On 2010-08-11, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message mailman.1936.1281496277.1673.python-l...@python.org, Robert Kern wrote: On 2010-08-10 21:57 , Lawrence D'Oliveiro wrote: In message abe9b308-db83-4ca8-a71a-12d2025a7...@i31g2000yqm.googlegroups.com, Alex

Re: GUI automation tool (windows)

2010-08-11 Thread Grant Edwards
On 2010-08-11, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message i3t449$7c...@reader1.panix.com, Grant Edwards wrote: Automated GUI intended to uncover problems in the underlying program functionality ... That ???underlying??? functionality has nothing to do with the

Re: python interview quuestions

2010-08-11 Thread Terry Reedy
On 8/10/2010 8:08 PM, Roy Smith wrote: In any case, if the candidate were to submit somebody else's work, it would come out pretty quickly as we discussed their code. I suppose one question I might ask would be, Can you explain why, when I copy-paste one of your comments into a google search

Re: Why is python not written in C++ ?

2010-08-11 Thread Ulrich Eckhardt
Martin v. Loewis wrote: Am 10.08.2010 09:06, schrieb Ulrich Eckhardt: When asked on the developers' list, it was said that this was intended for compatibility with C++, e.g. in cases where people want to embed Python into their C++ projects. Of course, this contradicts Christian's statement

Re: GUI automation tool (windows)

2010-08-11 Thread Lawrence D'Oliveiro
In message i3teqh$ck...@reader1.panix.com, Grant Edwards wrote: ... nobody's talking about using automated testing to figure out what users think. That’s the trouble. What’s the point of a GUI, then? -- http://mail.python.org/mailman/listinfo/python-list

Access lotus notes using Python 2.5.1

2010-08-11 Thread Girish
Hello All, I am trying to send email using Lotos notes. When I run following commands to establish a COM connection, Python crashes with a error saying Runtime Error.Pythonwin.exe abnormal termination. import win32com.client session = win32com.client.Dispatch('Lotus.NotesSession') Any help

Line-by-line processing when stdin is not a tty

2010-08-11 Thread RG
When stdin is not a tty, Python seems to buffer all the input through EOF before processing any of it: [...@mickey:~]$ cat | python print 123 print 456 hit ctrl-D here 123 456 Is there a way to get Python to process input line-by-line the way it does when stdin is a TTY even when stdin is not

Re: File Manager in Tkinter

2010-08-11 Thread Eric Brunel
In article 770366ta10gk98vgd5n2tapl7ag6ska...@4ax.com, John wrote: My python is version 2.6.5. Would you recomend I upgrade and if yes to which version? from tkinter import ttk Traceback (most recent call last): File pyshell#0, line 1, in module from tkinter import ttk

Re: GUI automation tool (windows)

2010-08-11 Thread Ben Finney
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: In message i3teqh$ck...@reader1.panix.com, Grant Edwards wrote: ... nobody's talking about using automated testing to figure out what users think. That’s the trouble. What’s the point of a GUI, then? I've no idea what you're

Re: freeze function calls

2010-08-11 Thread Santiago Caracol
Peter, thanks again for all this code. You helped me a lot. Didn't you say you weren't interested in the web specific aspects? I thought that, although my problem had to do with client-server stuff, it wasn't really web-specific. But now I think that that was part of my problem. I failed to

Re: Line-by-line processing when stdin is not a tty

2010-08-11 Thread Tim Harig
On 2010-08-11, RG rnospa...@flownet.com wrote: When stdin is not a tty, Python seems to buffer all the input through EOF before processing any of it: [...@mickey:~]$ cat | python print 123 print 456 hit ctrl-D here 123 456 Is there a way to get Python to process input line-by-line the

Re: Line-by-line processing when stdin is not a tty

2010-08-11 Thread Cameron Simpson
On 11Aug2010 00:11, RG rnospa...@flownet.com wrote: | When stdin is not a tty, Python seems to buffer all the input through | EOF before processing any of it: | | [...@mickey:~]$ cat | python | print 123 | print 456 hit ctrl-D here | 123 | 456 | | Is there a way to get Python to process input

Re: GUI automation tool (windows)

2010-08-11 Thread Jean-Michel Pichavant
Grant Edwards wrote: On 2010-08-11, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message abe9b308-db83-4ca8-a71a-12d2025a7...@i31g2000yqm.googlegroups.com, Alex Barna wrote: On Aug 10, 10:05 am, Lawrence D'Oliveiro Can???t understand the point to it.

Re: Replace and inserting strings within .txt files with the use of regex

2010-08-11 Thread Νίκος
On 10 Αύγ, 18:12, MRAB pyt...@mrabarnett.plus.com wrote: Νίκος wrote: [snip] The ID number of each php page was contained in the old php code within this string PageID = some_number So instead of create a new ID number for eaqch page i have to pull out this number to store to

Re: Line-by-line processing when stdin is not a tty

2010-08-11 Thread Wolfgang Rohdewald
On Mittwoch 11 August 2010, Cameron Simpson wrote: Usually you either need an option on the upstream program to tell it to line buffer explicitly once cat had an option -u doing exactly that but nowadays -u seems to be ignored http://www.opengroup.org/onlinepubs/009695399/utilities/cat.html

Re: GUI automation tool (windows)

2010-08-11 Thread Steven D'Aprano
On Wed, 11 Aug 2010 18:50:15 +1200, Lawrence D'Oliveiro wrote: In message i3teqh$ck...@reader1.panix.com, Grant Edwards wrote: ... nobody's talking about using automated testing to figure out what users think. That’s the trouble. What’s the point of a GUI, then? Are you trolling, or do

Re: Line-by-line processing when stdin is not a tty

2010-08-11 Thread Tim Harig
On 2010-08-11, Wolfgang Rohdewald wolfg...@rohdewald.de wrote: On Mittwoch 11 August 2010, Cameron Simpson wrote: Usually you either need an option on the upstream program to tell it to line buffer explicitly once cat had an option -u doing exactly that but nowadays -u seems to be ignored

Re: python interview quuestions

2010-08-11 Thread Tim Chase
On 08/11/10 01:24, Terry Reedy wrote: On 8/10/2010 8:08 PM, Roy Smith wrote: In any case, if the candidate were to submit somebody else's work, it would come out pretty quickly as we discussed their code. I suppose one question I might ask would be, Can you explain why, when I copy-paste one

regex to remove lines made of only whitespace

2010-08-11 Thread Chris Withers
Hi All, I'm looking for a regex (or other solution, as long as it's quick!) that could be used to strip out lines made up entirely of whitespace. eg: 'x\n \t \n\ny' - 'x\ny' Does anyone have one handy? cheers, Chris -- Simplistix - Content Management, Batch Processing Python Consulting

RE: regex to remove lines made of only whitespace

2010-08-11 Thread Andreas Tawn
Hi All, I'm looking for a regex (or other solution, as long as it's quick!) that could be used to strip out lines made up entirely of whitespace. eg: 'x\n \t \n\ny' - 'x\ny' Does anyone have one handy? cheers, Chris for line in lines: if not line.strip(): continue

Re: GUI automation tool (windows)

2010-08-11 Thread Steven D'Aprano
On Wed, 11 Aug 2010 06:12:49 +, Grant Edwards wrote: Automating a GUI isn't done to test how well the GUI works for real users. Or to put it another way... automated tests aren't useful for usability testing, regardless of whether one is testing a GUI app or a CLI app. It's done mainly

Re: regex to remove lines made of only whitespace

2010-08-11 Thread Tim Chase
On 08/11/10 06:21, Andreas Tawn wrote: I'm looking for a regex (or other solution, as long as it's quick!) that could be used to strip out lines made up entirely of whitespace. eg: 'x\n \t \n\ny' - 'x\ny' for line in lines: if not line.strip(): continue doStuff(line)

Re: regex to remove lines made of only whitespace

2010-08-11 Thread Steven D'Aprano
On Wed, 11 Aug 2010 12:13:29 +0100, Chris Withers wrote: Hi All, I'm looking for a regex (or other solution, as long as it's quick!) that could be used to strip out lines made up entirely of whitespace. def strip_blank_lines(lines): for line in lines: if not line.isspace():

Re: type enforcement in _ssl.sslwrap

2010-08-11 Thread Steven D'Aprano
On Tue, 10 Aug 2010 10:40:54 -0700, Eric Snow wrote: ssl.SSLSocket.__init__ makes a call to _ssl.sslwrap (in the C module). That in turn makes a call to PyArg_ParseTuple, which casts the first arg of _ssl.sslwrap into a PySocketModule.Sock_Type object. My problem is that I am trying to

RE: regex to remove lines made of only whitespace

2010-08-11 Thread Andreas Tawn
On 08/11/10 06:21, Andreas Tawn wrote: I'm looking for a regex (or other solution, as long as it's quick!) that could be used to strip out lines made up entirely of whitespace. eg: 'x\n \t \n\ny' - 'x\ny' for line in lines: if not line.strip(): continue

Re: Access lotus notes using Python 2.5.1

2010-08-11 Thread Michel Claveau - MVP
Hi! In several cases, Notes is not registred as COM server. Depending of installation. @-salutations -- MCi -- http://mail.python.org/mailman/listinfo/python-list

Re: urgent requirement at Hyderabad

2010-08-11 Thread Stefan Behnel
In case anyone wondered: Hyderabad is likely referring to some place in Asia: http://en.wikipedia.org/wiki/Hyderabad_%28disambiguation%29 Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: Line-by-line processing when stdin is not a tty

2010-08-11 Thread Cameron Simpson
On 11Aug2010 10:32, Tim Harig user...@ilthio.net wrote: | On 2010-08-11, Wolfgang Rohdewald wolfg...@rohdewald.de wrote: | On Mittwoch 11 August 2010, Cameron Simpson wrote: | Usually you either | need an option on the upstream program to tell it to line | buffer explicitly | | once cat had

Re: python interview quuestions

2010-08-11 Thread Steven D'Aprano
On Tue, 10 Aug 2010 16:44:17 -0400, J Kenneth King wrote: Fizzbuzz is annoying in interviews. It's not for the benefit of the interviewee, but for the interviewer. I've never worked at a job where I was under a timer while a group of people sat across from me and scrutinized everything I

Re: Line-by-line processing when stdin is not a tty

2010-08-11 Thread Tim Harig
On 2010-08-11, Cameron Simpson c...@zip.com.au wrote: On 11Aug2010 10:32, Tim Harig user...@ilthio.net wrote: | On 2010-08-11, Wolfgang Rohdewald wolfg...@rohdewald.de wrote: | On Mittwoch 11 August 2010, Cameron Simpson wrote: | Usually you either | need an option on the upstream program to

Re: GUI automation tool (windows)

2010-08-11 Thread Tim Harig
On 2010-08-11, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: Mouse and keyboard event recording software used to be one of the killer apps for power users back in the days of classic Apple Mac and early versions of Windows. I'm not entirely sure why they've faded away... it It

Re: python interview quuestions

2010-08-11 Thread Roy Smith
In article 4c6298c1$0$11101$c3e8...@news.astraweb.com, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: Sounds ridiculous, but apparently there are vast hordes of people who can barely program Hello World applying for programming jobs. One figure bandied about -- how accurately,

Re: python interview quuestions

2010-08-11 Thread Ben Finney
Tim Chase python.l...@tim.thechases.com writes: Unfortunately there are candidates who would give your answer but then have trouble with Then why are the Last-Modified HTTP headers showing a date several months before our interview? My response: “Ha! That's a trick question; ‘Last-Modified’

Re: Why is python not written in C++ ?

2010-08-11 Thread sturlamolden
On 11 Aug, 08:40, Ulrich Eckhardt eckha...@satorlaser.com wrote: That's true, maybe I don't remember the exact rationale. Especially if even someone like you, who is much deeper into Python development, doesn't, I'm wondering if I'm misremembering something Header (definition) and source

Re: GUI automation tool (windows)

2010-08-11 Thread Grant Edwards
On 2010-08-11, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message i3teqh$ck...@reader1.panix.com, Grant Edwards wrote: ... nobody's talking about using automated testing to figure out what users think. That???s the trouble. What???s the point of a GUI, then? OK, now

Re: Line-by-line processing when stdin is not a tty

2010-08-11 Thread Grant Edwards
On 2010-08-11, Tim Harig user...@ilthio.net wrote: On 2010-08-11, RG rnospa...@flownet.com wrote: When stdin is not a tty, Python seems to buffer all the input through EOF before processing any of it: [...@mickey:~]$ cat | python print 123 print 456 hit ctrl-D here 123 456 Is there a

Re: Line-by-line processing when stdin is not a tty

2010-08-11 Thread Peter Otten
Grant Edwards wrote: On 2010-08-11, Tim Harig user...@ilthio.net wrote: On 2010-08-11, RG rnospa...@flownet.com wrote: When stdin is not a tty, Python seems to buffer all the input through EOF before processing any of it: [...@mickey:~]$ cat | python print 123 print 456 hit ctrl-D here

Re: Line-by-line processing when stdin is not a tty

2010-08-11 Thread Grant Edwards
On 2010-08-11, Peter Otten __pete...@web.de wrote: Grant Edwards wrote: If you want to handle stdin a single line at a time from inside of your program, you can access it using sys.stdin.readline(). That doesn't have any effect on stdin buffering. for line in stream-style file iteration

mysqldb - parameter issue

2010-08-11 Thread bruce
hi... using python v2.6, using the mysqldb lib the test tbl looks like: DROP TABLE IF EXISTS `functionError_TBL`; CREATE TABLE `functionError_TBL` ( `parentFunction` varchar(100) NOT NULL default '', `currentFunction` varchar(100) NOT NULL default '', `parentFunctionID` int(10) NOT NULL

How to swallow traceback message

2010-08-11 Thread Back9
Hi, I run my py app to display a file's contents, and it is normally very long. So I use it like below: python myapp.py input_file | more to see them step by step. But when I try to exit it, normally I use Ctrl+ C key to quit it. Problem is every time I do like it, it shows Traceback message

SQLObject 0.13.0

2010-08-11 Thread Oleg Broytman
Hello! I'm pleased to announce version 0.13.0, the first stable release of branch 0.13 of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be

Re: How to swallow traceback message

2010-08-11 Thread Tim Harig
On 2010-08-11, Back9 backgoo...@gmail.com wrote: python myapp.py input_file | more to see them step by step. But when I try to exit it, normally I use Ctrl+ C key to quit it. Problem is every time I do like it, it shows Traceback message and it makes my app not professional. You have three

Re: urgent requirement at Hyderabad

2010-08-11 Thread Chris Withers
sushma wrote: We are looking for Python Developers/programmers with 1+ years of experience. Send resume to sush...@millenniumsoft.com So urgent you can't even be bothered to describe the job or post the advert in the correct place on the python job board. Good luck with that ;-) Chris

Re: How to swallow traceback message

2010-08-11 Thread Eknath Venkataramani
See Exception Handling http://docs.python.org/library/exceptions.html On Wed, Aug 11, 2010 at 11:09 AM, Back9 backgoo...@gmail.com wrote: Hi, I run my py app to display a file's contents, and it is normally very long. So I use it like below: python myapp.py input_file | more to see them

Re: How to swallow traceback message

2010-08-11 Thread Jean-Michel Pichavant
Back9 wrote: Hi, I run my py app to display a file's contents, and it is normally very long. So I use it like below: python myapp.py input_file | more to see them step by step. But when I try to exit it, normally I use Ctrl+ C key to quit it. Problem is every time I do like it, it shows

Re: How to swallow traceback message

2010-08-11 Thread Back9
On Aug 11, 11:19 am, Tim Harig user...@ilthio.net wrote: On 2010-08-11, Back9 backgoo...@gmail.com wrote: python myapp.py input_file | more to see them step by step. But when I try to exit it, normally I use Ctrl+ C key to quit it. Problem is every time I do like it, it shows Traceback

Re: How to swallow traceback message

2010-08-11 Thread Michael Torrie
On 08/11/2010 09:32 AM, Back9 wrote: I should have mentioned that I already use try/except KeyboardInterrupt statement. But it does not seem to work as I expected. If you want anyone to help further, you will need to say a) what you are expecting it to do and b) what it is actually doing. --

Re: regex to remove lines made of only whitespace

2010-08-11 Thread Chris Withers
Steven D'Aprano wrote: def strip_blank_lines(lines): for line in lines: if not line.isspace(): yield line text = ''.join(strip_blank_lines(lines.split('\n'))) The final version I have is: def strip_blank_lines(text): result = [] for line in text.split('\n'):

Confused: Newbie Function Calls

2010-08-11 Thread fuglyducky
I am a complete newbie to Python (and programming in general) and I have no idea what I'm missing. Below is a script that I am trying to work with and I cannot get it to work. When I call the final print function, nothing prints. However, if I print within the individual functions, I get the

Re: type enforcement in _ssl.sslwrap

2010-08-11 Thread Eric Snow
On Aug 11, 5:34 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Tue, 10 Aug 2010 10:40:54 -0700, Eric Snow wrote: ssl.SSLSocket.__init__ makes a call to _ssl.sslwrap (in the C module). That in turn makes a call to PyArg_ParseTuple, which casts the first arg of

Is ElementTree development still active?

2010-08-11 Thread Pinku Surana
I checked the svn repo at effbot.org, but it appears to have no updates since 2007. Has development moved elsewhere? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Confused: Newbie Function Calls

2010-08-11 Thread Michael Torrie
On 08/11/2010 10:07 AM, fuglyducky wrote: I am a complete newbie to Python (and programming in general) and I have no idea what I'm missing. Below is a script that I am trying to work with and I cannot get it to work. When I call the final print function, nothing prints. However, if I print

Re: Confused: Newbie Function Calls

2010-08-11 Thread Robert Kern
On 8/11/10 11:07 AM, fuglyducky wrote: I am a complete newbie to Python (and programming in general) and I have no idea what I'm missing. Below is a script that I am trying to work with and I cannot get it to work. When I call the final print function, nothing prints. However, if I print within

Re: Confused: Newbie Function Calls

2010-08-11 Thread Pinku Surana
On Aug 11, 12:07 pm, fuglyducky fuglydu...@gmail.com wrote: I am a complete newbie to Python (and programming in general) and I have no idea what I'm missing. Below is a script that I am trying to work with and I cannot get it to work. When I call the final print function, nothing prints.

Re: Confused: Newbie Function Calls

2010-08-11 Thread EW
This will work: sample_string= def gen_header(sample_string=): HEADER = mymultilinestringhere sample_string+= HEADER return sample_string def gen_nia(sample_string=): NIA =

Re: Confused: Newbie Function Calls

2010-08-11 Thread fuglyducky
On Aug 11, 9:31 am, Pinku Surana sura...@gmail.com wrote: On Aug 11, 12:07 pm, fuglyducky fuglydu...@gmail.com wrote: I am a complete newbie to Python (and programming in general) and I have no idea what I'm missing. Below is a script that I am trying to work with and I cannot get it to

Re: Confused: Newbie Function Calls

2010-08-11 Thread Wieland Hoffmann
On 11.08.2010 18:07, fuglyducky wrote: Am I missing something??? Thanks in advance Assign the returned value of your functions to something (like sample_string) and it will work: # Global variable sample_string = def

Re: Confused: Newbie Function Calls

2010-08-11 Thread Jean-Michel Pichavant
fuglyducky wrote: I am a complete newbie to Python (and programming in general) and I have no idea what I'm missing. Below is a script that I am trying to work with and I cannot get it to work. When I call the final print function, nothing prints. However, if I print within the individual

Queue cleanup

2010-08-11 Thread EW
Hi I'm writing a multithreaded app that relies on Queues to move data between the threads. I'm trying to write my objects in a general way so that I can reuse them in the future so I need to write them in such a way that I don't know how many producer and how many consumer threads I might need.

Re: Confused: Newbie Function Calls

2010-08-11 Thread EW
On Aug 11, 12:39 pm, fuglyducky fuglydu...@gmail.com wrote: On Aug 11, 9:31 am, Pinku Surana sura...@gmail.com wrote: On Aug 11, 12:07 pm, fuglyducky fuglydu...@gmail.com wrote: I am a complete newbie to Python (and programming in general) and I have no idea what I'm missing. Below

Re: Line-by-line processing when stdin is not a tty

2010-08-11 Thread RG
In article mailman.1941.1281519759.1673.python-l...@python.org, Cameron Simpson c...@zip.com.au wrote: On 11Aug2010 00:11, RG rnospa...@flownet.com wrote: | When stdin is not a tty, Python seems to buffer all the input through | EOF before processing any of it: | | [...@mickey:~]$ cat |

Re: Queue cleanup

2010-08-11 Thread EW
On Aug 11, 12:55 pm, EW ericwoodwo...@gmail.com wrote: Hi I'm writing a multithreaded app that relies on Queues to move data between the threads.  I'm trying to write my objects in a general way so that I can reuse them in the future so I need to write them in such a way that I don't know

Re: Line-by-line processing when stdin is not a tty

2010-08-11 Thread RG
In article i3ud8e$p9e$0...@news.t-online.com, Peter Otten __pete...@web.de wrote: Grant Edwards wrote: On 2010-08-11, Tim Harig user...@ilthio.net wrote: On 2010-08-11, RG rnospa...@flownet.com wrote: When stdin is not a tty, Python seems to buffer all the input through EOF before

Re: Confused: Newbie Function Calls

2010-08-11 Thread Dave Angel
fuglyducky wrote: I am a complete newbie to Python (and programming in general) and I have no idea what I'm missing. Below is a script that I am trying to work with and I cannot get it to work. When I call the final print function, nothing prints. However, if I print within the individual

Re: Queue cleanup

2010-08-11 Thread Paul Rubin
EW ericwoodwo...@gmail.com writes: I also might have different consumer threads do different tasks (for example one might write to a log and one might write to SQL) so that again means I can't plan for a set ratio of consumers to producers So it's unknown. So this means that instead of

Re: mysqldb - parameter issue

2010-08-11 Thread bruce
hey dennis... umm.. given that i'm building the ins var/string to insert into the execute... i can't just place the triple quotes around it.. are you saying that the execute should have quotes placed around it within the execute so it would be something like execute(\+sel\... or are you saying

Re: Queue cleanup

2010-08-11 Thread EW
On Aug 11, 1:18 pm, Paul Rubin no.em...@nospam.invalid wrote: EW ericwoodwo...@gmail.com writes: I also might have different consumer threads do different tasks (for example one might write to a log and one might write to SQL) so that again means I can't plan for a set ratio of consumers

Re: Confused: Newbie Function Calls

2010-08-11 Thread Terry Reedy
Rather than patch your code, I think you should see a better approach. from textwrap import dedent # removes common whitespace prefix lines = [] def add_header(ss): Add header to sequence of string lines ss.append(dedent(\ # No initial blank line my multi-line string here

Re: Is ElementTree development still active?

2010-08-11 Thread Terry Reedy
On 8/11/2010 12:21 PM, Pinku Surana wrote: I checked the svn repo at effbot.org, but it appears to have no updates since 2007. Has development moved elsewhere? It is now in the stdlib (19.11) as xml.etree.ElementTree

Re: Queue cleanup

2010-08-11 Thread MRAB
EW wrote: [snip] So here the P2 thread has ended and gone away but I still have his Queue lingering. So on a thread I can use is_alive() to check status and use join() to clean up but I don't see any analogous functionality for Queues. How do I kill them? I thought about putting a suicide

Re: Line-by-line processing when stdin is not a tty

2010-08-11 Thread Tim Harig
On 2010-08-11, RG rnospa...@flownet.com wrote: I'm writing a system in a different language but want to use a Python library. I know of lots of ways to do this (embed a Python interpreter, fire up a python server) but by far the easiest to implement is to have the main program spawn a

Re: Queue cleanup

2010-08-11 Thread EW
On Aug 11, 1:55 pm, MRAB pyt...@mrabarnett.plus.com wrote: EW wrote: [snip] So here the P2 thread has ended and gone away but I still have his Queue lingering. So on a thread I can use is_alive() to check status and use join() to clean up but I don't see any analogous functionality

Re: How to swallow traceback message

2010-08-11 Thread Tim Harig
On 2010-08-11, Back9 backgoo...@gmail.com wrote: On Aug 11, 11:19 am, Tim Harig user...@ilthio.net wrote: On 2010-08-11, Back9 backgoo...@gmail.com wrote: But when I try to exit it, normally I use Ctrl+ C key to quit it. Problem is every time I do like it, it shows Traceback message and it

Re: Queue cleanup

2010-08-11 Thread Paul Rubin
EW ericwoodwo...@gmail.com writes: I thought about doing it that way and I could do it that way but it still seems like there should be a way to clean up Queues on my own. If I did it this way then I guess I'd be relying on garbage collection when the script ended to clean up the Queues for

Is there a Python equivalent to Perl's File::Listing::parse_dir

2010-08-11 Thread John Nagle
Perl has a function which will take a remote directory page, in the form that most web sites return for a file directory, and parse it into a useful form: http://www.xav.com/perl/site/lib/File/Listing.html This is especially useful for FTP sites. Is there a Python equivalent of this?

Re: How to swallow traceback message

2010-08-11 Thread Peter Otten
Back9 wrote: I run my py app to display a file's contents, and it is normally very long. So I use it like below: python myapp.py input_file | more to see them step by step. But when I try to exit it, normally I use Ctrl+ C key to quit it. Problem is every time I do like it, it shows

Re: Line-by-line processing when stdin is not a tty

2010-08-11 Thread RG
In article i3uo7t$6m...@speranza.aioe.org, Tim Harig user...@ilthio.net wrote: On 2010-08-11, RG rnospa...@flownet.com wrote: I'm writing a system in a different language but want to use a Python library. I know of lots of ways to do this (embed a Python interpreter, fire up a python

Re: Queue cleanup

2010-08-11 Thread EW
On Aug 11, 2:16 pm, Paul Rubin no.em...@nospam.invalid wrote: EW ericwoodwo...@gmail.com writes: I thought about doing it that way and I could do it that way but it still seems like there should be a way to clean up Queues on my own. If I did it this way then I guess I'd be relying on

How to input values of the matrix from keyboard in python

2010-08-11 Thread Pramod
Hi I want to know the how we input values into the matrix (N*N size) from keyboard in python, Here I wrote Matrix programe in C++ This asks values from key board and print on the console N*N matrix ; Thanks in advance #includeiostream using namespace std; int main() {

passing file from command line startup

2010-08-11 Thread Bradley Hintze
Hi all, Is there a way that I can startup my script and pass it a file? For example: ~$ python myscript.py mytext.txt and then access mytext.txt in myscript.py? As a long shot, for myscript.py I tried def __init__(fle): print fle expecting the full path to mytext.txt to be printed but

Re: Queue cleanup

2010-08-11 Thread Paul Rubin
EW ericwoodwo...@gmail.com writes: Well I cared because I thought garbage collection would only happen when the script ended - the entire script. Since I plan on running this as a service it'll run for months at a time without ending. So I thought I was going to have heaps of Queues hanging

Re: urgent requirement at Hyderabad

2010-08-11 Thread Edward A. Falk
In article mailman.1949.1281529030.1673.python-l...@python.org, Stefan Behnel stefan...@behnel.de wrote: In case anyone wondered: Hyderabad is likely referring to some place in Asia: It's one of the high-tech cities in India. A lot of out-sourcing winds up there. -- -Ed Falk,

Re: passing file from command line startup

2010-08-11 Thread Peter Otten
Bradley Hintze wrote: Hi all, Is there a way that I can startup my script and pass it a file? For example: ~$ python myscript.py mytext.txt and then access mytext.txt in myscript.py? As a long shot, for myscript.py I tried def __init__(fle): print fle expecting the full

Re: passing file from command line startup

2010-08-11 Thread Robert Kern
On 8/11/10 1:47 PM, Bradley Hintze wrote: Hi all, Is there a way that I can startup my script and pass it a file? For example: ~$ python myscript.py mytext.txt and then access mytext.txt in myscript.py? As a long shot, for myscript.py I tried def __init__(fle): print fle expecting the

Re: passing file from command line startup

2010-08-11 Thread MRAB
Bradley Hintze wrote: Hi all, Is there a way that I can startup my script and pass it a file? For example: ~$ python myscript.py mytext.txt and then access mytext.txt in myscript.py? As a long shot, for myscript.py I tried def __init__(fle): print fle expecting the full path to

Re: How to input values of the matrix from keyboard in python

2010-08-11 Thread Chris Rebert
On Wed, Aug 11, 2010 at 11:43 AM, Pramod pram...@gmail.com wrote: Hi   I want to know the how we input values into the matrix (N*N size) from keyboard in python, Here I wrote Matrix programe in C++ This  asks values from key board and print on the console N*N matrix ; Thanks in advance

Re: How to input values of the matrix from keyboard in python

2010-08-11 Thread MRAB
Pramod wrote: Hi I want to know the how we input values into the matrix (N*N size) from keyboard in python, Here I wrote Matrix programe in C++ This asks values from key board and print on the console N*N matrix ; [snip] Read from the keyboard using raw_input() (in Python 2, or

Re: Microsoft lessening commitment to IronPython and IronRuby

2010-08-11 Thread Jason Earl
On Tue, Aug 10 2010, Ben Finney wrote: Steven D'Aprano steve-remove-t...@cybersource.com.au writes: On Tue, 10 Aug 2010 20:07:06 +1200, Gregory Ewing wrote: Is there any way for a non-.NET program to access a .NET library? Or is it necessary to drink the entire bottle of .NET kool-aid?

How to give matrix input from keyboard or file in python

2010-08-11 Thread Pramod
I want to write the following programm in python . Main objective is input from keyoard to enter elements into the matrix . Thanks in advance #includeiostream #includemath.h #includecstdlib using namespace std; int main() { double **a; int i,j,n; coutEnter size

Re: Queue cleanup

2010-08-11 Thread MRAB
Paul Rubin wrote: EW ericwoodwo...@gmail.com writes: Well I cared because I thought garbage collection would only happen when the script ended - the entire script. Since I plan on running this as a service it'll run for months at a time without ending. So I thought I was going to have heaps

most popular gui framework for python

2010-08-11 Thread Back9
Hi, Does anyone know of what is the most popular gui framework for python application? TIA -- http://mail.python.org/mailman/listinfo/python-list

Re: urgent requirement at Hyderabad

2010-08-11 Thread MRAB
Stefan Behnel wrote: In case anyone wondered: Hyderabad is likely referring to some place in Asia: http://en.wikipedia.org/wiki/Hyderabad_%28disambiguation%29 And Berlin is likely some place in Europe: http://en.wikipedia.org/wiki/Berlin_(disambiguation) :-) --

Re: Confused: Newbie Function Calls

2010-08-11 Thread Pinku Surana
On Aug 11, 12:39 pm, fuglyducky fuglydu...@gmail.com wrote: On Aug 11, 9:31 am, Pinku Surana sura...@gmail.com wrote: On Aug 11, 12:07 pm, fuglyducky fuglydu...@gmail.com wrote: I am a complete newbie to Python (and programming in general) and I have no idea what I'm missing. Below

Re: GUI automation tool (windows)

2010-08-11 Thread CM
On Aug 9, 8:10 am, Alex Barna alex.lavoro.pro...@gmail.com wrote: I know that this question has been asked for several times, but it surprises that there is no tool under very active development and the community activities are very low (mailing list posts). All the tools listed in:

Re: Line-by-line processing when stdin is not a tty

2010-08-11 Thread Tim Harig
On 2010-08-11, RG rnospa...@flownet.com wrote: In article i3uo7t$6m...@speranza.aioe.org, Tim Harig user...@ilthio.net wrote: On 2010-08-11, RG rnospa...@flownet.com wrote: I'm writing a system in a different language but want to use a Python library. I know of lots of ways to do this

Re: Is there a Python equivalent to Perl's File::Listing::parse_dir

2010-08-11 Thread Thomas Jollans
On Wednesday 11 August 2010, it occurred to John Nagle to exclaim: This is especially useful for FTP sites. It sounds like you're trying to use HTTP to something a lot more easily done with FTP, without any reason not to use FTP. http://docs.python.org/library/ftplib.html#ftplib.FTP.dir --

mi

2010-08-11 Thread Eric J. Van der Velden
Hello, I have these types, class A: def __init__(s): super().__init__() print(A) class B(A): def __init__(s): super().__init__() print(B) class C(A): def __init__(s): super().__init__()

Re: most popular gui framework for python

2010-08-11 Thread J.O. Aho
Back9 wrote: Does anyone know of what is the most popular gui framework for python application? Don't think it's the most popular, but I think it may be the one which works for quite a lot of different platforms, PyQt, works fine on my desktop as cellphone. -- //Aho --

Re: python interview quuestions

2010-08-11 Thread geremy condra
On Wed, Aug 11, 2010 at 6:04 AM, Roy Smith r...@panix.com wrote: In article 4c6298c1$0$11101$c3e8...@news.astraweb.com,  Steven D'Aprano st...@remove-this-cybersource.com.au wrote: Sounds ridiculous, but apparently there are vast hordes of people who can barely program Hello World applying

  1   2   3   >