Re: TSV to HTML

2006-05-31 Thread Paddy
Brian wrote: > First let me say that I appreciate the responses that everyone has > given. > > A friend of mine is a ruby programmer but knows nothing about python. > He gave me the script below and it does exactly what I want, only it is > in Ruby. Not knowing ruby this is greek to me, and I woul

Re: How to access the content of notepad with Python?

2006-05-31 Thread Ravi Teja
> I have a software running on my computer that really looks like notepad > ( same interface, different name). I need to write a script that will > capture the content of this software --> the text written inside. > > Is it possible using win32 libs? any clue? http://www.openqa.org/pywinauto/ The

Re: ideas for programs?

2006-05-31 Thread James Stroud
A digest of the major points summarizing the consensus opinion: Thomas Bartkus wrote: > Python is your tool to put your expertise on a computer. Skill with Python, > or any computer language for that matter, counts for little. And [EMAIL PROTECTED] wrote: > As far as employment. I come from

Re: TIming

2006-05-31 Thread Tim Roberts
WIdgeteye <[EMAIL PROTECTED]> wrote: >On Tue, 30 May 2006 16:15:44 +1000, John McMonagle wrote: > >> Tim Roberts is right. As you are on linux, I suggest you investigate the >> at command - very user friendly and not at all complicated. > >I have been using Slackware for over 10 years I know all

Is device Connected Windows?

2006-05-31 Thread placid
Hi all, Just wondering is there a way (not brute force) to check if a usb storage device is connected? The brute force method im talking about is doing a os.path.isdir() or os.path.isdir() on all the drive letters from A-Z, because you know that this usb device contains a folder called A or file

Re: How to access the content of notepad with Python?

2006-05-31 Thread placid
kepioo wrote: > Hi, > > I have a software running on my computer that really looks like notepad > ( same interface, different name). I need to write a script that will > capture the content of this software --> the text written inside. > Dont know about win32, but if you want an easy solution the

Re: WinPops

2006-05-31 Thread Roger Upole
"Hari Sekhon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > Is there a way of sending winpops (Windows Pop-Up / Net Send messages) in > python? > > Perhaps some library or something that I can use under both Windows and Linux? > > Hari On Windows, you can use win32net.Net

Re: Try/Except for ADSI GetObject

2006-05-31 Thread Roger Upole
"LittlePython" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I am a little confused on why I can not detect an object that does not exist > with a try and except. If I understand ADSI correctly from what I have read > you do not create these objects but rather get them. They already

How to access the content of notepad with Python?

2006-05-31 Thread kepioo
Hi, I have a software running on my computer that really looks like notepad ( same interface, different name). I need to write a script that will capture the content of this software --> the text written inside. Is it possible using win32 libs? any clue? Thanks! -- http://mail.python.org/mailm

Re: beginner: using parameter in functions

2006-05-31 Thread 3rdshiftcoder
"John Machin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] thanks for the help. it is really appreciated. i am going to do some more reading in the next couple of days. jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Save data to a file thru a http connection

2006-05-31 Thread John Machin
On 1/06/2006 11:52 AM, [EMAIL PROTECTED] wrote: > Scott, > > Can you please tell me which chapter of the tutorial that you are > referring to http://docs.python.org/tut/tut.html? > > The only chapter that I find about http is chapter 10.7, but it does > not have the example that you are referring

Re: struct: type registration?

2006-05-31 Thread John Machin
On 1/06/2006 10:50 AM, Giovanni Bajo wrote: > Hello, > > given the ongoing work on struct (which I thought was a dead module), I was > wondering if it would be possible to add an API to register custom parsing > codes for struct. Whenever I use it for non-trivial tasks, I always happen to > write

Re: Save data to a file thru a http connection

2006-05-31 Thread yinglcs
Scott, Can you please tell me which chapter of the tutorial that you are referring to http://docs.python.org/tut/tut.html? The only chapter that I find about http is chapter 10.7, but it does not have the example that you are referring to Scott David Daniels wrote: > [EMAIL PROTECTED] wrote: > >

Re: TSV to HTML

