Re: removing common elemets in a list

2007-05-15 Thread Gary Herron
[EMAIL PROTECTED] wrote: > Hi, > Suppose i have a list v which collects some numbers,how do i > remove the common elements from it ,without using the set() opeartor. > Thanks > > Several ways, but probably not as efficient as using a set

Re: removing common elemets in a list

2007-05-15 Thread Tim Golden
[EMAIL PROTECTED] wrote: > Hi, > Suppose i have a list v which collects some numbers,how do i > remove the common elements from it ,without using the set() opeartor. Is this a test? Why don't you want to use the set operator? Anyway, you can just move things from one list into another excludi

Re: Spotting Crashed Application

2007-05-15 Thread Tim Golden
Steve Holden wrote: >> Robert Rawlins - Think Blue wrote: >> I’ve got an application that I’ve written, and it sits in an embedded >> system, from time to time the application will crash, I’m not quite sure >> what’s causing this, but as we test it more and more we’ll grasp a >> better underst

removing common elemets in a list

2007-05-15 Thread saif . shakeel
Hi, Suppose i have a list v which collects some numbers,how do i remove the common elements from it ,without using the set() opeartor. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Interesting list Validity (True/False)

2007-05-15 Thread [EMAIL PROTECTED]
On May 15, 7:07 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 15 May 2007 14:01:20 -0300, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> escribió: > > > On May 15, 12:30 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > > wrote: > >> And said section 5.9 should be updated too: "The objects need

^? Britney Gets Boob Job L@@K

2007-05-15 Thread ready . or . special5
http://scargo.in/2007/05/mortgage-defaults-increase-arkansas.html - See Videos and Pics of Brineys Failed Boob Job -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Pierre Hanser
[EMAIL PROTECTED] a écrit : > On May 15, 3:28 pm, René Fleschenberg <[EMAIL PROTECTED]> wrote: >> We all know what the PEP is about (we can read). The point is: If we do >> not *need* non-English/ASCII identifiers, we do not need the PEP. If the >> PEP does not solve an actual *problem* and still i

Re: Interesting list Validity (True/False)

2007-05-15 Thread [EMAIL PROTECTED]
On May 15, 9:23�pm, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Mon, 14 May 2007 11:41:21 -0700, [EMAIL PROTECTED] wrote: > > On May 13, 8:24 am, Steven D'Aprano > > <[EMAIL PROTECTED]> wrote: > >> On Sat, 12 May 2007 21:50:12 -0700, [EMAIL PROTECTED] wrote: > > > I intended to reply to this ye

Re: Quote aware split

2007-05-15 Thread obaudys
On May 16, 1:18 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > The "is" operator checks object *identity*, that is, if both operands are > actually the same object. It may or may not work here, depending on many > implementation details. You really should check if they are *equal* > instead:

Re: Distributing programs depending on third party modules.

2007-05-15 Thread Tina I
Kevin Walzer wrote: > > What platform are you doing this on? On the Linux platform, "dependency > hell" of this sort is pretty much unavoidable, because there are so many > different packaging systems (apt, rpm, and so on): it's standard to let > the package manager handle these dependencies. A

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Terry Reedy
"Aldo Cortesi" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | I must admit to a fascination with language myself - I even have a degree in | English literature to prove it! To be fair to Steven, I've asked some of my | colleagues here in Sydney about their reactions to the phrase

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread rurpy
On May 15, 3:28 pm, René Fleschenberg <[EMAIL PROTECTED]> wrote: > We all know what the PEP is about (we can read). The point is: If we do > not *need* non-English/ASCII identifiers, we do not need the PEP. If the > PEP does not solve an actual *problem* and still introduces some > potential for *n

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread [EMAIL PROTECTED]
Steven D'Aprano wrote: > I've made various comments to other people's responses, so I guess it is > time to actually respond to the PEP itself. > > On Sun, 13 May 2007 17:44:39 +0200, Martin v. Lo:wis wrote: > > > PEP 1 specifies that PEP authors need to collect feedback from the > > community. As

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Aldo Cortesi
Thus spake Alex Martelli ([EMAIL PROTECTED]): > I can't find any reference for Steven's alleged idiomatic use of "by > eye", either -- _however_, my wife Anna (an American from Minnesota) > came up with exactly the same meaning when I asked her if "by eye" had > any idiomatic connotations, so I s

