Add file to zip, or replace file in zip

2006-05-31 Thread majj81
hi:   Good afternoon.   Has this problem solved in the URL http://mail.python.org/pipermail/python-list/2006-April/338849.html . Now I have the same problem to deal with. If you have any suggestion please tell me.   Thanks.     Johnny Ma  

Re: genexp performance problem?

2006-05-31 Thread Peter Otten
Giovanni Bajo wrote: > I found this strange: > > python -mtimeit "sum(int(L) for L in xrange(3000))" > 100 loops, best of 3: 5.04 msec per loop > > python -mtimeit "import itertools; sum(itertools.imap(int, xrange(3000)))" > 100 loops, best of 3: 3.6 msec per loop > > I thought the two construc

Re: An algorithm problem

2006-05-31 Thread Sybren Stuvel
Bo Yang enlightened us with: > I have writen a python program to slove a problem described as > below: Please post again, but then leaving indentation intact, since this is unreadable. Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidit

Re: genexp performance problem?

2006-05-31 Thread Giovanni Bajo
Fredrik Lundh wrote: >> I found this strange: >> >> python -mtimeit "sum(int(L) for L in xrange(3000))" >> 100 loops, best of 3: 5.04 msec per loop >> >> python -mtimeit "import itertools; sum(itertools.imap(int, >> xrange(3000)))" 100 loops, best of 3: 3.6 msec per loop >> >> I thought the two co

Re: An algorithm problem

2006-05-31 Thread John Machin
On 31/05/2006 4:58 PM, Bo Yang wrote: > Hi , > I have writen a python program to slove a problem described as below: > > (Forgive my poor English !) > > Put the 2^n 0 or 1 to form a ring , Sorry, I can't understand that. It would be very helpful if you wrote out (for example, when n == 3) what t

Re: create a text file

2006-05-31 Thread per9000
Ooops, w must be 'w' - sorry for adding more confusion :-D I would also like to add that this is a more realistic useage appendix = '.txt' # or '.csv' or whatever # some code c += 1 filetitle = 'result_' + zeropadding(c) + str(c) myfile = open(filetitle+appendix,'w') # etc Hope that was a l

Re: Ricerca Programmatore Python

2006-05-31 Thread Frithiof Andreas Jensen
Have you considered Graphwiz with Python bindings? http://www.graphviz.org/ http://yapgvb.sourceforge.net/ -- http://mail.python.org/mailman/listinfo/python-list

problem with google api / xml

2006-05-31 Thread robin
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 this code, i get the attached exception... from S

Re: saving settings

2006-05-31 Thread Ten
On Monday 29 May 2006 12:28, SuperHik wrote: > aum wrote: > > On Mon, 29 May 2006 09:05:36 +0200, SuperHik wrote: > >> Hi, > >> > >> I was wondering how to make a single .exe file, say some kind od clock, > >> and be able to save some settings (alarm for example) into the same > >> file? Basically

Re: An algorithm problem

2006-05-31 Thread Bo Yang
I am sorry , and thanks for your friendliness . I have change my source code for more meaningful variable name and more comments follow the instructions John has writen . I think that is useful for you to look my code . And this time I put the code in the attachment . Indeed , I write that in th

Re: An algorithm problem

2006-05-31 Thread Bo Yang
I am sorry , and thanks for your friendliness . I have change my source code for more meaningful variable name and more comments follow the instructions John has writen . I think that is useful for you to look my code . And this time I put the code in the attachment . Indeed , I write that in

Re: An algorithm problem

2006-05-31 Thread Maric Michaud
Le Mercredi 31 Mai 2006 08:58, Bo Yang a écrit : > RuntimeError: maximum recursion depth exceeded It's tied to the recursive call to the ring function, python raises a limit to recursive calls to avoid infinite recursion. You can just adjust the limit using these two lines when you call the functi

Re: summarize text

2006-05-31 Thread robin
thanks for all your replies. lemur looks pretty interesting! robin gene tani wrote: > robin wrote: > > hello list, > > > > does anyone know of a library which permits to summarise text? i've > > been looking at nltk but haven't found anything yet. any help would be > > unclear what you're asking,

Best Python Editor

2006-05-31 Thread Manoj Kumar P
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 the BUSINESS TODAY - Mercer - TNS India" SA

Re: Best Python Editor

2006-05-31 Thread Max M
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. pydev on top of eclipse is a nice tool. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science Phone: +45 66 11 84 94 Mobile: +45 29 93 4

Re: Best Python Editor

2006-05-31 Thread Fredrik Lundh
"Manoj Kumar P" wrote: > Can anyone tell me a good python editor/IDE? emacs! > It would be great if you can provide the download link also. google it! -- http://mail.python.org/mailman/listinfo/python-list

Re: shuffling elements of a list

2006-05-31 Thread David C.Ullrich
On 30 May 2006 21:53:32 -0700, "greenflame" <[EMAIL PROTECTED]> wrote: >Thank you all for all of your help. Also I got the shuffle function to >work. Do not worry I will be back soon with more shuffling! However, I >do not quite understand this DSU that you mention, although it looks >useful. I d

Re: Best Python Editor

