Re: singleton decorator

2006-08-08 Thread Chaz Ginger
[EMAIL PROTECTED] wrote: > Andre Meyer: >> What is the preferred pythonic way of implementing singleton elegantly? > > Maybe to just use a module. > > Bye, > bearophile > Here is some sample code for both singleton classes and named classes that I use: > class Singleton(type): > """ >

urllib and urllib2, with proxies

2006-08-08 Thread Ali . Sabil
hello all, I just maybe hit a bug in both urllib and urllib2, actually urllib doesn't support proxy authentication, and if you setup the http_proxy env var to http_proxy=http://user:[EMAIL PROTECTED]:port/ and https_proxy=$http_proxy i get a traceback : Traceback (most recent call last): File "

Re: Ann: SE 2.2b

2006-08-08 Thread Georg Brandl
Anthra Norell wrote: > If you go to http://www.python.org/pypi. you see it about in the middle of > the recently updated packages. It's blue, so you can > click it and you're there. > The update page shows only the twenty most recent updates. So they drop > out at the bottom rather fast. If

=?utf-8?Q?Re:_Leipzig_Python_User_Group_=2D_Meeting, _August_16, _2006, _8:00pm?=

2006-08-08 Thread david_wahler
I'll be out of the office until approximately August 20th. If you have any questions, please email [EMAIL PROTECTED] -- David Wahler -- http://mail.python.org/mailman/listinfo/python-list

Re: Class attributes, instances and metaclass __getattribute__

2006-08-08 Thread Michele Simionato
Pedro Werneck wrote: > When I access a class attribute, on a class with a custom metaclass with > a __getattribute__ method, the method is used when acessing some > attribute directly with the class object, but not when you do it from > the instance. > > > >>> class M(type): > ... def __getatt

Looking for an intellisense with good help IDE for Python

2006-08-08 Thread metaperl
Hi, I would like an IDE that shows me all methods and functions I can call on a particular data item. For instance, iter() can be called on any sequence, but it is not a method. Nonetheless, I would like for something to show me every thing that I can call on a particular data item. This include

Re: access abook addressbook with curses

2006-08-08 Thread Ben C
On 2006-08-08, Fabian Braennstroem <[EMAIL PROTECTED]> wrote: > Hi Ben, > > * Ben C <[EMAIL PROTECTED]> wrote: >> On 2006-08-06, Fabian Braennstroem <[EMAIL PROTECTED]> wrote: >>> Hi Ben, >>> >>> * Ben C <[EMAIL PROTECTED]> wrote: On 2006-08-05, Fabian Braennstroem <[EMAIL PROTECTED]> wrote: >

variable creation

2006-08-08 Thread Alistair King
Hei all, im trying to create a list of variables for further use: Els = raw_input("Are there any further elements you would like to include? if so type the element, eg, Pd. If not type No: ") if Els != 'No': el = Els in pt while el == 1 and Els != 'Next': elemen

Re: do people really complain about significant whitespace?

2006-08-08 Thread Michiel Sikma
Op 8-aug-2006, om 1:49 heeft Ben Finney het volgende geschreven: > As others have pointed out, these people really do exist, and they > each believe their preconception -- that significant whitespace is > intrinsically wrong -- is valid, and automatically makes Python a > lesser language. Well,

Dr. Dobb's Python-URL! - weekly Python news and links (Aug 8)

2006-08-08 Thread Jack Diederich
QOTW: "being able to cook an egg" - Guido Van Rossum in response to the question, "What do you think is the most important skill every programmer should posses?" "I am asking for your forgiveness" - an open letter to Guido by someone who took the "D" in "BDFL" too literally. Parsing a Gramm

beginner questions on embedding/extending python with C++

2006-08-08 Thread Qun Cao
Hi Everyone, I am a beginner on cross language development. My problem at hand is to build a python interface for a C++ application built on top of a 3D game engine. The purpose of this python interface is providing a convenient scripting toolkit for the application. One example is that a user c

Re: class variables

2006-08-08 Thread Andre Meyer
On 7/31/06, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Colin J. Williams wrote: > > Andre Meyer wrote: > >> Hi all > >> > >> I am trying to understand the magic of Python's class variables and > >> tried the following code (see below). > >> > >> Just out of curiosity, I tried to define a prop

Newbie - How to iterate list or scalar ?

2006-08-08 Thread Andy Dingley
I seem to be writing the following fragment an awful lot, and I'm sure it's not the best and Pythonic way to do things. Any advice on better coding style? pluginVersionNeeded is a parameter passed into a method and it can either be a simple scalar variable, or it can be a list of the same variable

Re: beginner questions on embedding/extending python with C++

2006-08-08 Thread Diez B. Roggisch
> Since the main program is still going to be the C++ application, I > guess we need to embedding the python scripts in the C++ code. So at > initialization stage, the python script needs to be loaded into the C++ > code. And this code can be simple, like > player = Player() > game.loadPlayer(pla

Re: Newbie - How to iterate list or scalar ?

2006-08-08 Thread Richard Brodie
"Andy Dingley" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > pluginVersionNeeded is a parameter passed into a method and it can > either be a simple scalar variable, or it can be a list of the same > variables. The obvious question would be, "is there a good reason why you don't

Re: Newbie - How to iterate list or scalar ?

2006-08-08 Thread Diez B. Roggisch
Andy Dingley wrote: > I seem to be writing the following fragment an awful lot, and I'm sure > it's not the best and Pythonic way to do things. Any advice on better > coding style? > > pluginVersionNeeded is a parameter passed into a method and it can > either be a simple scalar variable, or it c

Re: Resource temporarily unavailable launching idle under cygwin

2006-08-08 Thread Jason Tishler
Juan C., On Mon, Aug 07, 2006 at 11:47:33AM -0700, jcmendez wrote: > Hello everyone. Trying to run idle from a cygwin session on Win2k > (yuk, but I must) I'm getting the following error message. > [snip] > > $ idle > 23367 [main] python2.4 1668 C:\cygwin\bin\python2.4.exe: *** fatal > error

Re: singleton decorator

2006-08-08 Thread Georg Brandl
Andre Meyer wrote: > While looking for an elegant implementation of the singleton design > pattern I came across the decorator as described in PEP318 > . > Unfortunately, the following does not work, because decorators only work > on functions or methods

Re: Newbie - How to iterate list or scalar ?

2006-08-08 Thread Bruno Desthuilliers
Andy Dingley wrote: > I seem to be writing the following fragment an awful lot, and I'm sure > it's not the best and Pythonic way to do things. Any advice on better > coding style? > > pluginVersionNeeded is a parameter passed into a method and it can > either be a simple scalar variable, or it ca

Re: beginner questions on embedding/extending python with C++

2006-08-08 Thread Roman Yakovenko
On 8 Aug 2006 02:28:31 -0700, Qun Cao <[EMAIL PROTECTED]> wrote: > Hi Everyone, > > I am a beginner on cross language development. My problem at hand is to > build a python interface for a C++ application built on top of a 3D > game engine. The purpose of this python interface is providing a > con

Re: do people really complain about significant whitespace?

2006-08-08 Thread Bruno Desthuilliers
infidel wrote: > Where are they-who-hate-us-for-our-whitespace? You may find some on comp.lang.ruby... -- http://mail.python.org/mailman/listinfo/python-list

''Get free calling cards now ''

2006-08-08 Thread socald . smit
''Get free calling cards now '' Hi Friends, I found a great site to call anywhere in the World for free! What we have to do is just signup and earn freecalling cards. After signingup with Globalfreecalling you can findout lot of very simple and easy offers (Just Contact Infor

Re: using python at the bash shell?

2006-08-08 Thread BartlebyScrivener
John Salerno wrote: > I like using Python for everything, and if I don't need to learn the > bash 'language', then I won't just yet. And like vim, Ipython works on both windows and ubuntu. rd -- http://mail.python.org/mailman/listinfo/python-list

Re: do people really complain about significant whitespace?

2006-08-08 Thread gslindstrom
infidel wrote: > Where are they-who-hate-us-for-our-whitespace? Are "they" really that > stupid/petty? Are "they" really out there at all? "They" almost sound > like a mythical caste of tasteless heathens that "we" have invented. > It just sounds like so much trivial nitpickery that it's hard to

Newbie

2006-08-08 Thread pranav
Hi, I am new to python. I wanted to know how can i debug a python program. Is there a gdb equivalent? -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie

2006-08-08 Thread Diez B. Roggisch
pranav wrote: > Hi, > I am new to python. I wanted to know how can i debug a python program. > Is there a gdb equivalent? pdb, a standard module. I use it like this: def some_method_I_want_to_debug(): import pdb pdb.set_trace() # more code to come But that is only one way of usin

Re: Looking for an intellisense with good help IDE for Python

2006-08-08 Thread Chris Brat
I dont know if it will meet all your needs but SPE (Stani's Python Editor) is quite cool - has code completion. http://pythonide.stani.be metaperl wrote: > Hi, > > I would like an IDE that shows me all methods and functions I can call > on a particular data item. For instance, iter() can be call

Re: Newbie

2006-08-08 Thread pranav
Diez B. Roggisch wrote: > pranav wrote: > > > Hi, > > I am new to python. I wanted to know how can i debug a python program. > > Is there a gdb equivalent? > > pdb, a standard module. > > I use it like this: > > > def some_method_I_want_to_debug(): > import pdb > pdb.set_trace() > # mo

class return another instance

2006-08-08 Thread Keith
Hello All,   Here is simplified version of what I’m trying to do:     IDs = {}   class ID:     def __init__(self, id):     if id in IDs:   

Re: beginner questions on embedding/extending python with C++

2006-08-08 Thread Ben Sizer
Qun Cao wrote: > Hi Everyone, > > I am a beginner on cross language development. My problem at hand is to > build a python interface for a C++ application built on top of a 3D > game engine. The purpose of this python interface is providing a > convenient scripting toolkit for the application. As

Re: Class attributes, instances and metaclass __getattribute__

2006-08-08 Thread Pedro Werneck
Hi On 8 Aug 2006 00:10:39 -0700 "Michele Simionato" <[EMAIL PROTECTED]> wrote: > To me, it seems consistent. As said in > http://www-128.ibm.com/developerworks/linux/library/l-pymeta2/ > > """The availability of metaclass attributes is not transitive; in > other words, the attributes of a metac

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

