Re: How to Teach Python "Variables"

2007-11-29 Thread Hendrik van Rooyen
"J. Clifford Dyer" wrote: > This thread is bleedin' demised. No, you have stunned it. Delicate threads stun easily. To get back to the original question, namely how to teach the concept of a python variable, I would probably take a harder look at the "wandering names" analogy. I think it wa

Science list

2007-11-29 Thread Francesco Pietra
It is true that suggestions may arrive from all directions. Nonetheless, this extremely useful list is so crowded that if checking email is not carried out every few hours, it is difficult to detect other messages in the plethora of pythons and spams arrived. What happens if email is disregarded fo

How do I not make a list?

2007-11-29 Thread Just Another Victim of the Ambient Morality
It may sound like a strange question but that's probably only because I don't know the proper terminology. I have an iterable object, like a list, and I want to perform a transform on it (do an operation on each of the elements) and then pass it onto something else that expects and iterable

Re: Bundling Python on Mac

2007-11-29 Thread Diez B. Roggisch
Benjamin schrieb: > Hello, I'm writing a Python/PyQt application. For my Mac distribution. > I would like to include all the needed libraries in the Mac bundle. > How should I go about doing this? The py2app distutils extension should do that for you. It works flawless for PyObjc-apps for me - it

Re: How do I not make a list?

2007-11-29 Thread Amit Khemka
On 11/29/07, Just Another Victim of the Ambient Morality <[EMAIL PROTECTED]> wrote: > It may sound like a strange question but that's probably only because I > don't know the proper terminology. I have an iterable object, like a list, > and I want to perform a transform on it (do an operation

Determine whether program was started by clicking icon or command line

2007-11-29 Thread Benjamin Hell
Hi! I wonder whether there might be a way to find out how a Python program was started (in my case in Windows): By double clicking the file or by calling it on the "DOS" command line prompt. Background: I would like to have the program run in an "interactive mode" if double clicked, and silently

Re: How do I not make a list?

2007-11-29 Thread Diez B. Roggisch
Just Another Victim of the Ambient Morality schrieb: > It may sound like a strange question but that's probably only because I > don't know the proper terminology. I have an iterable object, like a list, > and I want to perform a transform on it (do an operation on each of the > elements) a

X/Linux mouse_event (like in win32api)

2007-11-29 Thread Atila Olah
Hello everyone. I would like to be able to emit a mouse click on my xgl/compiz desktop, like I used to do in Windows: win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN, x, y, 0) win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP, x, y, 0) I installed Python and pywin32 in wine and they both work,

Re: Science list

2007-11-29 Thread Stef Mientki
Francesco Pietra wrote: > It is true that suggestions may arrive from all directions. Nonetheless, this > extremely useful list is so crowded that if checking email is not carried out > every few hours, it is difficult to detect other messages in the plethora of > pythons and spams arrived. What ha

Re: Very basic, sorting a list ???

2007-11-29 Thread Stef Mientki
Peter Decker wrote: > On Nov 28, 2007 7:22 PM, stef mientki <[EMAIL PROTECTED]> wrote: >> print 'xx3',ordered_list.sort() > > The sort() method returns None. It sorts the list in place; it doesn't > return a copy of the sorted list. > Thank you all for the answers, I do understand now, althou

Re: Very basic, sorting a list ???

2007-11-29 Thread cokofreedom
On Nov 29, 10:40 am, Stef Mientki <[EMAIL PROTECTED]> wrote: > Peter Decker wrote: > > On Nov 28, 2007 7:22 PM, stef mientki <[EMAIL PROTECTED]> wrote: > >> print 'xx3',ordered_list.sort() > > > The sort() method returns None. It sorts the list in place; it doesn't > > return a copy of the sort

Re: Very basic, sorting a list ???

2007-11-29 Thread Hrvoje Niksic
Stef Mientki <[EMAIL PROTECTED]> writes: > although I find it rather non-intuitive. > I didn't expect a copy, but a reference to itself wouldn't be asked > too much ? If you didn't expect a copy, why rely on the return value? You could simply continue using the sorted list. Your first post says

Re: Determine whether program was started by clicking icon or command line