2006-05-31 Thread Brian
First let me say that I appreciate the responses that everyone has given. A friend of mine is a ruby programmer but knows nothing about python. He gave me the script below and it does exactly what I want, only it is in Ruby. Not knowing ruby this is greek to me, and I would like to re-write it i

Downloading and Displaying an Image from the Internet in Tkinter

2006-05-31 Thread Dustan
The title pretty much says it all. What is the easiest way in Tkinter to display an image from the internet given the URL? -- http://mail.python.org/mailman/listinfo/python-list

Re: ideas for programs?

2006-05-31 Thread George Sakkis
Brandon McGinty wrote: > Hi, > I've been learning python for the past couple of months and writing misc > scripts here and there, along with some web apps. > I'm wondering if anyone has ideas of programs I might try my hand at making? > I'd appreciate it if they don't use images, because I'm blind

struct: type registration?

2006-05-31 Thread Giovanni Bajo
Hello, given the ongoing work on struct (which I thought was a dead module), I was wondering if it would be possible to add an API to register custom parsing codes for struct. Whenever I use it for non-trivial tasks, I always happen to write small wrapper functions to adjust the values returned by

Re: Variable name has a typo, but code still works. Why?

2006-05-31 Thread BartlebyScrivener
> I can only assume that there was some type of cache problem. Could it > have been in the .pyc? I thought that was recompiled every time a .py > is run/set to be interpreted. If you are on Windows, check your PATHEXT environment variable and make sure that .py is listed ahead of .pyc and any ot

Re: beginner: using parameter in functions

2006-05-31 Thread 3rdshiftcoder
thanks very much John! so i can have self as function parameter as well as in a method. that allowed me to use properties to retrieve the value set in the constructor. i just changed the function return statement and it worked. i was working along these lines but couldnt get it up and running as

Re: beginner: using parameter in functions

2006-05-31 Thread John Machin
On 1/06/2006 9:24 AM, 3rdshiftcoder wrote: > hi- > > i am having trouble using parameter values in my function and to be honest a > little trouble with > member variables. i am trying to pass in the argument 'd' representing > delete. > what the code will do is if it is 'd' it will make a delet

Re: beginner: using parameter in functions

2006-05-31 Thread John McMonagle
On Wed, 2006-05-31 at 23:24 +, 3rdshiftcoder wrote: > hi- > > i am having trouble using parameter values in my function and to be honest a > little trouble with > member variables. i am trying to pass in the argument 'd' representing > delete. > what the code will do is if it is 'd' it will

Re: using import * with GUIs?

2006-05-31 Thread Peter Decker
On 5/31/06, John Salerno <[EMAIL PROTECTED]> wrote: > I guess if I'm going to learn a GUI, I might as well jump right into > wxPython from the beginning. May I recommend that you take a look at the Dabo project? While they have a full application framework for creating database applications, you

Re: OT: Search for python in Norway

2006-05-31 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > your search for python refers for python=snake. It combines both, but spikes are definately snakey. > you should look for "python programming". I tried that, and Google missed the Nokia article it found with python alone. Also, Sou

Re: TSV to HTML

2006-05-31 Thread Leif K-Brooks
Brian wrote: > I was wondering if anyone here on the group could point me in a > direction that would expllaing how to use python to convert a tsv file > to html. I have been searching for a resource but have only seen > information on dealing with converting csv to tsv. Specifically I want > to

beginner: using parameter in functions

2006-05-31 Thread 3rdshiftcoder
hi- i am having trouble using parameter values in my function and to be honest a little trouble with member variables. i am trying to pass in the argument 'd' representing delete. what the code will do is if it is 'd' it will make a delete query template string. if it is an 'i' then insert que

Re: Tkinter question