2006-08-08 Thread david_wahler
I'll be out of the office until approximately August 20th. If you have any questions, please email [EMAIL PROTECTED] -- David Wahler -- http://mail.python.org/mailman/listinfo/python-list

Re: Resource temporarily unavailable launching idle under cygwin

2006-08-08 Thread Juan C. Méndez
The "rebase" process worked.  Thanks, Jason.  The other previously posted solution of uninstalling and reinstalling Python did not.    On 8/8/06, Jason Tishler <[EMAIL PROTECTED]> wrote: Juan C.,On Mon, Aug 07, 2006 at 11:47:33AM -0700, jcmendez wrote:> Hello everyone.  Trying to run idle from a c

Re: Looking for an intellisense with good help IDE for Python

2006-08-08 Thread Fabio Zadrozny
On 8 Aug 2006 00:36:30 -0700, metaperl <[EMAIL PROTECTED]> wrote: Hi,I would like an IDE that shows me all methods and functions I can callon a particular data item. For instance, iter() can be called on anysequence, but it is not a method.Nonetheless, I would like for something to show me every th

Re: Looking for an intellisense with good help IDE for Python

2006-08-08 Thread Michiel Sikma
I can attest to PyDev being an excellent extension to Eclipse. But Eclipse kind of requires a heavy machine to run, being a gigantic Java program. Michiel Op 8-aug-2006, om 15:36 heeft Fabio Zadrozny het volgende geschreven: > Have you checked pydev: http://pydev.sf.net > > Cheers, > > Fabio