2007-11-29 Thread Atila Olah
On Nov 29, 9:51 am, Benjamin Hell <[EMAIL PROTECTED]> wrote: > Hi! > > I wonder whether there might be a way to find out how a Python > program was started (in my case in Windows): By double clicking the > file or by calling it on the "DOS" command line prompt. I think it's not possible (or very t

Does changing a Tkinter Variable bound to a widget invoke its 'command' callback function?

2007-11-29 Thread execrable
I am writing a simple (maybe a bit conveluded, but I just started learning Tkinter) program that uses a 'notebook' code snippet from a python cookbook. It creates a customizable frame and radio button for each 'tab' and uses .forget to hide the frames that aren't 'current'. I modified it to use a

Re: Very basic, sorting a list ???

2007-11-29 Thread Stef Mientki
Hrvoje Niksic wrote: > Stef Mientki <[EMAIL PROTECTED]> writes: > >> although I find it rather non-intuitive. >> I didn't expect a copy, but a reference to itself wouldn't be asked >> too much ? > > If you didn't expect a copy, why rely on the return value? You could > simply continue using the

wxPython and Tkinter

2007-11-29 Thread whatazor
Hi all, I migrate some code from tkinter to wxpython. I need the equivalent Tkinter method Tkinter.Tk.after in wxPython, but I'm not able to find it. It exist or there are other trick to emulate it? thank you w -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython and Tkinter

2007-11-29 Thread whatazor
On 29 Nov, 11:50, whatazor <[EMAIL PROTECTED]> wrote: > Hi all, > I migrate some code from tkinter to wxpython. I need the equivalent > Tkinter method Tkinter.Tk.after > in wxPython, but I'm not able to find it. It exist or there are other > trick to emulate it? > > thank you > w "after" in Tk met

Re: wxPython and Tkinter

2007-11-29 Thread Mathias Uebelacker
Hello, take a look here [1]. I think its a got place to start. br Mathias [1] http://sebsauvage.net/python/gui/#import 2007/11/29, whatazor <[EMAIL PROTECTED]>: > > Hi all, > I migrate some code from tkinter to wxpython. I need the equivalent > Tkinter method Tkinter.Tk.after > in wxPython, but

Re: Try/Except/Yield/Finally...I'm Lost :-}

2007-11-29 Thread Vlastimil Brom
2007/11/28, Victor Subervi <[EMAIL PROTECTED]>: > > Hi; > I am trying to find words in a document that are identical to any word in > a vocabulary list, to replace that word with special markup. Let's say the > word is "dharma". I don't want to replace the first few letters of, say > "dharmawuhirfu

PIL image.getcolors

2007-11-29 Thread Robin Becker
I have an RGBA .png which PIL is able to read and I would like to convert the image to a simple RGB image with a single colour reserved for transparent as the A channel is either all on or all off. I thought I could use the the im.getcolors method to find the colours used by the image, but it

GUI builder tool

2007-11-29 Thread tarun
Hi All, Please help me in selecting the best tool for developing wxPython GUIs. I'm preparing a tool that has explorer,editor and log window using wxPython.. I've heard some namely wxGlade,Boa,etc.. Which one would be the best. Thanks in Advance Regards, Tarun -- http://mail.python.org/mailman/

Variables and their domain

2007-11-29 Thread Jose Ignacio Gisbert
Hi all, I have one doubt, in my applciation I have a method (Method1) which has other method (Method2) inside of it. Ok, in my first method I define a variable "lista" which is an array, an other one, "lb", which is a listbox with some elements inserted from lista. Then, when I do a double clic

Re: Tuning question

2007-11-29 Thread Dustan
On Nov 28, 3:15 pm, Wally Lepore <[EMAIL PROTECTED]> wrote: > Hi Graham > > Is this email still good? Not anymore. You just gave it out to millions of spammers on Usenet. > Its been awhile since we spoke last on the tuning list. Are you still on > Yahoo messenger? > Also, what is your email addre

Monkey patching new style classes

2007-11-29 Thread David Coffin
Is it possible to add an attribute to a new style class where the name of that attribute is determined at runtime? In other words, is there an new style class alternative to adding items to a classes __dict__ ? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Lib for audio?

2007-11-29 Thread Dave
I need to read microphone input and determine frequency. Is there a lib for that? Thanks, Dave -- http://mail.python.org/mailman/listinfo/python-list

