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 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 a TTY? Thanks,

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 "", line 1, in > from tkinter import ttk > ImportErro

Re: GUI automation tool (windows)

2010-08-11 Thread Ben Finney
Lawrence D'Oliveiro writes: > In message , 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 asking any more. The above response seems like a total no

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 se

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

2010-08-11 Thread Tim Harig
On 2010-08-11, RG 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 > 123 > 456 > > Is there a way to get Python to process input line-by-line the way it > does when stdin is

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

2010-08-11 Thread Cameron Simpson
On 11Aug2010 00:11, RG 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 | 123 | 456 | | Is there a way to get Python to process input line-by-line the way it | does when s

Re: GUI automation tool (windows)

2010-08-11 Thread Jean-Michel Pichavant
Grant Edwards wrote: On 2010-08-11, Lawrence D'Oliveiro wrote: In message , Alex Barna wrote: On Aug 10, 10:05 am, Lawrence D'Oliveiro Can???t understand the point to it. ???GUI automation??? is a contradiction in terms, because a GUI is designed for use by humans to do man

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

2010-08-11 Thread Νίκος
On 10 Αύγ, 18:12, MRAB 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 the begi

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 , 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 you really fail to under

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

2010-08-11 Thread Tim Harig
On 2010-08-11, Wolfgang Rohdewald 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 > > http://ww

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 o

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

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 main

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

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

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 wrote: | On 2010-08-11, Wolfgang Rohdewald 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

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 wrote: > On 11Aug2010 10:32, Tim Harig wrote: >| On 2010-08-11, Wolfgang Rohdewald 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 >| > >

Re: GUI automation tool (windows)

2010-08-11 Thread Tim Harig
On 2010-08-11, Steven D'Aprano 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 faided away because automation ba

Re: python interview quuestions

2010-08-11 Thread Roy Smith
In article <4c6298c1$0$11101$c3e8...@news.astraweb.com>, Steven D'Aprano 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, I don't know -- is 199 out of

Re: python interview quuestions

2010-08-11 Thread Ben Finney
Tim Chase 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’ is a field in the header,

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

2010-08-11 Thread sturlamolden
On 11 Aug, 08:40, Ulrich Eckhardt 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 (implementation) is n

Re: GUI automation tool (windows)

2010-08-11 Thread Grant Edwards
On 2010-08-11, Lawrence D'Oliveiro wrote: > In message , 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 you're just trolling. -- Grant Edwards gr

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

2010-08-11 Thread Grant Edwards
On 2010-08-11, Tim Harig wrote: > On 2010-08-11, RG 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 >> 123 >> 456 >> >> Is there a way to get Python to process input

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 wrote: >> On 2010-08-11, RG 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 >>> 123 >>> 456 >>> >>> Is there a w

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

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 def

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 and

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 e

Re: How to swallow traceback message

2010-08-11 Thread Tim Harig
On 2010-08-11, Back9 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 options.

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 On Wed, Aug 11, 2010 at 11:09 AM, 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 ste

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 Traceb

Re: How to swallow traceback message

2010-08-11 Thread Back9
On Aug 11, 11:19 am, Tim Harig wrote: > On 2010-08-11, Back9 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

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 approp

Re: type enforcement in _ssl.sslwrap

2010-08-11 Thread Eric Snow
On Aug 11, 5:34 am, Steven D'Aprano 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 _ssl.sslwrap into a PySocketModule.Sock_T

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 t

Re: Confused: Newbie Function Calls