Re: class return another instance

2006-08-08 Thread Max Erickson
"Keith" <[EMAIL PROTECTED]> wrote: > > > Any help would be great. > > > > Cheers, > > Keith > > Do you absolutely need the functionality to be in the __init__ method, or does something like the following work: >>> IDs={} >>> class ID: pass >>> def factory(ident): if ident in

Re: using python at the bash shell?

2006-08-08 Thread John Salerno
[EMAIL PROTECTED] wrote: > John> Aside from the normal commands you can use, I was wondering if > John> it's possible to use Python from the terminal instead of the > John> normal bash commands (e.g. print instead of echo). > > Take a look at ipython . It's

Re: Class attributes, instances and metaclass __getattribute__

2006-08-08 Thread Ziga Seilnacht
Pedro Werneck wrote: > Hi [snip] > Well... I'm not talking about metaclass attributes... that's perfectly > consistent, agreed. > > I'm saying that when the class implements a custom __getattribute__, > when you try to access the instance attributes from itself, it uses it. > But if the class is a

Re: do people really complain about significant whitespace?

2006-08-08 Thread infidel
> One of the most stupid language-definition decisions that most people > have come across is the Makefile format. > Hope that goes some way to explaining one possible reason why rational > people can consistently react in horror to the issue. Ah, thanks for that. This peek into history makes