PyPubSub module version 3 usage

2007-11-29 Thread Frank Aune
Hello, I just recently found out that wx.lib.pubsub has finally moved away from wx, and now lives at: http://pubsub.wiki.sourceforge.net I'm trying to use pubsub3, which is the third version and now the default one, but I'm having a hard time creating topics and messages for sending: class T

any Templating system help

2007-11-29 Thread Ravi Kumar
Hi, I am stuck a little. I am working on a demo site to propose for the my company. Using mod_python and several python technologies. But the website is simply using publisher handler, i dont want to use any framework such as DJango etc. so the main idea is, i made many python files which has sev

Re: wxPython and Tkinter

2007-11-29 Thread imbunche
On Nov 29, 7:56 am, whatazor <[EMAIL PROTECTED]> wrote: > On 29 Nov, 11:50, whatazor <[EMAIL PROTECTED]> wrote: > > > Hi all, > > I migrate some code from tkinter to wxpython. I need the equivalent > > Tkinter method Tkinter.Tk.after > > in wxPython, but I'm not able to find it. It exist or there a

Re: How do I not make a list?

2007-11-29 Thread Neil Cerutti
On 2007-11-29, Just Another Victim of the Ambient Morality <[EMAIL PROTECTED]> wrote: > It may sound like a strange question but that's probably only > because I don't know the proper terminology. I have an > iterable object, like a list, and I want to perform a transform > on it (do an operation

Re: Tkinter, wxPython, PyGtk, or PyQt...

2007-11-29 Thread kyosohma
On Nov 28, 7:34 pm, "John Jameson" <[EMAIL PROTECTED]> wrote: > hi carl, > > I'm totally new with graphics for python. I'm using windows, but you > make it sound like I need to know how to program with MFC to use them? > Is this true? Can't you just stay in python? > best, > John > > I would like l

Re: wxPython and Tkinter

2007-11-29 Thread kyosohma
On Nov 29, 7:14 am, imbunche <[EMAIL PROTECTED]> wrote: > On Nov 29, 7:56 am, whatazor <[EMAIL PROTECTED]> wrote: > > > On 29 Nov, 11:50, whatazor <[EMAIL PROTECTED]> wrote: > > > > Hi all, > > > I migrate some code from tkinter to wxpython. I need the equivalent > > > Tkinter method Tkinter.Tk.aft

Re: Lib for audio?

2007-11-29 Thread Shane Geiger
This should do the trick: http://www.libsdl.org/ Dave wrote: > I need to read microphone input and determine frequency. Is there a lib > for that? > > Thanks, > Dave > -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.n

Re: Science list

2007-11-29 Thread Bjoern Schliessmann
Francesco Pietra wrote: > Nonetheless, this extremely useful list is so crowded that if > checking email is not carried out every few hours, it is difficult > to detect other messages in the plethora of pythons and spams > arrived. Why don't you use a newsreader to access comp.lang.python? It's s

Re: Control mouse position and clicking

2007-11-29 Thread Bjoern Schliessmann
Tony wrote: [place mouse programmatically] > well, you can do it from Java, Are you absolutely positive? IIRC the Mac UI guidelines forbid such things, and there's no API function for it; so Java wouldn't have any chance. Regards, Björn -- BOFH excuse #136: Daemons loose in system. -- htt

Re: Lib for audio?

2007-11-29 Thread Tim Chase
>> I need to read microphone input and determine frequency. Is there a lib >> for that? Yet one more possibility includes the OpenAL Python bindings: http://home.gna.org/oomadness/en/pyopenal/index.html -tkc -- http://mail.python.org/mailman/listinfo/python-list

Re: any Templating system help

2007-11-29 Thread Yoram Hekma
On Thu, Nov 29, 2007 at 06:48:10PM +0530, Ravi Kumar wrote: > Hi, > I am stuck a little. I am working on a demo site to propose for the my > company. Using mod_python and several python technologies. But the website > is simply using publisher handler, i dont want to use any framework such as > DJ

Re: wxPython and Tkinter

2007-11-29 Thread Chris Mellon
On Nov 29, 2007 7:54 AM, <[EMAIL PROTECTED]> wrote: > > On Nov 29, 7:14 am, imbunche <[EMAIL PROTECTED]> wrote: > > On Nov 29, 7:56 am, whatazor <[EMAIL PROTECTED]> wrote: > > > > > On 29 Nov, 11:50, whatazor <[EMAIL PROTECTED]> wrote: > > > > > > Hi all, > > > > I migrate some code from tkinter t

Re: Lib for audio?

2007-11-29 Thread kyosohma
On Nov 29, 6:04 am, Dave <[EMAIL PROTECTED]> wrote: > I need to read microphone input and determine frequency. Is there a lib > for that? > > Thanks, > Dave You might take a look at the ossaudiodev module (note: it's #nix only): http://docs.python.org/lib/module-ossaudiodev.html http://docs.pytho

Re: Science list

2007-11-29 Thread Francesco Pietra
I was trying to suggest a more specific mail-list in order not to be floaded. I am the opinion that python-list@python.org is very informative and useful, though it is hard to find the time for so many mails. f. --- Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: > Francesco Pietra wrote: > > Non

Re: Lib for audio?

2007-11-29 Thread Laurent Pointal
Dave a écrit : > I need to read microphone input and determine frequency. Is there a lib > for that? > > Thanks, > Dave Another possible solution, the PortAudio binding (pyportaudio). http://people.csail.mit.edu/hubert/pyaudio/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python web frameworks

2007-11-29 Thread Aaron Watters
On Nov 22, 11:22 pm, SamFeltus <[EMAIL PROTECTED]> wrote: > """Perhaps we need a pythonic FRONTEND. """ > > Should have happened years ago. It did. Mark Hammond embedded Python under MSIE about the same time javascript and java applets came along (94, maybe?) It didn't fly because of political an

How to suggest a new Python list? Was: Science list

2007-11-29 Thread J. Robertson
Francesco Pietra wrote: > I was trying to suggest a more specific mail-list in order not to be floaded. > I > am the opinion that python-list@python.org is very informative and useful, > though it is hard to find the time for so many mails. > f. > I agree with Francesco: Python is increasingly

Re: Books on Python

2007-11-29 Thread [EMAIL PROTECTED]
I've read "Begining Python" written by Hetland from Apress. I enjoyed it a lot. I also liked reading "Dive into Python" (also from Apress) for those who already know a language. A free edition is at diveintopython.org. -- http://mail.python.org/mailman/listinfo/python-list

Re: Science list

2007-11-29 Thread Francesco Pietra
Do you know if "free" yahoo.com allows threaded view for python only? I was unable to set that. This also means that there are mailing lists I am interested to view all that is going on (which is two orders less that python), so that i can't sett threated viw for all mailing lists. f. --- nmp <[EM

Re: Control mouse position and clicking

2007-11-29 Thread Glich
I am running ubuntu. :) -- http://mail.python.org/mailman/listinfo/python-list

PIL image.filter -> boundaries

2007-11-29 Thread [EMAIL PROTECTED]
Hi, I'm filtering an image with a custom kernel. It works fine, except for the boundaries. image.filter() seems to add a 1px zero-border to the image to process the pixels at the boundaries of the image.I'd rather have it replicate the values of the boundary pixels. Is this an option and where can

Re: How to suggest a new Python list? Was: Science list

2007-11-29 Thread A.T.Hofkamp
On 2007-11-29, J. Robertson <[EMAIL PROTECTED]> wrote: > Francesco Pietra wrote: >> I was trying to suggest a more specific mail-list in order not to be >> floaded. I >> am the opinion that python-list@python.org is very informative and useful, >> though it is hard to find the time for so many ma

Re: looking for ocbc example

2007-11-29 Thread supercooper
On Nov 28, 2:43 am, Tim Golden <[EMAIL PROTECTED]> wrote: > Carl K wrote: > > jay graves wrote: > >> On Sep 21, 2:43 am, Tim Golden <[EMAIL PROTECTED]> wrote: > >>> Carl K wrote: > It seems there are 2 odbc modules - pyOdbc and mxOdbc - anyone know the > difference? > >>> In short, pyodb

Building Python 2.5.0 on AIX 5.3 - Undefined symbol: .__floor

2007-11-29 Thread NM
Hi, We have also many problems compiling Python on AIX 5.3 with same erros, could be kind enough to tell us ohw to solve the problem ou the right parameters to compil python. Many thanks in advance. Nicolas-- http://mail.python.org/mailman/listinfo/python-list

Re: Python web frameworks

2007-11-29 Thread TYR
On Nov 29, 3:15 pm, Aaron Watters <[EMAIL PROTECTED]> wrote: > On Nov 22, 11:22 pm, SamFeltus <[EMAIL PROTECTED]> wrote: > > > """Perhaps we need a pythonic FRONTEND. """ > > > Should have happened years ago. > > It did. Mark Hammond embedded Python under MSIE about > the same time javascript and

Re: Very basic, sorting a list ???

2007-11-29 Thread self.mrlimbo
On 29 nov, 04:11, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > Stef Mientki <[EMAIL PROTECTED]> writes: > > although I find it rather non-intuitive. > > I didn't expect a copy, but a reference to itself wouldn't be asked > > too much ? > > If you didn't expect a copy, why rely on the return value? Y

SMTPLIB & email.MIMEText : Certain charaters in the body stop mail from arriving. Why?

2007-11-29 Thread West, Harvey
Hello Sending mail with certain characters in the body causes mail never to arrive. Why? e.g if body text has a fullstop "." mail never arrives. I'm using python 4.2 on windows. Harvey # import smtplib

Re: Tkinter, wxPython, PyGtk, or PyQt...

2007-11-29 Thread gsal
is PyQt related to Qt? I presume so. is Qt needed for PyQt? is PyQt usable in all platforms Python is available and is it GPLed, too? I read TrollTech webpage on QT and the Windows version is not free for in-house development in the private industry; licenses start around $6000 for the first yea

Re: Tkinter, wxPython, PyGtk, or PyQt...

2007-11-29 Thread Diez B. Roggisch
gsal schrieb: > is PyQt related to Qt? I presume so. > > is Qt needed for PyQt? Sure. > is PyQt usable in all platforms Python is available and is it GPLed, > too? Yes. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Any Pythonista knowing Estonian on this list?

2007-11-29 Thread André
Two nice Python fans (Pearu and Raul) have contacted me about this. Thanks! On Nov 28, 10:39 pm, "André" <[EMAIL PROTECTED]> wrote: > Some of the tasks that are part of Google's H.O.P. involved > translation (i18n) of some well-known ... and some lesser known > projects. I have received a transla

Re: Control mouse position and clicking

2007-11-29 Thread Robert Kern
Bjoern Schliessmann wrote: > Tony wrote: > > [place mouse programmatically] >> well, you can do it from Java, > > Are you absolutely positive? IIRC the Mac UI guidelines forbid such > things, and there's no API function for it; so Java wouldn't have > any chance. There is an API for it. Not all

Re: Control mouse position and clicking

2007-11-29 Thread Robert Kern
Glich wrote: > hi, how can I, control mouse position and clicking from python? > > I want to interact with a flash application inside firefox. thanks. > > ps: I am not using windows. I've use the external program xte with some success if you don't send it too many events too quickly. I start it

only test

2007-11-29 Thread Rui Li
this is a test -- http://mail.python.org/mailman/listinfo/python-list

Re: only test

2007-11-29 Thread Goldencat
On Thu, 29 Nov 2007 18:56:31 +, Rui Li wrote: > this is a test test on reply -- http://mail.python.org/mailman/listinfo/python-list

setters and getters in python 2.6 and 3.0

2007-11-29 Thread Daniel Fetchinson
Hi list, I've been following a discussion on a new way of defining getters and setters on python-dev and just can't understand what the purpose is. Everybody agreed on the dev list that this is a good idea so I guess it must be right :) The whole thing started with this post of Guido: http://mail