2006-05-31 Thread John McMonagle
On Wed, 2006-05-31 at 11:37 -0400, david brochu jr wrote: > I am trying to create a GUI that will display a new window with > information about my program when the user clicks on the info button > (a green "i" bitmap). So far all I can get my program to do is show > the new window (using Toplevel()

Re: Variable name has a typo, but code still works. Why?

2006-05-31 Thread mateus
Well, one by one I checked for the presence of both sessions and session in the globals dictionary (within showReport(), but outside of the loops). Neither one of them existed previously, thus and I received the exception about them not being found: File "/home/mjpl/hct/repository/hct/tutoo.py

ctypes pointers and SendMessage

2006-05-31 Thread Metalone
I would like to call windll.user32.SendMessageA(hwnd, win32con.WM_COMMAND, wParam, lParam) where lParam represents a pointer to an object. And also convert this pointer back to an object reference inside of wnd_proc def wnd_proc(hwnd, msg, wParam, lParam): So something like this: class X(Structur

Re: is a wiki engine based on a cvs/svn a good idea?

2006-05-31 Thread Bruno Desthuilliers
piotr maliski a écrit : > I'm planning to wite a fully featured wiki in Python Then first have a look at both moinmoin and Trac. Good part of the job is already done. > in one of > frameworks. I've seen some notes about wiki/documentation management > scripts that use SVN as a data storage/versi

Re: is a wiki engine based on a cvs/svn a good idea?

2006-05-31 Thread Damjan
> I'm planning to wite a fully featured wiki in Python in one of > frameworks. I've seen some notes about wiki/documentation management > scripts that use SVN as a data storage/versioning. Cool > I've been using SVN a bit but I don't know if it's a good idea to use > it in a wiki engine. Pro: ver

Re: OT: Search for python in Norway

2006-05-31 Thread ippisl
your search for python refers for python=snake. you should look for "python programming". cyberco wrote: > Although the climate wouldn't make you think so, but searching for > python is hot in Norway: > > http://www.google.com/trends?q=python&ctab=1&geo=all&date=all > > I wonder what the explanati

Re: logging

2006-05-31 Thread Vinay Sajip
[EMAIL PROTECTED] wrote: > Hello Vinay, > > Hmm, log1 decides once whether to print an event, and after that it gets > printed in log1 and all its ancestors, regardless of their level? I find > this quite counter-intuitive. I'd instead expect that each logger > decides whether to print an event ac

is a wiki engine based on a cvs/svn a good idea?

2006-05-31 Thread piotr maliński
I'm planning to wite a fully featured wiki in Python in one of frameworks. I've seen some notes about wiki/documentation management scripts that use SVN as a data storage/versioning. I've been using SVN a bit but I don't know if it's a good idea to use it in a wiki engine. Pro: versioning / diffs,

Re: Save data to a file thru a http connection

2006-05-31 Thread Christoph Haas
On Wed, May 31, 2006 at 08:58:53PM +0200, Christoph Haas wrote: > On Wed, May 31, 2006 at 11:37:47AM -0700, [EMAIL PROTECTED] wrote: > > I am new to python. I read an example here about how to fetch data thru > > a HTTP connection: > > http://diveintopython.org/http_web_services/review.html, > > >

Re: TSV to HTML

2006-05-31 Thread Dan M
> 1) in the code define a css > 2) use a regex to extract the info between tabs In place of this, you might want to look at http://effbot.org/librarybook/csv.htm Around the middle of that page you'll see how to use a delimiter other than a comma > 3) wrap the values in the appropriate tags and in

Re: using import * with GUIs?