Re: how to make python socket server work with the app.MainLoop() in wxpython?

2006-08-08 Thread zxo102
Dennis: Thanks for your message. Let me try the double-buffer-operation. Ouyang Dennis Lee Bieber wrote: > On 1 Aug 2006 01:10:18 -0700, "zxo102" <[EMAIL PROTECTED]> declaimed the > following in comp.lang.python: > > > > > I just wrote the code following the example you provided. The image > > lo

Re: do people really complain about significant whitespace?

2006-08-08 Thread infidel
> All societies demonise outsiders to some extent. It's an unfortunate > human (and animal) trait. Which is why I questioned it. > So just block your ears when the propaganda vans with the loud-speakers > on top drive past your dwelling :-) Funny how using python makes me feel like a member of s

Re: Windows vs. Linux

2006-08-08 Thread siggy2
Duncan Booth wrote: [CUT] > > C:\>cd /Documents and settings > The system cannot find the path specified. > > C:\>cd /DDocuments and settings > > C:\Documents and Settings> that's because the cd /D is interpreted as "change drive and directory" so I imagine it enables some kind of command extensi

fundamental issue with unittest

2006-08-08 Thread Chris Fonnesbeck
I have added a unit test to some of my code, following closely the examples in the python docs and python in a nutshell. However, when I try calling unittest.main(), I get the following:-- Ran 0 tests in 0.000sOK---

Re: variable creation

2006-08-08 Thread Justin Azoff
Alistair King wrote: > Hei all, > > im trying to create a list of variables for further use: [snip] > this works to a certain extent but gets stuck on some loop. Im a > beginner and am not sure where im going wrong. You are trying to do too much in one function. Split those loops up into a few li

Info on continuations?

2006-08-08 Thread vasudevram
Hi, I am Googling and will do more, found some stuff, but interested to get viewpoints of list members on: Continuations in Python. Saw a few URLs which had some info, some of which I understood. But like I said, personal viewpoints are good to have. Thanks Vasudev

Missing MSVCR71.dll

2006-08-08 Thread Hoop
Hi, I am trying to get my application into debug. I am using VS2005 with some Python code in it. Works fine in release build, but I do need to go to dubug. I have ActivePython 2.4.3.12. It says it is missing MSVCR71D.dll, I think that is an older .dll, maybe it should be an 8 for VS2005. MSVCR71D.d

Re: variable creation

2006-08-08 Thread Jon
Hi, I'm not sure if this is exactly what you had in mind but what about something like this: elements = [] Els = "" pt = {'H': 1.00794, 'He': 4.002602, 'Li': 6.941, 'Be': 9.012182, 'B':10.811} while Els != 'No': Els = raw_input("""Are there any further elements you would like to include? if so

Re: do people really complain about significant whitespace?

2006-08-08 Thread Thomas Guettler
Am Mon, 07 Aug 2006 14:43:04 -0700 schrieb infidel: > Where are they-who-hate-us-for-our-whitespace? Are "they" really that > stupid/petty? Are "they" really out there at all? "They" almost sound > like a mythical caste of tasteless heathens that "we" have invented. > It just sounds like so muc

Dallas One wire tempreture measurement.

2006-08-08 Thread chris . lyon
a previous thread http://mail.python.org/pipermail/python-list/2002-June/107616.html discussed this issue, and Dave Moor kindly pointed to his solution. However this is no longer a current link, does anyone know if there is a currently available solution? -- http://mail.python.org/mailman/list

Tkinter module not found