Re: Determine whether program was started by clicking icon or command line

2007-11-29 Thread Roger Miller
On Nov 28, 10:51 pm, Benjamin Hell <[EMAIL PROTECTED]> wrote: > Hi! > > I wonder whether there might be a way to find out how a Python > program was started (in my case in Windows): By double clicking the > file or by calling it on the "DOS" command line prompt. > > Background: I would like to have

Detecting mod_rewrite via CGI

2007-11-29 Thread Samuel
Hi, I am using an Apache webserver with mod_rewrite and the cgi module. Is there a way to do the following that isn't completely evil? def mod_rewrite_enabled(): try: file = open(os.path.join(os.environ['DOCUMENT_ROOT'], '.htaccess')) except: return False for

Re: setters and getters in python 2.6 and 3.0

2007-11-29 Thread Diez B. Roggisch
Daniel Fetchinson schrieb: > Hi list, I've been following a discussion on a new way of defining > getters and setters on python-dev and just can't understand what the > purpose is. Everybody agreed on the dev list that this is a good idea > so I guess it must be right :) > > The whole thing starte

Oh no, my code is being published ... help!

2007-11-29 Thread rm
There is a Linux forum that I frequent from time to time on which I mentioned a couple of scripts that I wrote. The editors of a small Linux magazine heard and found them interesting enough to ask me to write an article about them. I accepted gladly, of course. I wrote the article and submitted