Re: url question - extracting (2 types of) domains

2007-05-15 Thread Gabriel Genellina
En Tue, 15 May 2007 23:04:02 -0300, lazy <[EMAIL PROTECTED]> escribió: > Im trying to extract the domain name from an url. lets say I call > it full_domain and significant_domain(which is the homepage domain) > Eg: url=http://en.wikipedia.org/wiki/IPod , > full_domain=en.wikipedia.org ,significant

Re: Newbie Question: Getting a list of files

2007-05-15 Thread Steven D'Aprano
On Tue, 15 May 2007 17:12:01 -0700, Brian wrote: > How do I, in Python, obtain a recursive list of files in a specified > directory, including the subdirectories, etc? For example, in the old > MS-DOS days, we could specify at the command prompt "DIR /S" and this > would provide a listing of all

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Grant Edwards
On 2007-05-16, Alex Martelli <[EMAIL PROTECTED]> wrote: > Aldo Cortesi <[EMAIL PROTECTED]> wrote: > >> Thus spake Steven D'Aprano ([EMAIL PROTECTED]): >> >> > Perhaps you aren't aware that doing something "by eye" is idiomatic >> > English for doing it quickly, roughly, imprecisely. It is the oppo

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread [EMAIL PROTECTED]
Steven D'Aprano wrote: > On Tue, 15 May 2007 12:01:57 +0200, Rene Fleschenberg wrote: > > > Marc 'BlackJack' Rintsch schrieb: > >> You find it in the sources by the line number from the traceback and > >> the letters can be copy'n'pasted if you don't know how to input them > >> with your keymap or

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Alex Martelli
Aldo Cortesi <[EMAIL PROTECTED]> wrote: > Thus spake Steven D'Aprano ([EMAIL PROTECTED]): > > > Perhaps you aren't aware that doing something "by eye" is idiomatic > > English for doing it quickly, roughly, imprecisely. It is the opposite of > > taking the time and effort to do the job carefully

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Gregor Horvath
Ross Ridge schrieb: > non-ASCII identifiers. While it's easy to find code where comments use > non-ASCII characters, I was never able to find a non-made up example > that used them in identifiers. If comments are allowed to be none English, then why are identifier not? This is inconsistent becau

Re: inherit from file and create stdout instance?

2007-05-15 Thread MisterPete
> class Output(file): > def __init__(self, name, mode='w', buffering=None, verbosity=1): > super(Output, self).__init__(name, mode, buffering) > self.verbosity = verbosity > > def write(self, string, messageVerbosity=1): > if messageVerbosity <= self.verbosity >

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Gregor Horvath
René Fleschenberg schrieb: > > We all know what the PEP is about (we can read). The point is: If we do > not *need* non-English/ASCII identifiers, we do not need the PEP. If the > PEP does not solve an actual *problem* and still introduces some > potential for *new* problems, it should be rejected

Python Dijkstra Shortest Path

2007-05-15 Thread Hugo Ferreira
While trying to optimize this: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/119466 ... and still have a fast edge lookup, I've done the following tweaks: class PathFind(object): def __init__(self): self.G = defaultdict(dict) self.E = defaultdict(dict) def addE

Re: Recursion limit problems

2007-05-15 Thread Gabriel Genellina
En Tue, 15 May 2007 09:28:52 -0300, Diez B. Roggisch <[EMAIL PROTECTED]> escribió: >> with the same hash value. >> That is, you should define __hash__ and one of (__cmp__ or __eq__). >> __neq__ (inequality) isn't required nor used by dict/set implementation. >> (Anyway, Python will transform a!=

Re: Quote aware split

2007-05-15 Thread Gabriel Genellina
En Tue, 15 May 2007 21:50:15 -0300, Ondrej Baudys <[EMAIL PROTECTED]> escribió: > After trawling through the archives for a simple quote aware split > implementation (ie string.split-alike that only splits outside of > matching quote) and coming up short, I implemented a quick and dirty > funct

Re: inherit from file and create stdout instance?