2006-08-08 Thread Shuaib
Hey, Even though I freshly installed Tcl and Tk, python still seem to have problems accessing Tkinter module. Here is what says when I do "import Tkinter" == Traceback (most recent call last): File "", line 1, in ? ImportError: No module named Tkinter == Any ideas how to fix this problem? (Gen

Re: Info on continuations?

2006-08-08 Thread olsongt
vasudevram wrote: > Hi, > > I am Googling and will do more, found some stuff, but interested to get > viewpoints of list members on: > > Continuations in Python. > > Saw a few URLs which had some info, some of which I understood. But > like I said, personal viewpoints are good to have. > > Thanks

Re: Info on continuations?

2006-08-08 Thread vasudevram
[EMAIL PROTECTED] wrote: > vasudevram wrote: > > Hi, > > > > I am Googling and will do more, found some stuff, but interested to get > > viewpoints of list members on: > > > > Continuations in Python. > > > Could you be a little more specific on what you're looking for? > Continuations are a big c

Accessing Yahoo Mail withtout POP

2006-08-08 Thread T
Is there a way to access yahoo mail via its web interface? If so, can someone give some pointers? -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter module not found

2006-08-08 Thread John Salerno
Shuaib wrote: > Hey, > > Even though I freshly installed Tcl and Tk, python still seem to have > problems accessing Tkinter module. Here is what says when I do "import > Tkinter" > > == > Traceback (most recent call last): > File "", line 1, in ? > ImportError: No module named Tkinter > == > >

Re: using python at the bash shell?

2006-08-08 Thread Thomas Bartkus
"John Salerno" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all. I just installed Ubuntu and I'm learning how to use the bash > shell. Aside from the normal commands you can use, I was wondering if > it's possible to use Python from the terminal instead of the normal bash > com

Re: do people really complain about significant whitespace?

2006-08-08 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: > infidel wrote: > > Where are they-who-hate-us-for-our-whitespace? Are "they" really that > > stupid/petty? Are "they" really out there at all? "They" almost sound > > like a mythical caste of tasteless heathens that "we" have invented. > > It just sounds like so muc

Re: Info on continuations?

2006-08-08 Thread Jean-Paul Calderone
On 8 Aug 2006 08:07:02 -0700, [EMAIL PROTECTED] wrote: > >vasudevram wrote: >> Hi, >> >> I am Googling and will do more, found some stuff, but interested to get >> viewpoints of list members on: >> >> Continuations in Python. >> >> Saw a few URLs which had some info, some of which I understood. But

Re: Accessing Yahoo Mail withtout POP

2006-08-08 Thread Dieter Deyke
"T" <[EMAIL PROTECTED]> writes: > Is there a way to access yahoo mail via its web interface? If so, can > someone give some pointers? This works for me: http://www.ypopsemail.com/ -- Dieter Deyke mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Vs lbh pna ernq guvf, lbh unir jnl gbb zhpu gvzr

Urllib2/Pycurl/HTTP Speeds?

2006-08-08 Thread Chaos
For the Program I Am Making I Make Multiple HTTP Request to My Server. I found that using urllib2 it was pretty slow, when I activated the program and tested it it would hang from 2secs-5secs since I am doing it multiple times I wanted to speed it up by using pycurl. But I got the samething. Here i

Re: Missing MSVCR71.dll

2006-08-08 Thread missdeer
This dll is shipped with VS.NET2003, you can copy one from others, maybe it'll work.     missdeer 2006-08-08 发件人: Hoop 发送时间: 2006-08-08 22:50:22 收件人: python-list@python.org 抄送: 主题: Missing MSVCR71.dll   Hi, I am trying to get my application into debug. I

Re: Info on continuations?

2006-08-08 Thread Michele Simionato
vasudevram wrote: > Hi, > > I am Googling and will do more, found some stuff, but interested to get > viewpoints of list members on: > > Continuations in Python. Python does not have (full) continuations. If you want to understand continuations, you need a language that supports them. For instance

Re: do people really complain about significant whitespace?

2006-08-08 Thread Aahz
In article <[EMAIL PROTECTED]>, infidel <[EMAIL PROTECTED]> wrote: > >Where are they-who-hate-us-for-our-whitespace? Are "they" really that >stupid/petty? Are "they" really out there at all? "They" almost sound >like a mythical caste of tasteless heathens that "we" have invented. >It just sounds

Re: Tkinter module not found

2006-08-08 Thread Tim Chase
> The cause of this is usually that you are using a different > version of Python than the one you installed Tkinter into, but > being a Linux newbie I have yet to discover how to redirect > the 'python' command to invoke the newer version of Python. The OS looks for the first 'python' it finds i

Re: using python at the bash shell?

2006-08-08 Thread John Salerno
Thomas Bartkus wrote: > I am just validating your experience by saying that coming from Python is a > barrier to my learning BASH. The more I work with Linux/BASH, the more I > see how I might have used BASH to script something I have already done in > Python. But the question that always comes

binary conversion issues

2006-08-08 Thread godavemon
I'm using python's struct and binascii modules to write some values from my parser to binary floats. This works great for all of my binary files except one. For some reason this file is saving to 836 (stated by my command shell) bytes instead of 832 like it should. It sounds like an issue with w

Re: do people really complain about significant whitespace?

2006-08-08 Thread Andy Dingley
Thomas Guettler wrote: > I like python, but sometimes i don't like that python allows > spaces and tabs. It would be easier if you had less choice and > must use four spaces. That's the nice thing about Python. It doesn't care about indentation distance, it just wants "some" and "consistent". I

Re: Tkinter module not found

2006-08-08 Thread John Salerno
Tim Chase wrote: >> The cause of this is usually that you are using a different >> version of Python than the one you installed Tkinter into, but >> being a Linux newbie I have yet to discover how to redirect >> the 'python' command to invoke the newer version of Python. > > > The OS looks for th

Re: using python at the bash shell?

2006-08-08 Thread skip
>> I've just reconsiled to pick up my BASH by osmosis and concentrate on >> (much!) cleaner scripting with Python. John> I don't have much of a need to learn the actual programming parts John> of the bash language, ... As long as you promise never, ever, ever to try programming i

Re: Tkinter module not found

2006-08-08 Thread Shuaib
Hey again, I am using the latest python available on my system (2.4). So I don't think that's the problem. Any more ideas? Do I need to install Tkinter as a seperate module/package? As I said, I've already installed Tcl/Tk, though. Thanks for your time. Tim Chase wrote: > > The cause of this i

Re: Tkinter module not found

2006-08-08 Thread Thomas Heller
John Salerno schrieb: > Tim Chase wrote: >>> The cause of this is usually that you are using a different >>> version of Python than the one you installed Tkinter into, but >>> being a Linux newbie I have yet to discover how to redirect >>> the 'python' command to invoke the newer version of Python.

Re: Tkinter module not found

2006-08-08 Thread John Salerno
Shuaib wrote: > Hey again, > > I am using the latest python available on my system (2.4). So I don't > think that's the problem. > > Any more ideas? Do I need to install Tkinter as a seperate > module/package? As I said, I've already installed Tcl/Tk, though. Hmm, yes, I think tkinter is separat

Re: using python at the bash shell?

2006-08-08 Thread John Salerno
[EMAIL PROTECTED] wrote: > >> I've just reconsiled to pick up my BASH by osmosis and concentrate on > >> (much!) cleaner scripting with Python. > > John> I don't have much of a need to learn the actual programming parts > John> of the bash language, ... > > As long as you promise

Re: binary conversion issues

2006-08-08 Thread Simon Forman
godavemon wrote: > I'm using python's struct and binascii modules to write some values > from my parser to binary floats. This works great for all of my binary > files except one. For some reason this file is saving to 836 (stated > by my command shell) bytes instead of 832 like it should. It so

Re: Tkinter module not found

2006-08-08 Thread John Salerno
Thomas Heller wrote: > c:\>which python > c:\util\python.EXE which didn't work for me on the command prompt...is it native to it? -- http://mail.python.org/mailman/listinfo/python-list

Re: using python at the bash shell?

2006-08-08 Thread Simon Forman
John Salerno wrote: > [EMAIL PROTECTED] wrote: > > John> Aside from the normal commands you can use, I was wondering if > > John> it's possible to use Python from the terminal instead of the > > John> normal bash commands (e.g. print instead of echo). > > > > Take a look at ipython

Re: Newbie - How to iterate list or scalar ?

2006-08-08 Thread Andy Dingley
Bruno Desthuilliers wrote: > there's really no reason to > assume it should be a list - any iterable could - and IMHO should - be > accepted... expect of course for strings (royal PITA case, duh). > 2/ test for pluginVersionsNeeded.__iter__ (an attribute of most > iterables except strings...):

Newbie question: what's with "self"?

2006-08-08 Thread donkeyboy
This is probably a really basic question, but anyway ... I'm new to both Python and OO programming. From looking at a number of code examples, the word "self" is used a lot when referring to classes. As such, what does "self" mean and/or do? I've read things that say it's a naming convention, but

Re: Class attributes, instances and metaclass __getattribute__

2006-08-08 Thread Pedro Werneck
On 8 Aug 2006 07:24:54 -0700 "Ziga Seilnacht" <[EMAIL PROTECTED]> wrote: > [snip] > > Well... I'm not talking about metaclass attributes... that's > > perfectly consistent, agreed. > > > > I'm saying that when the class implements a custom __getattribute__, > > when you try to access the instance

Re: Missing MSVCR71.dll

2006-08-08 Thread Farshid Lashkari
The windows distribution of python was compiled with Visual Studio 7.1, so you need the 7.1 runtime libraries on your computer to run python. I haven't tried compiling an app with VS2005, but I don't see why they would be incompatible. I've compiled a python app using VS 7.0 and it worked fine.

Re: Newbie question: what's with "self"?

2006-08-08 Thread Farshid Lashkari
donkeyboy wrote: > This is probably a really basic question, but anyway ... > > I'm new to both Python and OO programming. From looking at a number of > code examples, the word "self" is used a lot when referring to classes. > As such, what does "self" mean and/or do? I've read things that say > i

Unicode/utf-8 data in SQL Server

2006-08-08 Thread thebjorn
I'm working with a MS SQL Server database created by a program from a fine US company who seems to have gotten run over by the Unicode truck. In their infinite wisdom they've decided to store Unicode data directly in regular varchar fields, utf-8 encoded! (on the bright side, it is properly utf-8 e

Re: binary conversion issues

2006-08-08 Thread Grant Edwards
On 2006-08-08, godavemon <[EMAIL PROTECTED]> wrote: > I'm using python's struct and binascii modules to write some values > from my parser to binary floats. This works great for all of my binary > files except one. For some reason this file is saving to 836 (stated > by my command shell) bytes i

Re: Newbie question: what's with "self"?

2006-08-08 Thread Simon Forman
donkeyboy wrote: > This is probably a really basic question, but anyway ... > > I'm new to both Python and OO programming. From looking at a number of > code examples, the word "self" is used a lot when referring to classes. > As such, what does "self" mean and/or do? I've read things that say > it

Re: using python at the bash shell?

2006-08-08 Thread John Salerno
Simon Forman wrote: > "normal bash things"? :-) forgive my ignorance, i just installed linux on saturday! :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Accessing Yahoo Mail withtout POP

2006-08-08 Thread Gabriel Genellina
At Tuesday 8/8/2006 12:39, Dieter Deyke wrote: > Is there a way to access yahoo mail via its web interface? If so, can > someone give some pointers? www.freepops.org Very generic almost-anything-to-pop3, but it's not written in Python, uses LUA instead. Gabriel Genellina Softlab SRL

Re: Newbie question: what's with "self"?

2006-08-08 Thread Thomas Bartkus
"donkeyboy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This is probably a really basic question, but anyway ... > > I'm new to both Python and OO programming. From looking at a number of > code examples, the word "self" is used a lot when referring to classes. > As such, what do

Re: Newbie question: what's with "self"?

2006-08-08 Thread BartlebyScrivener
donkeyboy wrote: >> but no-one has really spelt it out Go to: http://www.freenetpages.co.uk/hp/alan.gauld/ Look down the left-hand frames page until you see Advanced Topics | Object Oriented Programming Then find "What is self?" Good luck rd -- http://mail.python.org/mailman/listinfo/pyth

ImportError: math.so: undefined symbol PyFPE_jbuf

2006-08-08 Thread Глотов Артем
Hello! I'm trying to install the web application written with Python, and have the trouble with module math.so: # lwp-request http://localhost/site/code/edit.py Mod_python error: "PythonHandler edit::handler" Traceback (most recent call last): File "/usr/local/lib/python2.3/sit

String.digits help!!!

2006-08-08 Thread Anoop
Hi All Hope u all might have come across the string deprecation thought of in Python 3.0. For example : string.lower(str) needs to be some thing like str.lower(). Can some one help me out whether such a change in the common python would require "string.digits" to be changed. If yes wat would be

Re: Missing MSVCR71.dll

2006-08-08 Thread Hoop
Hi Farshid, Yes, you are correct. I downloaded the dll and was able to run a debug build. Jeff Farshid Lashkari wrote: > The windows distribution of python was compiled with Visual Studio 7.1, > so you need the 7.1 runtime libraries on your computer to run python. I > haven't tried compiling an ap

Re: Info on continuations?

2006-08-08 Thread vasudevram
Michele Simionato wrote: > vasudevram wrote: > > Hi, > > > > I am Googling and will do more, found some stuff, but interested to get > > viewpoints of list members on: > > > > Continuations in Python. > Thanks to all who replied. Vasudev -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting previous file name

2006-08-08 Thread Hitesh
Thank you everyone. It worked. Here is the BETA 0.9 :) import os, time, sys from stat import * def findfile(path): file_list = [] for f in os.listdir(path): filename = os.path.join(path, f) if not os.path.isfile(filename): print "*** Not a file:", repr(filenam

Re: Python open a named pipe == hanging?

2006-08-08 Thread Donn Cave
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Alex Martelli) wrote: > Donn Cave <[EMAIL PROTECTED]> wrote: >... > > > > I believe your problem is that, by the time you open the > > > > pipe for read, it has already been closed by its writer. > > > > > > Hmmm, no: the problem is, he neve