How to Split a String

2007-11-29 Thread Siah
Hi, I need to convert the string: '(a, b, "c", d, "e")' into the following list ['a', 'b', 'c', 'd', 'e']. Much like a csv reader does. I usually use the split function, but this mini-monster wouldn't properly get split up due to those random quotations postgresql returns to me. Please help me wi

A context manager for temporary memoization.

2007-11-29 Thread Michael Speer
I posted this to my blog at http://michaelspeer.blogspot.com/2007/11/context-manager-for-temporary.html. I decided to forward it onto the list for comments. I thought someone might find it interesting. *** This is very much a fragile hack at the moment. It's an interesting idea I think. I was d

Job posting on the site is broken

2007-11-29 Thread sjol
To the webmaster of python.org, I have tried to have a job posted on the job board but! Alas, it doesn't work and I cannot get a response from the webmaster. Shall I post here ? Stephane -- http://mail.python.org/mailman/listinfo/python-list

Re: How to Split a String

2007-11-29 Thread Grant Edwards
On 2007-11-29, Siah <[EMAIL PROTECTED]> wrote: > I need to convert the string: '(a, b, "c", d, "e")' into the following > list ['a', 'b', 'c', 'd', 'e']. Much like a csv reader does. http://docs.python.org/lib/module-csv.html -- Grant Edwards grante Yow! ... the HI