2010-08-11 Thread Pinku Surana
On Aug 11, 12:07 pm, 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 w

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 = """ ano

Re: Confused: Newbie Function Calls

2010-08-11 Thread fuglyducky
On Aug 11, 9:31 am, Pinku Surana wrote: > On Aug 11, 12:07 pm, 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

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 gen_header(sa

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 functio

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 wrote: > On Aug 11, 9:31 am, Pinku Surana wrote: > > > > > > > On Aug 11, 12:07 pm, 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

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

2010-08-11 Thread RG
In article , Cameron Simpson wrote: > On 11Aug2010 00:11, RG 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 > | 123 > | 456 > | > | Is there a way to get P

Re: Queue cleanup

2010-08-11 Thread EW
On Aug 11, 12:55 pm, EW 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 how many producer an

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

2010-08-11 Thread RG
In article , Peter Otten <__pete...@web.de> wrote: > Grant Edwards wrote: > > > On 2010-08-11, Tim Harig wrote: > >> On 2010-08-11, RG wrote: > >>> When stdin is not a tty, Python seems to buffer all the input through > >>> EOF before processing any of it: > >>> > >>> [...@mickey:~]$ cat | pyt

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 functio

Re: Queue cleanup

2010-08-11 Thread Paul Rubin
EW 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 having 1 Queue tha

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

Re: Queue cleanup

2010-08-11 Thread EW
On Aug 11, 1:18 pm, Paul Rubin wrote: > EW 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. > >

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 http://svn.python.org/view/python/branches/py3k/Modules/_elementtree.c?revisio

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 mess

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

2010-08-11 Thread Tim Harig
On 2010-08-11, RG 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 Python interpreter and

Re: Queue cleanup

2010-08-11 Thread EW
On Aug 11, 1:55 pm, MRAB 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 for Queues.

Re: How to swallow traceback message

2010-08-11 Thread Tim Harig
On 2010-08-11, Back9 wrote: > On Aug 11, 11:19 am, Tim Harig wrote: >> On 2010-08-11, Back9 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 >> > makes my app not professional. >> >> You have

Re: Queue cleanup

2010-08-11 Thread Paul Rubin
EW 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 me. Oh, I see. As lo

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

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

2010-08-11 Thread RG
In article , Tim Harig wrote: > On 2010-08-11, RG 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

Re: Queue cleanup

2010-08-11 Thread EW
On Aug 11, 2:16 pm, Paul Rubin wrote: > EW 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

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 #include using namespace std; int main() { double **a;

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 tha

Re: Queue cleanup

2010-08-11 Thread Paul Rubin
EW 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 out in memory, > unr

Re: urgent requirement at Hyderabad

2010-08-11 Thread Edward A. Falk
In article , Stefan Behnel 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, f...@despams.r.us.com http://thespamdiaries.blogspot.com/ -- http://m

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

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

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

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 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? >> >> http://www.mono-project.

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 #include #include #include using namespace std; int main() { double **a; int i,j,n; cout<<"Enter size of the matrix\n";

Re: Queue cleanup

2010-08-11 Thread MRAB
Paul Rubin wrote: EW 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 out in

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) :-) -- http://mail.python.org/mailma

Re: Confused: Newbie Function Calls

2010-08-11 Thread Pinku Surana
On Aug 11, 12:39 pm, fuglyducky wrote: > On Aug 11, 9:31 am, Pinku Surana wrote: > > > > > > > On Aug 11, 12:07 pm, 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

Re: GUI automation tool (windows)

2010-08-11 Thread CM
On Aug 9, 8:10 am, Alex Barna 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: > > http://pycheesecake.org/wiki/

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

2010-08-11 Thread Tim Harig
On 2010-08-11, RG wrote: > In article , > Tim Harig wrote: > >> On 2010-08-11, RG 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 easies

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

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 -- http://mail.pytho

Re: python interview quuestions

2010-08-11 Thread geremy condra
On Wed, Aug 11, 2010 at 6:04 AM, Roy Smith wrote: > In article <4c6298c1$0$11101$c3e8...@news.astraweb.com>, >  Steven D'Aprano wrote: > >> Sounds ridiculous, but apparently there are vast hordes of people who can >> barely program "Hello World" applying for programming jobs. One figure >> bandie

Re: python interview quuestions

2010-08-11 Thread Paul Rubin
geremy condra writes: > I can't recall who it was, but I remember being very impressed by a > company that did a variant of this a few years ago: they put > programming problems on the sides of pay phones, taxis, etc. with a > note that said 'If you can solve this, call us'. I have zero doubt > th

looping through possible combinations of McNuggets packs of 6, 9 and 20

2010-08-11 Thread Baba
level: beginner exercise: given that packs of McNuggets can only be bought in 6, 9 or 20 packs, write an exhaustive search to find the largest number of McNuggets that cannot be bought in exact quantity. exercise source: http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-

Re: most popular gui framework for python

2010-08-11 Thread Thomas Jollans
On Wednesday 11 August 2010, it occurred to Back9 to exclaim: > Hi, > > Does anyone know of what is the most popular gui framework for python > application? I'd guess at Tkinter - it's part of the standard library. Another quite popular option is PyGtk. Other good ones include wxPython, PyQt, an

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

2010-08-11 Thread RG
In article , Tim Harig wrote: > On 2010-08-11, RG wrote: > > In article , > > Tim Harig wrote: > > > >> On 2010-08-11, RG 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, > >>

Re: mi

2010-08-11 Thread Thomas Jollans
On Wednesday 11 August 2010, it occurred to Eric J. Van der Velden to exclaim: > Hello, > > I have these types, > > class A: > def __init__(s): > super().__init__() > print("A") > class B(A): > def __init__(s): > super().__init__() >

Re: Queue cleanup

2010-08-11 Thread EW
On Aug 11, 2:52 pm, Paul Rubin wrote: > EW 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

  1   2   >