2006-05-31 Thread Mel Wilson
John Salerno wrote: > Hi all. Quick question (but aren't they all?) :) > > Do you think it's a good idea to use the 'from import *' > statement when using a GUI module? It seems on wxPython's site, they > recommend using import wx nowadays, but I wonder if that advice is > followed. Also, I'm

Re: Save data to a file thru a http connection

2006-05-31 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: > I am new to python. I read an example here about how to fetch data thru > a HTTP connection: > http://diveintopython.org/http_web_services/review.html, > > My question is how can i save the data to a file after reading it from > a http connection. Do the tutorial and th

Re: shuffling elements of a list

2006-05-31 Thread Fredrik Lundh
Roger Miller wrote: > DSU seems like a lot of trouble to go through in order to use an O(n > log n) sorting algorithm to do what can be done in O(N) with a few > lines of code. The core code of random.shuffle() shows how easy it is > to do it right: > > for i in reversed(xrange(1, len(x)

OT: Search for python in Norway

2006-05-31 Thread cyberco
Although the climate wouldn't make you think so, but searching for python is hot in Norway: http://www.google.com/trends?q=python&ctab=1&geo=all&date=all I wonder what the explanation could be. Btw: Java seems to be all the rage in India :) http://www.google.com/trends?q=java&ctab=1&geo=all&date

Re: Help requested -- importing stuff from a .COM DLL into python

2006-05-31 Thread Larry Bates
John D Salt wrote: > I wonder if some kind soul can help me in my struggle with DLLs? > > I am trying -- not because I want to, but because I have been told to -- > to import things from an API that exists as a bunch of .COM DLLs. > > I had originally hoped to get them into a Python 2.4 progra

Re: using import * with GUIs?

2006-05-31 Thread malv
John Salerno wrote: > Terry Reedy wrote: > > > If I were to use Tkinter, I would 'import Tkinter as tk'. > > Good idea! > > I was kind of excited about Tkinter for a little while...seems very > easy, and it has an event delegation system that I understand! But then > I saw that for a toolbar you us

Re: shuffling elements of a list

2006-05-31 Thread Roger Miller
Sybren Stuvel wrote: > David C Ullrich enlightened us with: > > I thought that the fact that you could use the same trick for > > _shuffling_ a list was my idea, gonna make me rich and famous. I > > guess I'm not the only one who thought of it. Anyway, you can use > > DSU to _shuffle_ a list by de

Re: using import * with GUIs?

2006-05-31 Thread John Salerno
Terry Reedy wrote: > If I were to use Tkinter, I would 'import Tkinter as tk'. Good idea! I was kind of excited about Tkinter for a little while...seems very easy, and it has an event delegation system that I understand! But then I saw that for a toolbar you use a Frame? And for a status bar

Re: using import * with GUIs?

2006-05-31 Thread Alexandre Fayolle
Le 31-05-2006, John <[EMAIL PROTECTED]> nous disait: > Hi all. Quick question (but aren't they all?) :) > > Do you think it's a good idea to use the 'from import *' > statement when using a GUI module? It seems on wxPython's site, they > recommend using import wx nowadays, but I wonder if that a

Re: using import * with GUIs?

2006-05-31 Thread John Salerno
[EMAIL PROTECTED] wrote: > Personally I prefer explicit to implicit, and typing wx. is not really > that much to type is it? No, but typing "Tkinter." is! ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: using import * with GUIs?

2006-05-31 Thread Terry Reedy
"John Salerno" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all. Quick question (but aren't they all?) :) > > Do you think it's a good idea to use the 'from import *' > statement when using a GUI module? It seems on wxPython's site, they > recommend using import wx nowadays,

Re: using import * with GUIs?

2006-05-31 Thread [EMAIL PROTECTED]
John Salerno wrote: > Hi all. Quick question (but aren't they all?) :) > > Do you think it's a good idea to use the 'from import *' > statement when using a GUI module? It seems on wxPython's site, they > recommend using import wx nowadays, but I wonder if that advice is > followed. Also, I'm sti

using import * with GUIs?

2006-05-31 Thread John Salerno
Hi all. Quick question (but aren't they all?) :) Do you think it's a good idea to use the 'from import *' statement when using a GUI module? It seems on wxPython's site, they recommend using import wx nowadays, but I wonder if that advice is followed. Also, I'm still reading some Tkinter docs

Re: Dr. Dobb's Python-URL! - weekly Python news and links (May 30)

2006-05-31 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Fuzzyman <[EMAIL PROTECTED]> wrote: . . . >> Fuzzyman advertises yet another convenience of Movable Python: >> http://groups.google.com/group/comp.lang.python/msg/35baaa3af891c12f

Re: ideas for programs?

2006-05-31 Thread SuperHik
I agree with Fred. So here is a "problem" I had and wanted to solve. I needed an Atomic clock (well, not the real one but the one that connects to NTP server and gets the exact time) in a window that stays always on top. While I was writing it I included alarm, and a stopwatch. Than I wrote a simpl

Re: Save data to a file thru a http connection

2006-05-31 Thread Christoph Haas
On Wed, May 31, 2006 at 11:37:47AM -0700, [EMAIL PROTECTED] wrote: > I am new to python. I read an example here about how to fetch data thru > a HTTP connection: > http://diveintopython.org/http_web_services/review.html, > > My question is how can i save the data to a file after reading it from >

Re: Oracle Data Access in Python

2006-05-31 Thread Bill Scherer
A.M wrote: > > "Bill Scherer" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > A.M wrote: > > > >> Hi, > >> > >> > >> > >> I am familiar with Perl's DBI programming. > >> > >> > >> > >> In Python, do we access to Oracle by using DBI? > >> > > No. > > > >> Is Oracle DBD driver incl

Re: wx: PyNoAppError

2006-05-31 Thread SuperHik
Scott David Daniels wrote: > SuperHik wrote: > > (1) A wxPython question. Better to ask on the wxPython newsgroup > (listed as comp.python.wxpython on gmane). I'm aware it's a wxPython question but I wasn't aware of the group you mentioned. Thank you! > >> Using XP SP2, PythonWin 2.4.3, any

Re: TSV to HTML

2006-05-31 Thread Tim Chase
> I was wondering if anyone here on the group could point me > in a direction that would expllaing how to use python to > convert a tsv file to html. I have been searching for a > resource but have only seen information on dealing with > converting csv to tsv. Specifically I want to take the

Save data to a file thru a http connection

2006-05-31 Thread yinglcs
Hi, I am new to python. I read an example here about how to fetch data thru a HTTP connection: http://diveintopython.org/http_web_services/review.html, My question is how can i save the data to a file after reading it from a http connection. Thank you. -- http://mail.python.org/mailman/listinf

RE: ideas for programs?

2006-05-31 Thread Sells, Fred
to regurgitate what others have said. trying to solve a real-world problem is significantly more educational that writing toy programs and class assignments. Solving a real-world problem will generate more interest in your potential ability that knowing any language. Pick a problem that you and

Re: problem with google api / xml

2006-05-31 Thread John Bokma
"robin" <[EMAIL PROTECTED]> wrote: > hello, > > i installed SOAPpy 0.12.0 and pyXML 0.8.4 in order to try out the > google-search example in diveintopython > http://diveintopython.org/soap_web_services/index.html > however, i'v been trying and trying and won't get it to work :-( > whenever i run

Re: Are ActivePython scripts compatible with Linux?

2006-05-31 Thread Serge Orlov
A.M wrote: > I am planning to develop python applications on windows and run them on > Linux. > "Larry Bates" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Short answer: yes A.M wrote: > Thanks alot Larry for your comprehensive answer. Small addition: test, test, test. This i

Re: Oracle Data Access in Python

2006-05-31 Thread A.M
"Bill Scherer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > A.M wrote: > >> Hi, >> >> >> >> I am familiar with Perl's DBI programming. >> >> >> >> In Python, do we access to Oracle by using DBI? >> > No. > >> Is Oracle DBD driver included with Python distributions? >> > No. > >>

TSV to HTML

2006-05-31 Thread Brian
I was wondering if anyone here on the group could point me in a direction that would expllaing how to use python to convert a tsv file to html. I have been searching for a resource but have only seen information on dealing with converting csv to tsv. Specifically I want to take the values and ins

python to NQC converter?

2006-05-31 Thread Brian Blais
Hello, I was wondering if anyone has written a converter between python code and NQC (http://bricxcc.sourceforge.net/nqc/) used for programming LEGO Mindstorms? I am thinking that a small modification to Pyrex might be used, but I am not sure how to proceed with something like that. I was t

Re: Are ActivePython scripts compatible with Linux?

2006-05-31 Thread A.M
Thanks alot Larry for your comprehensive answer. "Larry Bates" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Short answer: yes > > Things to watch out for: > > 1) Versions on both Windows/Linux need to be compatible. If Linux > has same or later version, you are normally OK. If

Help requested -- importing stuff from a .COM DLL into python

2006-05-31 Thread John D Salt
I wonder if some kind soul can help me in my struggle with DLLs? I am trying -- not because I want to, but because I have been told to -- to import things from an API that exists as a bunch of .COM DLLs. I had originally hoped to get them into a Python 2.4 program by a simple import statement

Re: ideas for programs?

2006-05-31 Thread Thomas Bartkus
"Brandon McGinty" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > I've been learning python for the past couple of months and writing misc > scripts here and there, along with some web apps. > I'm wondering if anyone has ideas of programs I might try my hand at making? > I'd app

Re: Oracle Data Access in Python

2006-05-31 Thread Bill Scherer
A.M wrote: > Hi, > > > > I am familiar with Perl's DBI programming. > > > > In Python, do we access to Oracle by using DBI? > No. > Is Oracle DBD driver included with Python distributions? > No. > What is the most common strategy for accessing to Oracle data through > Python? > cx_Oracle seems t

Re: Are ActivePython scripts compatible with Linux?

2006-05-31 Thread Larry Bates
Short answer: yes Things to watch out for: 1) Versions on both Windows/Linux need to be compatible. If Linux has same or later version, you are normally OK. If Linux version is older, you will have to use only Python Libraries and functions that are in the oldest version. 2) Don't use OS-speci

Oracle Data Access in Python

2006-05-31 Thread A.M
Hi, I am familiar with Perl's DBI programming. In Python, do we access to Oracle by using DBI? Is Oracle DBD driver included with Python distributions? What is the most common strategy for accessing to Oracle data through Python? Any help would be appreciated, Alan -- http://m

Re: iterator? way of generating all possible combinations?

2006-05-31 Thread Scott David Daniels
Jim Segrave wrote: > In article <[EMAIL PROTECTED]>, > Scott David Daniels <[EMAIL PROTECTED]> wrote: >> class FileReIterable2(object): >> ... >> def __iter__(self): >> self.file.seek(0) >> for line in self.file: >> nextpos = self.file.te

Re: Best Python Editor

2006-05-31 Thread Timothy Grant
On 5/31/06, Manoj Kumar P <[EMAIL PROTECTED]> wrote: > > Hi, > > Can anyone tell me a good python editor/IDE? > It would be great if you can provide the download link also. > > Thank You, > -Manoj- > > > "SASKEN RATED Among THE Top 3 BEST COMPANIES TO WORK FOR IN INDIA - SURVEY > 2005 conducted by

Are ActivePython scripts compatible with Linux?

2006-05-31 Thread A.M
Hi, I am planning to develop python applications on windows and run them on Linux. Are ActivePython scripts compatible with Linux? Is there any guideline that explains the compatibility issues between python in different platforms? What would be the best approach for what I am trying to do

Re: wx: PyNoAppError

2006-05-31 Thread Scott David Daniels
SuperHik wrote: (1) A wxPython question. Better to ask on the wxPython newsgroup (listed as comp.python.wxpython on gmane). > Using XP SP2, PythonWin 2.4.3, any trying to use wx 2.6.3.2 > When using wx, the first time I run a script it runs fine. > Second time, it rasises an error: Up

Re: John Bokma harassment

2006-05-31 Thread Ted Zlatanov
On 31 May 2006, [EMAIL PROTECTED] wrote: > Most languages stay blindly in their own community, oblivious to the > nature or facts of computing languages outside of their world. If > there are more relevant cross-posting, then this problem can be > lessened. (cross-posted to c.l.perl.misc and c.l.

Re: ideas for programs?

2006-05-31 Thread [EMAIL PROTECTED]
I have always found it easiest to scratch a personal itch when learning a new language. One of the first things I wrote was a shopping list program for my wife. It was a pretty good way to start learning the lay of the python libraries - it needed a small object database, a gui (tk, although I

Re: Strange behavior with iterables - is this a bug?

2006-05-31 Thread [EMAIL PROTECTED]
My original concern and reason for goint the iterator/generator route was exactly for large large lists :) Unnecessary in this example, but exactly what I was exploring. I wouldn't be using list comprehension for generating the permutiations. Where all this came from was creating a generator/ite

Re: John Bokma harassment

2006-05-31 Thread Mumia W.
Xah Lee wrote: > Thanks to the great many people who has written to my ISP in support of > me. I'm sorry to say, it looks like they will be killing my account > anyhow. [...] I'm sorry to see you go for now Xah, but I'll be doubly happy to see your return :) Dreamhost isn't the only hosting compa

Find the context of importer

2006-05-31 Thread [EMAIL PROTECTED]
I'm using Python in a scripting environment. The host application would pass in some objects so that the script can act on it. But there are a number of things I like to add to every script to make it a decent environment, for example, setting up exception hook to show error properly. I tried to fa

Re: Strange behavior with iterables - is this a bug?

2006-05-31 Thread Gary Herron
[EMAIL PROTECTED] wrote: >Gary Herron wrote: > > >>List comprehension is a great shortcut, but when the shortcut starts >>causing trouble, better to go with the old ways. You need to reopen each >>file each time you want to iterate through it. You should be able to >>understand the difference be

Re: problem with google api / xml

2006-05-31 Thread robin
hi kent, thanks for your reply. in fact it was me who put "pathtomy" into the path and exchanged my apikey with "" i prefer not everyone to know the name of my directories and even less my apikey. so the problem isn't there :-( hope to find some other solution thanks!! robin Mike Kent w

Re: omniorbpy: problems sending float values

2006-05-31 Thread Duncan Grisby
In article <[EMAIL PROTECTED]>, Juergen <[EMAIL PROTECTED]> wrote: >I've got a problem sending floating point values to an corba server. >With other datatyes like short or string it works fine. Upgrade to the latest stable release, omniORB 4.0.7 and omniORBpy 2.7. The problem you are seeing is d

Tkinter question

2006-05-31 Thread david brochu jr
I am trying to create a GUI that will display a new window with information about my program when the user clicks on the info button (a green "i" bitmap). So far all I can get my program to do is show the new window (using Toplevel() ) when the program loads, not when the user presses the informati

Re: Best Python Editor

2006-05-31 Thread jmdeschamps
bruno at modulix wrote: > Manoj Kumar P wrote: > > Hi, > > > > Can anyone tell me a good python editor/IDE? > > It would be great if you can provide the download link also. > > I hate to be the one answering this, but this is *really* a FAQ - as you > would have known if you had google'd this group

Re: Watching serial port activity.

2006-05-31 Thread Grant Edwards
On 2006-05-31, Sergei Organov <[EMAIL PROTECTED]> wrote: > It seems that sniff on a real tty device could be implemented using the > same technique strace uses to intercept and show syscalls, though I'm > not aware of any sniffer application that does it. Using strace you can indeed trace read/wr

Re: Variable name has a typo, but code still works. Why?

2006-05-31 Thread Max Erickson
"mateus" <[EMAIL PROTECTED]> wrote: > print "hello world" > > I have a nested loop where the outer loop iterates over key value > pairs of a dictionary and the inner loop iterates over a list > each list of which is a mapped value from the dictionary > > def showReport(self): > for d

Re: Strange behavior with iterables - is this a bug?

2006-05-31 Thread [EMAIL PROTECTED]
Gary Herron wrote: > List comprehension is a great shortcut, but when the shortcut starts > causing trouble, better to go with the old ways. You need to reopen each > file each time you want to iterate through it. You should be able to > understand the difference between these two bits of code. >

Re: iterator? way of generating all possible combinations?

2006-05-31 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, Scott David Daniels <[EMAIL PROTECTED]> wrote: > >This works if-and-only-if it is only in use once at a time. >If you have multiple simultaneous accesses, you need to do >something like: > > class FileReIterable2(object): > def __init__(self, file): >

Re: Variable name has a typo, but code still works. Why?

2006-05-31 Thread Max M
mateus wrote: > print "hello world" > > I have a nested loop where the outer loop iterates over key value pairs > of a dictionary and the inner loop iterates over a list each list of > which is a mapped value from the dictionary > > def showReport(self): > for dev, sessions in self.lo

Re: iterator? way of generating all possible combinations?

2006-05-31 Thread [EMAIL PROTECTED]
Scott David Daniels wrote: > [EMAIL PROTECTED] wrote: > > Scott David Daniels wrote: > >> Sorry, "re-iterables". A file re-iterable is: > >> > >> class FileReIterable(object): ... > >> def __iter__(self): > >> self.file.seek(0) > >> return iter(self.file) >

Re: os.popen3() - how to close cmd window automatically?

2006-05-31 Thread ddonato
> > # Script "shortcut.py" > > import os > > import webbrowser > > import win32api > > > > # open default web browser and display webbpage > > page = 'C:\\Temp\\Welcome.html' > > webbrowser.open(page) > > > > # path to application that is opened > > path = "C:\\Program Files\\ExternalApplication.e

Re: Variable name has a typo, but code still works. Why?

2006-05-31 Thread Tim N. van der Leeuw
Hi Mateus, We'd need to see more code then just this snippet. It looks like the name 'session' is used elsewhere in the code, and is in scope for the showReport() method. But without seeing a bit more code of this class, and possibly global variables / code, it's not possible to say this. There's

Re: John Bokma harassment

2006-05-31 Thread Xah Lee
Thanks to the great many people who has written to my ISP in support of me. I'm sorry to say, it looks like they will be killing my account anyhow. I have exchanged a couple letters with the guy at my web host and he is not changing the decision. Of this thread, i think 2/3 or 3/4 supported my vie

Re: Variable name has a typo, but code still works. Why?

2006-05-31 Thread hwiechers
mateus wrote: > print "hello world" > > I have a nested loop where the outer loop iterates over key value pairs > of a dictionary and the inner loop iterates over a list each list of > which is a mapped value from the dictionary > > def showReport(self): > for dev, sessions in self.log

wx: PyNoAppError

2006-05-31 Thread SuperHik
Hi! Using XP SP2, PythonWin 2.4.3, any trying to use wx 2.6.3.2 When using wx, the first time I run a script it runs fine. Second time, it rasises an error: [Script]** import wx app = wx.App() win = wx.Frame(None, title="Simple Editor") win.Show() app.MainLoop() [

Re: Variable name has a typo, but code still works. Why?

2006-05-31 Thread mateus
mateus wrote: > print "hello world" > > I have a nested loop where the outer loop iterates over key value pairs > of a dictionary and the inner loop iterates over a list each list of > which is a mapped value from the dictionary > > def showReport(self): > for dev, sessions in self.log

Variable name has a typo, but code still works. Why?

2006-05-31 Thread mateus
print "hello world" I have a nested loop where the outer loop iterates over key value pairs of a dictionary and the inner loop iterates over a list each list of which is a mapped value from the dictionary def showReport(self): for dev, sessions in self.logger.items(): for

Re: Way to get an array of latitude/longitude points (tuples) from a trip

2006-05-31 Thread kbperry
> The problem is not the latitude/longitude. It would be trivial to > compute the great circle, thus the length of the trip between A and B > and divide it in smaller pieces to get 1-mile-distances. Yeah, I am starting to wish we drove in straight lines. > But unless you own an Aircraft & are

Re: problem with google api / xml

2006-05-31 Thread Mike Kent
robin wrote: > from SOAPpy import WSDL > WSDLFILE = '/pathtomy/googleapi/GoogleSearch.wsdl' > APIKEY = '' > _server = WSDL.Proxy(WSDLFILE) Robin, note this part of the URI set in WSDLFILE: '/pathtomy/googleapi'. Get it? 'path to my google api'. You must set this part to the actual path wh

Re: Best Python Editor

2006-05-31 Thread Franz Steinhaeusler
On Wed, 31 May 2006 15:33:29 +0530, "Manoj Kumar P" <[EMAIL PROTECTED]> wrote: > >Hi, > >Can anyone tell me a good python editor/IDE? >It would be great if you can provide the download link also. > For a simple start: Scite is small, good, cross platform, free and open source and you can launch t

Re: os.popen3() - how to close cmd window automatically?

2006-05-31 Thread Rony Steelandt
> Dear Python developers, > > I use a short python script in order to run an external application plus to > open a browser displaying a default page. > > My Setup: Python 2.4.3. / Windows2000 > > # -- > # Script "shortcut.py" > im

Re: Software Needs Philosophers

2006-05-31 Thread Xah Lee
The Condition of Industrial Programers Xah Lee, 2006-05 Before i stepped into the computing industry, my first industrial programing experience is at Wolfram Research Inc as a intern in 1995. (Wolfram Research is famously known for their highly successful flagship product Mathematica) I thought,

Re: Running Python scripts under a different user

2006-05-31 Thread Mikael Olofsson
Laszlo Nagy wrote: > For Windows, you can use the 'runas.exe' program. But it requires a > password too. Or you can get a copy of the shareware program RunAsProfessional, which I use for my kids stupid games that necessarily has to be run by an admin. The price I paid was 10 Euro, which I still

  1   2   >