Re: How to Split a String

2007-11-29 Thread Tim Chase
> I need to convert the string: '(a, b, "c", d, "e")' into the > following list ['a', 'b', 'c', 'd', 'e']. Much like a csv > reader does. I usually use the split function, but this > mini-monster wouldn't properly get split up due to those > random quotations postgresql returns to me. Uh...use the

Outbound HTML Authentication

2007-11-29 Thread Mudcat
Hi, I was trying to do a simple web scraping tool, but the network they use at work does some type of internal authentication before it lets the request out of the network. As a result I'm getting the '401 - Authentication Error' from the application. I know when I use a web browser or other appl

Re: How to Split a String

2007-11-29 Thread imho
Siah ha scritto: > Hi, > > I need to convert the string: '(a, b, "c", d, "e")' into the following > list ['a', 'b', 'c', 'd', 'e']. Much like a csv reader does. I usually > use the split function, but this mini-monster wouldn't properly get > split up due to those random quotations postgresql retu

Re: Control mouse position and clicking

2007-11-29 Thread Bjoern Schliessmann
Glich wrote: > I am running ubuntu. :) I neither asserted differently nor am I competent in clairvoyance. Regards, Björn -- BOFH excuse #93: Feature not yet implemented -- http://mail.python.org/mailman/listinfo/python-list

Re: How to Split a String

2007-11-29 Thread Bjoern Schliessmann
Siah wrote: > I need to convert the string: '(a, b, "c", d, "e")' into the > following list ['a', 'b', 'c', 'd', 'e']. Much like a csv reader > does. I usually use the split function, but this mini-monster > wouldn't properly get split up due to those random quotations > postgresql returns to me.

Re: Control mouse position and clicking

2007-11-29 Thread Bjoern Schliessmann
Robert Kern wrote: > There is an API for it. Not all programs have GUIs so the HIG > doesn't restrict the scope of the OS's APIs. Ah, okay. In (IIRC) wxPython docs, I read differently. Regards, Björn -- BOFH excuse #40: not enough memory, go get system upgrade -- http://mail.python.org/m

Re: Outbound HTML Authentication