2007-05-15 Thread MisterPete
On May 16, 1:50 pm, 7stud <[EMAIL PROTECTED]> wrote: > >but it is frustrating me that if I try to inherit from file it > >works fine for regular files > > I don't think that is correct characterization at all. What really > happens is that when you inherit from file, your class works when you > se

^? Britney Defaults for Boob Job!!!!!!

2007-05-15 Thread deepbroke6
http://scargo.in/2007/05/mortgage-defaults-increase-arkansas.html - Britney Spears Naked Boob Job defaults after she can't afford it, Doctors take back their silconon valley start up in this IOU scandal. Britney goes for gold and can't afford BOOB JOB!! -- http://mail.python.org/mailman/listi

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Steven D'Aprano
I've made various comments to other people's responses, so I guess it is time to actually respond to the PEP itself. On Sun, 13 May 2007 17:44:39 +0200, Martin v. Löwis wrote: > PEP 1 specifies that PEP authors need to collect feedback from the > community. As the author of PEP 3131, I'd like to

Re: Python Newbie Suggestions

2007-05-15 Thread Michael Tobis
I think http://www.diveintopython.org/ would be very suitable for you. mt -- http://mail.python.org/mailman/listinfo/python-list

Re: Interesting list Validity (True/False)

2007-05-15 Thread Steven D'Aprano
On Mon, 14 May 2007 11:41:21 -0700, [EMAIL PROTECTED] wrote: > On May 13, 8:24 am, Steven D'Aprano > <[EMAIL PROTECTED]> wrote: >> On Sat, 12 May 2007 21:50:12 -0700, [EMAIL PROTECTED] wrote: > > I intended to reply to this yesterday, but circumstances (see timeit > results) prevented it. > >> >

url question - extracting (2 types of) domains

2007-05-15 Thread lazy
Hi, Im trying to extract the domain name from an url. lets say I call it full_domain and significant_domain(which is the homepage domain) Eg: url=http://en.wikipedia.org/wiki/IPod , full_domain=en.wikipedia.org ,significant_domain=wikipedia.org Using urlsplit (of urlparse module), I will be able

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Aldo Cortesi
Thus spake Steven D'Aprano ([EMAIL PROTECTED]): > Perhaps you aren't aware that doing something "by eye" is idiomatic > English for doing it quickly, roughly, imprecisely. It is the opposite of > taking the time and effort to do the job carefully and accurately. If you > measure something "by eye"

Re: inherit from file and create stdout instance?

2007-05-15 Thread 7stud
On May 15, 7:43 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: >>... def __getattr__(self, name): >>... return getattr(self.file, name) Nice. -- http://mail.python.org/mailman/listinfo/python-list

Re: inherit from file and create stdout instance?

2007-05-15 Thread 7stud
>but it is frustrating me that if I try to inherit from file it >works fine for regular files I don't think that is correct characterization at all. What really happens is that when you inherit from file, your class works when you send the __init__ method a string, i.e. a filename. sys.stdout is

Re: inherit from file and create stdout instance?

2007-05-15 Thread Gabriel Genellina
En Tue, 15 May 2007 20:38:14 -0300, MisterPete <[EMAIL PROTECTED]> escribió: > I could make wrappers around all of the file methods but that kind > of defeats the purpose of inheriting from file. It's kind of odd to > inherit from file but then keep a file object (although then it would > at

Re: PEP 3131: Supporting Non-ASCII Identifiers - ambiguity issues

2007-05-15 Thread Steven D'Aprano
On Tue, 15 May 2007 10:44:37 -0700, John Nagle wrote: > We have to have visually unique identifiers. Well, Python has existed for years without such a requirement, so I think "have to" is too strong a term. Compare: thisisareallylongbutcompletelylegalidentiferandnotvisuallyuniqueataglance wi

Re: Trying to choose between python and java

2007-05-15 Thread Anthony Irwin
Hi All, Thanks to all that replied. I noticed that someone said that the way you used regular expressions changed at some point. That is probably what upset the person I was talking to about python they are a huge perl fan and use regular expressions heavily. The reason for asking about the .

/bin/sh: ./python: cannot execute binary file

