Re: Two dimensional dictionary stored in a file?

2001-11-15 Thread David Ascher
Wayne Ringling wrote: > > I would like to store a two dimensional dictionary in a file on disk. But > I can't seem to get it working. Can anybody advice me of a sample piece of > code to start from. Thanks in advance. myDict = {(0,0): 'tomato', (1,0): 'cucumber'}

Two dimensional dictionary stored in a file?

2001-11-15 Thread Wayne Ringling
I would like to store a two dimensional dictionary in a file on disk. But I can't seem to get it working. Can anybody advice me of a sample piece of code to start from. Thanks in advance. Wayne R ___ ActivePython mailing list [EMAIL PROTECTED] http

Is it a job for Thread or Process?

2001-11-15 Thread A
Hello, In my Python script I would like to start one function of this script in a different thread or process? That function sends an email. Can you please give me an example how I can start a new thread or process under Win32 systems? Is it better to use a new thread or a new process for th

Is it a job for Thread or Process?

2001-11-15 Thread A
Hello, In my Python script I would like to start one function of this script in a different thread or process? That function sends an email. Can you please give me an example how I can start a new thread or process under Win32 systems? Is it better to use a new thread or a new process for

Re: Controlling win32 application

2001-11-15 Thread John Kirkham
Hi Russell, It sounds like you need something like Expect. Expect is specifically designed for trapping and controlling things like terminal or telnet sessions. I've only used the original TCL version of Expect, but there is a Python version. Check out: http://expectpy.sourceforge.net/ I haven't

RE: Controlling win32 application

2001-11-15 Thread Russell Blank
I have done some basic screen scraping with the telnetlib provided in the Python Standard Library. It works fine, but when you get into terminal emulation, trying to screen scrape and program a script that understands the escape codes gets a bit more difficult. It would be great if I could see m

RE: Controlling win32 application

2001-11-15 Thread Troy Noble
I don't necessarily disagree... for command-line apps it's quite simple to just use a socket on port 21. But for "full screen" VT-style apps where screen scraping is needed, it's a different problem. Simply put, the control sequences can be overwhelming to wade through. And you end up ha

RE: Controlling win32 application

2001-11-15 Thread Bob Kline
On Thu, 15 Nov 2001, Kári Harðarson wrote: > Sounds like you might be wanting to cross the lake to get water. > A Telnet app is nothing but a GUI on top of a socket on port number 21. > It would be more expedient to open the socket on port 21, write to > it as if it were a file and read the resu

RE: Controlling win32 application

2001-11-15 Thread Kári Harðarson
Sounds like you might be wanting to cross the lake to get water. A Telnet app is nothing but a GUI on top of a socket on port number 21. It would be more expedient to open the socket on port 21, write to it as if it were a file and read the results back the same way. Best regards, Kari Har

RE: Controlling win32 application

2001-11-15 Thread Paul Weimer
Just out of curiosity - how many others are trying to deal with screen-scrapes with Python? I've started a hllapi extension myself. Are there enough of us for our own mailing list (and therapy sessions) ? Paul -Original Message- From: Troy Noble [mailto:[EMAIL PROTECTED]] Sent: Thursday,

RE: Controlling win32 application

2001-11-15 Thread Troy Noble
Since you're on Win32... One other option is to get ahold of (dare I say it) a commercial Telnet program (Hummingbird and others have pretty good ones) that provides either a COM automation interface or an ActiveX control. Or if they have a C/C++ API you could attempt to expose it through a Pyth

RE: Controlling win32 application

2001-11-15 Thread Russell Blank
No, I am not crazy (at least I think). The reason why I want to automate this process is for rapid development of screen scraping. I have used telnetlib, but interpreting escape codes and trying to discover where you are on the screen is an arduous task. I want to do the following: 1. Create