2006-05-31 Thread Fredrik Lundh
"Manoj Kumar P" wrote: > Can anyone tell me a good python editor/IDE? vim! > It would be great if you can provide the download link also. google it! -- http://mail.python.org/mailman/listinfo/python-list

Re: Best Python Editor

2006-05-31 Thread t . buehler
PyScripter is small and fast. http://mmm-experts.com/Products.aspx?ProductId=4 > > 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

Re: shuffling elements of a list

2006-05-31 Thread SuperHik
greenflame wrote: > Zhang Fan wrote: >> On 30 May 2006 20:18:19 -0700, greenflame <[EMAIL PROTECTED]> wrote: >>> Second of all, I would like to have >>> other methods of shuffling, prefererably riffle shuffling and just >>> plain randomly arranging the elements of the list. >> The random module has

Re: Best Python Editor

2006-05-31 Thread Sybren Stuvel
Manoj Kumar P enlightened us with: > Can anyone tell me a good python editor/IDE? > It would be great if you can provide the download link also. VIM 7 is great, http://www.vim.org/ Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, b

Re: shuffling elements of a list

2006-05-31 Thread Sybren Stuvel
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 decorating the list with random n

[OT] whitespace (was Re: stupid perl question)

2006-05-31 Thread Sion Arrowsmith
John Machin <[EMAIL PROTECTED]> wrote: > Whitespace is a silly term, anyway (IMHO); is there such a >thing as a space that is not white? Yes, if you go back to the term's origins in printshops. A solid block of ink is space, not print, but it's not whitespace. We've kept the word alive, even if

Re: John Bokma harassment

2006-05-31 Thread Ten
On Tuesday 30 May 2006 10:36, [EMAIL PROTECTED] wrote: > >Your first question should be: Is it alright that Xah harasses 5 > >newsgroups? Or maybe work on your spelling, harass is with one r, but > >maybe you didn't read the subject, which wouldn't amaze me, since you > >sound like you should be sp

Re: Best Python Editor

2006-05-31 Thread Maric Michaud
Le Mercredi 31 Mai 2006 12:03, Manoj Kumar P a écrit : > Hi, > > Can anyone tell me a good python editor/IDE? > It would be great if you can provide the download link also. I didn't see on this list much PyQT users, is there a consensus about it ? I vote for linux+kdevelop for a good IDE (didn't

Re: Best Python Editor

2006-05-31 Thread Rony Steelandt
> Manoj Kumar P enlightened us with: >> Can anyone tell me a good python editor/IDE? >> It would be great if you can provide the download link also. > > VIM 7 is great, http://www.vim.org/ > > Sybren Another VIM user here -- --- Rony Steelandt BuCodi rony dot steelandt (at) bucodi dot com Visit

Re: An algorithm problem

2006-05-31 Thread John Machin
On 31/05/2006 7:20 PM, Bo Yang wrote: > I am sorry , and thanks for your friendliness . > I have change my source code for more meaningful variable name and more > comments follow the instructions > John has writen . I think that is useful for you to look my code . > > And this time I put the cod

Re: [OT] whitespace

2006-05-31 Thread Ben Finney
Sion Arrowsmith <[EMAIL PROTECTED]> writes: > And if we didn't say "whitespace", how would we distinguish between > "space characters" meaning " " and "whitespace characters" > meaning " \t\r\n\v"? (OK, has anyone met a "\v" in the wild?) Not me. But I routinely use a whitespace character you

Re: Best Python Editor

2006-05-31 Thread Ben Finney
[Please refrain from obnoxious advertising or legal disclaimers on your messages to any discussion forum.] "Manoj Kumar P" <[EMAIL PROTECTED]> writes: > Can anyone tell me a good python editor/IDE? The leading programmer's editors are Emacs and Vim. Both have good support for working with Python

Re: create a text file

2006-05-31 Thread Ben Finney
"per9000" <[EMAIL PROTECTED]> writes: > appendix = '.txt' # or '.csv' or whatever > > # some code > > c += 1 > filetitle = 'result_' + zeropadding(c) + str(c) > myfile = open(filetitle+appendix,'w') Resist the urge to construct strings by concatenation, when Python's built-in string formatting

Re: Best Python Editor

2006-05-31 Thread bruno at modulix
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 for this. -- bruno desthuilliers py

Re: Best Python Editor

2006-05-31 Thread M�ta-MCI
Hi! Komodo (http://www.activestate.com/Products/Komodo) is great, for me. @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: shuffling elements of a list

2006-05-31 Thread David C.Ullrich
On Wed, 31 May 2006 12:17:11 +0200, Sybren Stuvel <[EMAIL PROTECTED]> 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.

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

2006-05-31 Thread Nico Grubert
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" import os import we

Re: [OT] whitespace (was Re: stupid perl question)

2006-05-31 Thread John Machin
On 31/05/2006 8:17 PM, Sion Arrowsmith wrote: > John Machin <[EMAIL PROTECTED]> wrote: >> Whitespace is a silly term, anyway (IMHO); is there such a >> thing as a space that is not white? > > Yes, if you go back to the term's origins in printshops. A solid > block of ink is space, not print, but

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  1   2   >