2007-11-29 Thread Chris Mellon
On Nov 29, 2007 2:22 PM, Mudcat <[EMAIL PROTECTED]> wrote: > Hi, > > I was trying to do a simple web scraping tool, but the network they > use at work does some type of internal authentication before it lets > the request out of the network. As a result I'm getting the '401 - > Authentication Error

Re: Outbound HTML Authentication

2007-11-29 Thread Shane Geiger
twill is a simple language for browsing the Web. It's designed for automated testing of Web sites, but it can be used to interact with Web sites in a variety of ways. In particular, twill supports form submission, cookies, redirects, and HTTP authentication. Mudcat wrote: > Hi, > > I was tryin

Re: Outbound HTML Authentication

2007-11-29 Thread Tyler Reguly
Hello, You should probably read the HTTP RFC is you're going to write a screen scraper... but either way. 401 tells you that Auth is required there are several types of "server-based auth" (Different from form based auth)... They include - Basic - Digest - NTLM (or Negotiate) Basic

Re: Determine whether program was started by clicking icon or command line

2007-11-29 Thread Benjamin Hell
Roger Miller wrote: >> I wonder whether there might be a way to find out how a Python >> program was started (in my case in Windows): By double clicking >> the file or by calling it on the "DOS" command line prompt. > > I'm not sure whether this applies to your situation, but often > programs st

Re: How to Split a String

2007-11-29 Thread Siah
The basic split/strip method wouldn't split '(a, b, "c,...", d)', which is why I chose not to use it. The csv solution seems to work well, that helped me much here (thank you), but I am looking to see if I can get it solved with some regular expression. This is how far I've come so far, but it nee

Re: How to Split a String

2007-11-29 Thread Grant Edwards
On 2007-11-29, Grant Edwards <[EMAIL PROTECTED]> wrote: >> One solution: >> >> >>> s = '(a, b, "c", d, "e")' >> >>> print [x.strip('" ') for x in s.strip('()').split(',')] >> ['a', 'b', 'c', 'd', 'e'] > > That fails when a quoted string contains commas: > s = '(a, b, "c", d, "e,f,g")' pr

Re: How to Split a String

2007-11-29 Thread Siah
Thanks Mr. Edwards, I went ahead and started using the csv reader. Sia -- http://mail.python.org/mailman/listinfo/python-list

Using Windows Apache2triad with python. Need feedback form

2007-11-29 Thread kam
I need to process post data from a web feedback form and create an email which will be sent to me. (Something like cgiemail but with python code) Does anyone have suggestions/samples? -- http://mail.python.org/mailman/listinfo/python-list

Accessing a URL file Remotely

2007-11-29 Thread mcl
I have been given a url of CSV file (http://hostname/dir/file.csv), which when I put the full URL in a web browser shows the contents of the file. I want to be able to use the CSV module to read that file, which I have successfully used with a local CSV file. Any examples anywhere would be apprec

Re: How to Split a String

2007-11-29 Thread Grant Edwards
On 2007-11-29, imho <[EMAIL PROTECTED]> wrote: > Siah ha scritto: >> Hi, >> >> I need to convert the string: '(a, b, "c", d, "e")' into the following >> list ['a', 'b', 'c', 'd', 'e']. Much like a csv reader does. I usually >> use the split function, but this mini-monster wouldn't properly get >>

Is os.lstat available on all platforms?

2007-11-29 Thread Giampaolo Rodola'
Hi there. In a code of mine I'd like to use os.lstat whenever possible. My only concern is if it's available on all platforms. It could be safe using always os.lstat instead of: try: os.lstat except AttributeError: os.stat ...? As far as I know where symlinks are not supported os.lstat sh

Re: setters and getters in python 2.6 and 3.0

2007-11-29 Thread Daniel Fetchinson
> > Hi list, I've been following a discussion on a new way of defining > > getters and setters on python-dev and just can't understand what the > > purpose is. Everybody agreed on the dev list that this is a good idea > > so I guess it must be right :) > > > > The whole thing started with this post

Re: Is os.lstat available on all platforms?

2007-11-29 Thread Christian Heimes
Giampaolo Rodola' wrote: > As far as I know where symlinks are not supported os.lstat should be > an alias for os.stat but I'm not 100% sure. You are right, it should be an alias. os.lstat is available on Windows, too. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Is os.lstat available on all platforms?