ANN: xtopdf: PDF creation / conversion toolkit: alpha release of v1.3

2006-08-08 Thread vasudevram
Hi group, ANN: xtopdf: PDF creation / conversion toolkit: alpha release of v1.3 This is actually a somewhat preliminary announcement, but may be of interest to developers / users who know Python and/or have earlier checked out my xtopdf PDF creation / conversion toolkit ( http://sourceforge.net

Re: Newbie - How to iterate list or scalar ?

2006-08-08 Thread Bruno Desthuilliers
Andy Dingley wrote: > Bruno Desthuilliers wrote: > >> there's really no reason to >> assume it should be a list - any iterable could - and IMHO should - be >> accepted... expect of course for strings (royal PITA case, duh). > > >> 2/ test for pluginVersionsNeeded.__iter__ (an attribute of most >

Re: Newbie question: what's with "self"?

2006-08-08 Thread skip
donkeyboy> This is probably a really basic question, but anyway ... I'm donkeyboy> new to both Python and OO programming. From looking at a donkeyboy> number of code examples, the word "self" is used a lot when donkeyboy> referring to classes. As such, what does "self" mean and/o

Re: Looking for an intellisense with good help IDE for Python

2006-08-08 Thread taleinat
metaperl gmail.com> writes: > Hi, > > I would like an IDE that shows me all methods and functions I can call > on a particular data item. For instance, iter() can be called on any > sequence, but it is not a method. > > Nonetheless, I would like for something to show me every thing that I > can

Re: do people really complain about significant whitespace?

2006-08-08 Thread Gerhard Fiedler
On 2006-08-08 12:49:35, Aahz wrote: >>Where are they-who-hate-us-for-our-whitespace? Are "they" really that >>stupid/petty? Are "they" really out there at all? "They" almost sound >>like a mythical caste of tasteless heathens that "we" have invented. >>It just sounds like so much trivial nitpic

Re: Python open a named pipe == hanging?

2006-08-08 Thread Alex Martelli
Donn Cave <[EMAIL PROTECTED]> wrote: ... > > You forgot to add os.mkfifo(f) here -- so you're writing and reading a > > perfectly ordinary file... of course *that* gives no problems!-) > > Of course you're right about that, and with that fixed we > see that you're right, the open blocks. In or

Re: Info on continuations?

2006-08-08 Thread Michael
vasudevram wrote: > > Hi, > > I am Googling and will do more, found some stuff, but interested to get > viewpoints of list members on: > > Continuations in Python. > > Saw a few URLs which had some info, some of which I understood. But > like I said, personal viewpoints are good to have. Pytho

  1   2   3   >