2007-05-15 Thread cvncvbnvbn vbnvbnbn
I am very newbie to PYTHON, and cross-compiling python 2.4 with arm-linux. I am getting following error,, CC='/usr/local/openrg/openrg/pkg/build/rg_gcc' LDSHARED='/usr/local/openrg/openrg/pkg/build/rg_gcc -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py -q

Re: Interesting list Validity (True/False)

2007-05-15 Thread Steve Holden
[EMAIL PROTECTED] wrote: > On May 12, 11:02�pm, Steven D'Aprano [ ... ] > > But you can't trust a==d returning True to mean a and d are > "equal". To say the comparison means the two objects are > equal is misleading, in other words, wrong. It only takes one > turd to spoil the whole punchbowl. >

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Steven D'Aprano
On Tue, 15 May 2007 11:58:35 +0200, René Fleschenberg wrote: > Unless you are 150% sure that there will *never* be the need for a > person who does not know your language of choice to be able to read or > modify your code, the language that "fits the environment best" is > English. Just a touch

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Steven D'Aprano
On Tue, 15 May 2007 14:44:44 +0200, Anton Vredegoor wrote: > HYRY wrote: >>> - should non-ASCII identifiers be supported? why? >> Yes. I want this for years. I am Chinese, and teaching some 12 years >> old children learning programming. The biggest problem is we cannot use >> Chinese words for the

Re: Spotting Crashed Application

2007-05-15 Thread Steve Holden
Robert Rawlins - Think Blue wrote: > Hello Guys, > > > > I’ve got an application that I’ve written, and it sits in an embedded > system, from time to time the application will crash, I’m not quite sure > what’s causing this, but as we test it more and more we’ll grasp a > better understandin

Quote aware split

2007-05-15 Thread Ondrej Baudys
Hi, After trawling through the archives for a simple quote aware split implementation (ie string.split-alike that only splits outside of matching quote) and coming up short, I implemented a quick and dirty function that suits my purposes. It's ugly and it doesn't use a stack, it only supports a

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Steven D'Aprano
On Tue, 15 May 2007 13:05:12 +0200, René Fleschenberg wrote: > Any program that uses non-English identifiers in Python is bound to > become gibberish, since it *will* be cluttered with English identifiers > all over the place anyway, wether you like it or not. It won't be gibberish to the people

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Steven D'Aprano
On Tue, 15 May 2007 20:43:31 +1000, Aldo Cortesi wrote: > Thus spake Steven D'Aprano ([EMAIL PROTECTED]): > >> >> Me, I try to understand a patch by reading it. Call me >> >> old-fashioned. >> > >> > I concur, Aldo. Indeed, if I _can't_ be sure I understand a patch, I >> > don't accept it -- I a

Re: Newbie Question: Getting a list of files