2007-11-29 Thread Giampaolo Rodola'
I'd just want to be sure that even on a strange python implementation I won't ever get an AttributeError exception because os.lstat is not defined. -- http://mail.python.org/mailman/listinfo/python-list

Re: Job posting on the site is broken

2007-11-29 Thread Ben Finney
sjol <[EMAIL PROTECTED]> writes: > To the webmaster of python.org, > > I have tried to have a job posted on the job board but! Alas, it > doesn't work and I cannot get a response from the webmaster. > > Shall I post here ? No. But, since you say webmaster is not responding, asking here (as you

Re: How to Split a String

2007-11-29 Thread imho
Grant Edwards ha scritto: >> One solution: >> > s = '(a, b, "c", d, "e")' > print [x.strip('" ') for x in s.strip('()').split(',')] >> ['a', 'b', 'c', 'd', 'e'] > > That fails when a quoted string contains commas: > s = '(a, b, "c", d, "e,f,g")' print [x.strip('" ') for x in s.

Re: os.path.islink documentation error?

2007-11-29 Thread Giampaolo Rodola'
:) You're right... My skimpy English cheated me. -- http://mail.python.org/mailman/listinfo/python-list

Using marshal to manually "import" a python module

2007-11-29 Thread David Hirschfield
I had a situation recently that required I manually load python bytecode from a .pyc file on disk. So, for the most part, I took code from imputil.py which loads the .pyc data via the marshal module and then exec's it into a newly created module object (created by imp.new_module()). The relevan

Re: Accessing a URL file Remotely

2007-11-29 Thread TheSeeker
On Nov 29, 3:13 pm, mcl <[EMAIL PROTECTED]> wrote: > I have been given a url of CSV file (http://hostname/dir/file.csv), > which when I put the full URL in a web browser shows the contents of > the file. > > I want to be able to use the CSV module to read that file, which I > have successfully used

Embedding Python - Passing by Reference

2007-11-29 Thread andy
I understand the parameters to Python functions are passed by reference: def foo(a): a = a + 1 Will change the value of a in the calling function. How do I implement the equivalent in C when extending Python? I know how to write a function that can be called from Python and I know how to use P

Re: A context manager for temporary memoization.

2007-11-29 Thread Carl Banks
On Nov 29, 3:20 pm, "Michael Speer" <[EMAIL PROTECTED]> wrote: > I posted this to my blog > athttp://michaelspeer.blogspot.com/2007/11/context-manager-for-temporar > > I decided to forward it onto the list for comments. I thought someone > might find it interesting. > > *** > > This is very m

Dynamically adding a runtime generated method to a class.

2007-11-29 Thread Joe Goldthwaite
I'm not sure how to even ask this question. I'm working on a financial reporting application. The current system is very limited in what it can display. You can see reports with columns of Period, Quarter, Year to date or you can see a yearly trend. I'd like for the users to be able to define t

Yet Another Tabular Data Question

2007-11-29 Thread patrick . waldo
Hi all, Fairly new Python guy here. I am having a lot of trouble trying to figure this out. I have some data on some regulations in Excel and I need to basically add up the total regulations for each country--a statistical analysis thing that I'll copy to another Excel file. Writing with pyExcel

Re: Embedding Python - Passing by Reference

2007-11-29 Thread Jean-Paul Calderone
On Thu, 29 Nov 2007 14:39:52 -0800 (PST), [EMAIL PROTECTED] wrote: >I understand the parameters to Python functions are passed by >reference: > >def foo(a): > a = a + 1 > >Will change the value of a in the calling function. How do I implement >the equivalent in C when extending Python? You misund

Re: Science list

2007-11-29 Thread Terry Reedy
As I said in response to the original post, there are 200 specialized Python mailing lists accessible for free as newsgroups via news.gmane.org. I think a few are science oriented. -- http://mail.python.org/mailman/listinfo/python-list

Re: Variables and their domain

2007-11-29 Thread Terry Reedy
"Jose Ignacio Gisbert" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | I have one doubt, in my applciation I have a method (Method1) which has | other method (Method2) inside of it. You have a function inside a function. In Python, methods are functions bound to classes. |

  1   2   >