2007-05-15 Thread John Machin
On May 16, 10:12 am, Brian <[EMAIL PROTECTED]> wrote: > Hello, > > I am currently working on putting together a free, open source, > anti-spyware program for the Mac (and eventually for other OS's too.) > However, there's one thing that I am currently trying to figure out: > > How do I, in Python,

Re: transparent images

2007-05-15 Thread half . italian
On May 15, 5:26 pm, [EMAIL PROTECTED] wrote: > Does any one know how to make a transparent image with specifically > PIL, but any standard python library will do. I need a spacer, and it > has to be transparent. > > Thanks Something like this...not my code...untested... im = Image.open("image.jpg

Re: Python Newbie Suggestions

2007-05-15 Thread Stephen Lewitowski
[EMAIL PROTECTED] wrote: > I'm a mechanical engineer with little experience programming. I've > used C++ and machine language for getting micro-controllers to work > and thats about it. I work allot with software developers at my job > and can read C++ code pretty good (ie. I understand whats going

Re: transparent images

2007-05-15 Thread Brian
[EMAIL PROTECTED] wrote: > Does any one know how to make a transparent image with specifically > PIL, but any standard python library will do. I need a spacer, and it > has to be transparent. > > Thanks > Does this have to be done through Python? If not, you might enjoy GIMP (http://www.gimp.o

transparent images

2007-05-15 Thread moishyyehuda
Does any one know how to make a transparent image with specifically PIL, but any standard python library will do. I need a spacer, and it has to be transparent. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Steven D'Aprano
On Tue, 15 May 2007 12:01:57 +0200, René Fleschenberg wrote: > Marc 'BlackJack' Rintsch schrieb: >> You find it in the sources by the line number from the traceback and >> the letters can be copy'n'pasted if you don't know how to input them >> with your keymap or keyboard layout. > > Typing them

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Steven D'Aprano
On Tue, 15 May 2007 09:09:30 +0200, Eric Brunel wrote: > Joke aside, this just means that I won't ever be able to program math in > ADA, because I have absolutely no idea on how to do a 'pi' character on > my keyboard. Maybe you should find out then? Personal ignorance is never an excuse for rej

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Matthew Woodcraft
Thorsten Kampe <[EMAIL PROTECTED]> wrote: >* René Fleschenberg (Tue, 15 May 2007 14:35:33 +0200) >> I am talking about the stdlib, not about the very few keywords Python >> has. Are you going to re-write the standard library in your native >> language so you can have a consistent use of natural la

The Pure Joy of Receiving PayPal Money

2007-05-15 Thread [EMAIL PROTECTED]
PAYPAL MAGIC!!! TURN $5 INTO $15,000 IN ONLY 30 DAYS...HERES HOW! This is a Money Scheme and Not, I repeat... This is Not a Scam!!! You have most likely seen or heard about this project on TV programs such as 20/20 and Oprah, or you may have read about it in the Wall Street Journal. If not, here

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Steven D'Aprano
On Tue, 15 May 2007 12:17:09 +0200, René Fleschenberg wrote: > Steven D'Aprano schrieb: >> How is that different from misreading "disk_burnt = True" as "disk_bumt >> = True"? In the right (or perhaps wrong) font, like the ever-popular >> Arial, the two can be visually indistinguishable. Or "call"

Newbie Question: Getting a list of files

2007-05-15 Thread Brian
Hello, I am currently working on putting together a free, open source, anti-spyware program for the Mac (and eventually for other OS's too.) However, there's one thing that I am currently trying to figure out: How do I, in Python, obtain a recursive list of files in a specified directory, incl

RE: Trying to choose between python and java

2007-05-15 Thread Delaney, Timothy (Tim)
Duncan Booth wrote: > "Hamilton, William " <[EMAIL PROTECTED]> wrote: > >> >> No, they'll work just fine. They just won't work with Python 3. >> It's not like the Python Liberation Front is going to hack into your >> computer in the middle of the night and delete you 2.x installation. > > Is

Re: Interesting list Validity (True/False)

2007-05-15 Thread Gabriel Genellina
En Tue, 15 May 2007 14:01:20 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > On May 15, 12:30 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: >> And said section 5.9 should be updated too: "The objects need not have >> the >> same type. If both are numbers or strings, they are co

Re: Python Newbie Suggestions

2007-05-15 Thread Brian
What about "Learning With Python"? It was written by a high school teacher for teaching python in the classroom for absolute beginners. Best of all, it's FREE: http://www.greenteapress.com/ Byron --- [EMAIL PROTECTED] wrote: > I'm a mechanical engineer with little experience programming. I've

Re: PEP 3131: Supporting Non-ASCII Identifiers - ambiguity issues

2007-05-15 Thread MRAB
On May 15, 6:44 pm, John Nagle <[EMAIL PROTECTED]> wrote: > There are really two issues here, and they're being > confused. > > One is allowing non-English identifiers, which is a political > issuer. The other is homoglyphs, two characters which look the same. > The latter is a real problem

Re: Name of function caller

2007-05-15 Thread James Stroud
HMS Surprise wrote: > Is there a way that a function may access the doc string or func_name > of the caller? > > Thanks, > > jvh > Add a parameter to the function to avoid mutilating your code with implementation specific inspection: def fun(caller, *original_parameters): do_something_to_c

Re: Name of function caller

2007-05-15 Thread John Machin
On May 16, 8:56 am, HMS Surprise <[EMAIL PROTECTED]> wrote: > On May 15, 5:13 pm, Paul McGuire <[EMAIL PROTECTED]> wrote: > > > On May 15, 4:59 pm, HMS Surprise <[EMAIL PROTECTED]> wrote: > > > > Is there a way that a function may access the doc string or func_name > > > of the caller? > > > > Than

Re: inherit from file and create stdout instance?

2007-05-15 Thread MisterPete
> Your code works for me: > > import sys > > class Output(file): > def __init__(self, file=sys.stdout, verbosity=1): > self.verbosity = verbosity > self.file = file > > def write(self, string, messageVerbosity=1): > if messageVerbosity <= self.verbosity: >

Re: tkFileDialog.askopenfilename()

2007-05-15 Thread Kevin Walzer
[EMAIL PROTECTED] wrote: > Hi, > When I call tkFileDialog.askopenfilename() , the dialog box opens with > the current directory as the default directory. Is it possible to open > the dialog box with a directory other than the current directory. Can > we pass in a user defined starting directory. >

Re: {Possible_Spam} tkFileDialog.askopenfilename()

2007-05-15 Thread John McMonagle
[EMAIL PROTECTED] wrote: > Hi, > When I call tkFileDialog.askopenfilename() , the dialog box opens with > the current directory as the default directory. Is it possible to open > the dialog box with a directory other than the current directory. Can > we pass in a user defined starting directory. >

Issue with MySQLdb wrapper

2007-05-15 Thread Gerard M
Hi guys I have a big problem with this wrapper im using Ubuntu 7.04 and I want to install python-MySQLdb, I used synaptics and it is installed, but when I try to do >>> import MySQLdb and I get this error: Traceback (most recent call last): File "", line 1, in File "MySQLdb/__init__.py", lin

Re: inherit from file and create stdout instance?

2007-05-15 Thread 7stud
On May 15, 4:18 pm, MisterPete <[EMAIL PROTECTED]> wrote: > How can I inherit from file but stil create an instance that writes to > stdout? > --- > I'm writing a file-like object that has verbosity options (among > some other things). I know I could just set self.file to a file object

tkFileDialog.askopenfilename()

2007-05-15 Thread rahulnag22
Hi, When I call tkFileDialog.askopenfilename() , the dialog box opens with the current directory as the default directory. Is it possible to open the dialog box with a directory other than the current directory. Can we pass in a user defined starting directory. Thanks Rahul -- http://mail.python

Re: Name of function caller

2007-05-15 Thread HMS Surprise
On May 15, 5:13 pm, Paul McGuire <[EMAIL PROTECTED]> wrote: > On May 15, 4:59 pm, HMS Surprise <[EMAIL PROTECTED]> wrote: > > > Is there a way that a function may access the doc string or func_name > > of the caller? > > > Thanks, > > > jvh > > Yes. The inspect module allows you to look up the cal

Re: PyObject_Print in gdb

2007-05-15 Thread Chris Miles
I'm still not sure about PyObject_Print, but I found a better solution, using the Misc/gdbinit file from the Python source tree, which defines a pyo macro. Example: (gdb) pyo some_object object : [] type : list refcount: 1 address : 0x4b5940 $3 = void Cheers, Chris On May 15, 2:15 pm, Chris Mil

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Stefan Behnel
René Fleschenberg wrote: > Javier Bezos schrieb: >>> But having, for example, things like open() from the stdlib in your code >>> and then öffnen() as a name for functions/methods written by yourself is >>> just plain silly. It makes the code inconsistent and ugly without >>> significantly improvin

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Stefan Behnel
René Fleschenberg wrote: > We all know what the PEP is about (we can read). BTW: who is this "we" if it doesn't include you? Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Newbie Suggestions

2007-05-15 Thread 7stud
Not "Learning Python: From Novice to Professional". I've looked at "Learning Python 2nd Ed." to use as a reference for all the blunders in the first book I mentioned, and it's a lot better--plus it has exercises at the end of each chapter. -- http://mail.python.org/mailman/listinfo/python-list

inherit from file and create stdout instance?

2007-05-15 Thread MisterPete
How can I inherit from file but stil create an instance that writes to stdout? --- I'm writing a file-like object that has verbosity options (among some other things). I know I could just set self.file to a file object rather than inheriting from file. I started with something like thi

Re: Python Newbie Suggestions

2007-05-15 Thread Steven Howe
[EMAIL PROTECTED] wrote: > I'm a mechanical engineer with little experience programming. I've > used C++ and machine language for getting micro-controllers to work > and thats about it. I work allot with software developers at my job > and can read C++ code pretty good (ie. I understand whats going

Re: Name of function caller

2007-05-15 Thread Paul McGuire
On May 15, 4:59 pm, HMS Surprise <[EMAIL PROTECTED]> wrote: > Is there a way that a function may access the doc string or func_name > of the caller? > > Thanks, > > jvh Yes. The inspect module allows you to look up the call stack for information on the caller, the caller's caller, local vars, etc

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread rurpy
On May 15, 10:18 am, René Fleschenberg <[EMAIL PROTECTED]> wrote: > Carsten Haese schrieb: > > > Allowing people to use identifiers in their native language would > > definitely be an advantage for people from such cultures. That's the use > > case for this PEP. It's easy for Euro-centric people to

^* Britney Spears Back and more naked than ever*

2007-05-15 Thread deepbroke6
http://scargo.in/2007/05/wachovia-checking-accounts.html - Download these amazing movies and videos of britney naked! Shes back and seczyer than ever OOPS! I Did it [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Name of function caller

2007-05-15 Thread HMS Surprise
Is there a way that a function may access the doc string or func_name of the caller? Thanks, jvh -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread rurpy
On May 15, 11:08 am, Carsten Haese <[EMAIL PROTECTED]> wrote: snip > Once the students learn Python and realize that there are lots of Python > resources "out there" that are only in English, that will be a > motivation for them to learn English. Requiring all potential Python > programmers to lear

Re: Python Newbie Suggestions

2007-05-15 Thread Olexandr Melnyk
Byte of Python and Dive and Python as quite well-known books. -- Olexandr Melnyk, http://omelnyk.net/ 15 May 2007 14:28:36 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: I'm a mechanical engineer with little experience programming. I've used C++ a

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread rurpy
On May 15, 7:44 am, George Sakkis <[EMAIL PROTECTED]> wrote: > After 175 replies (and counting), the only thing that is clear is the > controversy around this PEP. Most people are very strong for or > against it, with little middle ground in between. I'm not saying that > every change must meet 100

Python Newbie Suggestions

2007-05-15 Thread garcigal
I'm a mechanical engineer with little experience programming. I've used C++ and machine language for getting micro-controllers to work and thats about it. I work allot with software developers at my job and can read C++ code pretty good (ie. I understand whats going on). Does anyone have any good t

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread René Fleschenberg
Javier Bezos schrieb: >> But having, for example, things like open() from the stdlib in your code >> and then öffnen() as a name for functions/methods written by yourself is >> just plain silly. It makes the code inconsistent and ugly without >> significantly improving the readability for someone w

Re: Trying to choose between python and java

2007-05-15 Thread [EMAIL PROTECTED]
On May 15, 5:16 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Beliavsky a écrit : > > > > > On May 15, 1:30 am, Anthony Irwin <[EMAIL PROTECTED]> wrote: > > > > > >>#5 someone said that they used to use python but stopped because the > >>language changed or made stuff depreciated (I can ful

Re: removing spaces between 2 names

2007-05-15 Thread Roberto Bonvallet
[EMAIL PROTECTED] wrote: > s = "jk hij ght" > print "".join(s.split(" ")) "".join(s.split()) is enough. -- Roberto Bonvallet -- http://mail.python.org/mailman/listinfo/python-list

Need a PC Computer Info Portal?

2007-05-15 Thread lawsfaq2
Personal Computers (PC's) contains a lot of info that the average user doesn't usually know. At http://PCTermDefinitions.com there is extensive infomation related to this topic (all free). Along with a link portal to other PC computer related sites. -- http://mail.python.org/mailman/listinfo/pyth

Re: Distributing programs depending on third party modules.

2007-05-15 Thread Kevin Walzer
Bruno Desthuilliers wrote: >> What platform are you doing this on? On the Linux platform, >> "dependency hell" of this sort is pretty much unavoidable, > > Yes it is. EasyInstall works just fine. You can install a beast like PyQt with easy_install? Meaning, that it will download and build/inst

Re: track cpu usage of linux application

2007-05-15 Thread Fabian Braennstroem
Hi, thanks to both! I will take a look at the proc files! * James T. Dennis <[EMAIL PROTECTED]> wrote: > Fabian Braennstroem <[EMAIL PROTECTED]> wrote: >> Hi, > >>I would like to track the cpu usage of a couple of >>programs using python. Maybe it works somehow with >>piping 'top'

Re: Trying to choose between python and java

2007-05-15 Thread Bruno Desthuilliers
Beliavsky a écrit : > On May 15, 1:30 am, Anthony Irwin <[EMAIL PROTECTED]> wrote: > > > >>#5 someone said that they used to use python but stopped because the >>language changed or made stuff depreciated (I can fully remember >>which) and old code stopped working. Is code written today likely t

Re: Trying to choose between python and java

2007-05-15 Thread Aahz
In article <[EMAIL PROTECTED]>, Anthony Irwin <[EMAIL PROTECTED]> wrote: > >#5 someone said that they used to use python but stopped because the >language changed or made stuff depreciated (I can fully remember >which) and old code stopped working. Is code written today likely to >still work in

Re: Moving class used in pickle

2007-05-15 Thread Jean-Paul Calderone
On Tue, 15 May 2007 13:23:29 -0600, Jeffrey Barish <[EMAIL PROTECTED]> wrote: >I have a class derived from string that is used in a pickle. In the new >version of my program, I moved the module containing the definition of the >class. Now the unpickle fails because it doesn't find the module. I

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Michel Claveau
Hi! Yes, for legibility. If letters with accents are possible: d=dict(numéro=1234, name='Löwis', prénom='Martin', téléphone='+33123') or p1 = personn() #class p1.numéro = 1234 p1.name='Löwis' p1.prénom='Martin' p1.téléphone='+33123' Imagine the same code, is accents are not possible

Re: Distributing programs depending on third party modules.

2007-05-15 Thread Bruno Desthuilliers
Kevin Walzer a écrit : > Tina I wrote: > >> Hi list, >> >> Is there a preferred way to distribute programs that depends on third >> party modules like PyQt, Beautifulsoup etc? I have used setuptools and >> just having the setup script check for the existence of the required >> modules. If they'

Re: Extended characters in MATPLOTLIB (newbie)

2007-05-15 Thread Andrew Holme
"Andrew Holme" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm using MATPLOTLIB on Windows. > > How can I get extended characters such as the micro symbol (greek letter > mu) to appear in my axis labels? > > I've tried: > > xlabel('µs', font) > > and > > xlabel('\xB5s', font) >

Re: Simulating simple electric circuits

2007-05-15 Thread Bjoern Schliessmann
Bjoern Schliessmann wrote: > I suspect that this is a dead end though, because in more complex > designs the creation of circuits becomes cumbersome. Also, for the > system I want to model, the circuits are OOH very complex and OTOH > I don't have access to all circuit diagrams. :( So I think I'll

Vista: webbrowser module

2007-05-15 Thread Norman Lorrain
I don't have a Vista machine to test this on, but I have users reporting a problem with the following e.g. import webbrowser webbrowser.open('http://www.google.com') File "webbrowser.pyc", line 43, in open File "webbrowser.pyc", line 250, in open exceptions.WindowsError:[Errno 2] The system

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread rurpy
"Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: [I fixed the broken attribution in your quote] > >(2) Several posters have claimed non-native english speaker > >status to bolster their position, but since they are clearly at > >or ne

Extended characters in MATPLOTLIB (newbie)

2007-05-15 Thread Andrew Holme
I'm using MATPLOTLIB on Windows. How can I get extended characters such as the micro symbol (greek letter mu) to appear in my axis labels? I've tried: xlabel('µs', font) and xlabel('\xB5s', font) but it just appears as a box. TIA -- http://mail.python.org/mailman/listinfo/python-list

Pyrex char *x[]

2007-05-15 Thread Georg Grabler
Hello everybody. I finally decided to use pyrex for my tasks wrapping and creating new python objects. Anyway, i ran into struggles. I want an array to be passed to a function, so basically i started the function as follows: def addToList (self, char *array[]): This throws an error compi

  1   2   3   >