Re: Python / web

2005-09-02 Thread garabik-news-2005-05
Robert <[EMAIL PROTECTED]> wrote: > Hi, > I know general Python pretty well and interested in using Python for a > web project. It will have the standard display, user input, fields, > look-ups, reports, database routines, etc. Been looking though the > Python web docs. and seeing stuff like

Re: reg email packages work

2005-09-02 Thread Tim Roberts
praba kar <[EMAIL PROTECTED]> wrote: > > I am working in web based email system project. >Here I try to build email message >from scratch. I used below code to build email >message > > msg = email.MIMEBase('text','html') > msg['Return-Path'] = user+'@'+domain > msg['Date'] = formatdate

Re: The penis is way too delicate for masturbation

2005-09-02 Thread Sybren Stuvel
Steve Holden enlightened us with: > [about Americans] > Personally I find that most individuals, no matter how misguided, > have their hearts in the right place. Same here. Then again, I might have just met the smart ones who were visiting Europe. Just kidding! Sybren -- The problem with th

Re: Code run from IDLE but not via double-clicking on its *.py

2005-09-02 Thread Richie Hindle
[Richie] > Now what does the python Command Prompt say? [n00m] > It says... NOTHING! It just DISAPPEARS! That's the strangest thing I've heard all week. 8-) OK, one more thing to try - redirect the output of Python to some files and see whether anything useful appears in the files: C:\> d: D:

Re: Bug in string.find

2005-09-02 Thread Fredrik Lundh
Ron Adam wrote: >> indices point to the "gap" between items, not to the items themselves. > > So how do I express a -0? Which should point to the gap after the last > item. that item doesn't exist when you're doing plain indexing, so being able to express -0 would be pointless. when you're doin

fileinput.input - newbie question

2005-09-02 Thread martijn
I'm testing some writing/reading with a file and i'm not sure if it is possible to print/use the line with fileinput.input inplace=1 (see below) import fileinput thefile = fileinput.input('bla.txt',inplace=1,backup='.bak') for line in thefile: if line != "1\n": print line, #is it

Re: Code run from IDLE but not via double-clicking on its *.py

2005-09-02 Thread n00m
LOL... seems it disappears only in Win98. In Win2k it goes like this: C:\>d: D:\>python23\python d:\python23\socket6.py D:\> > C:\> d: > D:\> cd \python23 > D:\> python d:\python23\socket6.py > out.txt 2> err.txt > Does anything appear in d:\python23\out.txt or d:\python23\err.txt? NOTHING APPEA

Re: Proposal: add sys to __builtins__

2005-09-02 Thread Michael Hoffman
MrJbQ7 wrote: > Steve Holden wrote: > >>I wonder if it would be worth special-casing the AttributeError [snip] > > What is it that Tim Peters said? "Special cases aren't special > enough..." That suggestion is a little too much magic for me. > Besides, a better way is to use your ~/.pythonrc fi

plotting with gnuplot.py

2005-09-02 Thread [EMAIL PROTECTED]
Hi, I've been having some problems trying some basic plotting commands with gnuplot.py. My setup is the Python 2.3 Enthought edition and my script looks as: from scipy import * from scipy import gplt import scipy.io.array_import #import Gnuplot filename = ('Default.PL1') data = scipy.io.array_im

Re: Code run from IDLE but not via double-clicking on its *.py

2005-09-02 Thread n00m
Dennis: > However, threads aren't really needed for this simple connection > relay... The following has /not/ been run (since I don't have your > server nor VBS) but should do about the same thing (see comments for one > lack). To some degree you are right! If the vbs issues only some "primitive"

How to handle video & alpha channel

2005-09-02 Thread Mic
I'm looking for a way to build a little player (if possibile with python ) that could handle common video file formats (mpeg or other) with above an image with alpha channel (png or other) Is there a way to make this with python and available libs (PIL etc)? TIA MB -- http://mail.python.org

Re: To the python-list moderator

2005-09-02 Thread skip
Fredrik> Terry Hancock wrote: >> I got one of these too, recently. Maybe somebody is turning up the >> screws to get rid of spam that's been appearing on the list? Fredrik> I've been getting these about once a day lately. at first, I Fredrik> suspected some kind of "you're p

problems with smtplib

2005-09-02 Thread Jon Hewer
hi having a few problems sending an email with smtplib. i do have an smtp server running on port 25 of my local machine here's the relevant code (taken from python docs): s = smtplib.SMTP('localhost') s.connect() s.sendmail(me, to, msg.as_string()) s.close() and i'm getting this error: Traceb

Re: descriptors for container items

2005-09-02 Thread bruno modulix
Terry Reedy wrote: > "Brock Filer" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>countries['us']['Colorado']['Denver']['@population'] >> >>This is going to be used in user-input formulae, so I'm willing to do a >>lot of work for minor beautifications. I'd like to be able to sa

Re: fileinput.input - newbie question

2005-09-02 Thread Peter Otten
[EMAIL PROTECTED] wrote: > I'm testing some writing/reading with a file and i'm not sure if it is > possible to print/use the line with fileinput.input inplace=1 (see > below) fileinput.input(inplace=True) redirects stdout to the file[s] given as its first parameter. Instead of appearing on the s

Re: plotting with gnuplot.py

2005-09-02 Thread Varun Hiremath
On Fri, Sep 02, 2005 at 02:35:45AM -0700, [EMAIL PROTECTED] wrote: > Hi, > > I've been having some problems trying some basic plotting commands with > gnuplot.py. My setup is the Python 2.3 Enthought edition and my script > looks as: > > from scipy import * > from scipy import gplt > import scipy

anaconda.real in RH7.1

2005-09-02 Thread Allan Adler
I'm trying to reinstall RedHat 7.1 Linux on a PC that was disabled when I tried to upgrade from RH7.1 to RH9. This is presenting lots of unexpected difficulties. Apart from wanting to keep the old model T in shape, I'm treating this as a learning experience. Right now, I'm trying to gain more cont

Re: Decrypting GPG/PGP email messages

2005-09-02 Thread Piet van Oostrum
> Alessandro Bottoni <[EMAIL PROTECTED]> (AB) wrote: >AB> Of course, I want to be sure that only the allowed people is able to send >AB> such dangerous messages to my server so I will ask my users to encrypt and >AB> digitally sign their messages using Thunderbird, Enigmail and GPG ... What b

How to use Advanced Debugger Support API calls in Python/C API?

2005-09-02 Thread Danushka Menikkumbura
Hi,   Can somebody please explain me how to use the Advanced Debugger Support in Python/C API? I want to use this to trace and get debug information from a script which is being interpreted by the python interpreter.   Thanks in advance.   Cheers!!!   Danushka  

Re: scroll a frame to display several lines of widgets at a time

2005-09-02 Thread Matt Hammond
I don't quite understand (if I'm interpreting you correctly) why you want separate widgets, all displayed at once, for several hundred records - surely better to just reuse the one set of widgets and have the scrollbar or back-forward buttons change which record is being displayed in the wi

Re: Decrypting GPG/PGP email messages

2005-09-02 Thread Piet van Oostrum
> Alessandro Bottoni <[EMAIL PROTECTED]> (AB) wrote: >AB> Of course, I want to be sure that only the allowed people is able to send >AB> such dangerous messages to my server so I will ask my users to encrypt and >AB> digitally sign their messages using Thunderbird, Enigmail and GPG ... What b

Re: Decrypting GPG/PGP email messages

2005-09-02 Thread Piet van Oostrum
> Alessandro Bottoni <[EMAIL PROTECTED]> (AB) wrote: >AB> Of course, I want to be sure that only the allowed people is able to send >AB> such dangerous messages to my server so I will ask my users to encrypt and >AB> digitally sign their messages using Thunderbird, Enigmail and GPG ... What b

Re: fileinput.input - newbie question

2005-09-02 Thread martijn
That works fine ;) Thanks for the fast help. GC-Martijn -- http://mail.python.org/mailman/listinfo/python-list

Re: Decrypting GPG/PGP email messages

2005-09-02 Thread Piet van Oostrum
> Paul Rubin (PR) wrote: >PR> PGP/GPG have their own base64 encoding called "ascii armor" in PGP >PR> lingo. This stuff predates widespread use of MIME and traditionally, >PR> PGP messages are sent as ascii armored plain text, not attachments. Most PGP/GPG message

Re: problems with smtplib

2005-09-02 Thread Harlin Seritt
What are you getting in your smtpd logs? Are you using postfix? sendmail? or are you running this against a Windows stmp service? Harlin Seritt Internet Villa: www.seritt.org -- http://mail.python.org/mailman/listinfo/python-list

Re: The penis is way too delicate for masturbation

2005-09-02 Thread mgraves
"Eve S." <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > <[EMAIL PROTECTED]> schreef in bericht > news:[EMAIL PROTECTED] >> . >> > > A decent amount of gentle sucking on the other hand never goes amiss. Unless you've got a problem with depth perception and discover that what you

Re: OpenSource documentation problems

2005-09-02 Thread Michael Sparks
Paul Rubin wrote: > Michael Sparks <[EMAIL PROTECTED]> writes: >> > I've submitted a number of doc bugs to sourceforge and the ones >> > that are simple errors and omissions do get fixed. >> >> Cool. > > Better than nothing, but it's only one class of problem, and maybe the > easiest kind to rep

Re: Add lists to class?

2005-09-02 Thread Paolino
Mike Meyer wrote: > "BBands" <[EMAIL PROTECTED]> writes: > > >>I have a list with some strings in in it, 'one', 'two' 'three' and so >>on. I would like to add lists to a class with those names. I have no >>way of knowing what will be in the list or how long the list will be in >>advance. > > >

Re: NYC Opening

2005-09-02 Thread Jeremy Jones
Diez B. Roggisch wrote: >Kevin McGann wrote: > > >>-Expert Java or C++ >> >> > >Now why exactly do you post that in c.l.python? > > > >>THEY ARE LOCATED IN NEW YORK, THIS IS FULL-TIME ONLY, WILL NOT CONSIDER >>ANYONE FROM OUTSIDE THE US! THIS TEAM IS AN ELITE TEAM, YOU BETTER BE >>GOOD

Re: problems with smtplib

2005-09-02 Thread n00m
I also can't get my SMTP (win2k) working with Python. But... funnily this works fine: import smtplib s = smtplib.SMTP('smtp.mail.ru') s.sendmail('[EMAIL PROTECTED]', '[EMAIL PROTECTED]', 'hi there!') s.quit() Why do they (mail.ru) allow outsiders to use their service??? -- http://mail.python.or

Re: Python and file locking - NFS or MySQL?

2005-09-02 Thread Jeremy Jones
Christopher DeMarco wrote: >Hi all... > >...I've got a Python script running on a bunch of boxen sharing some >common NFS-exported space. I need (not want :) to lock files for >writing, and I need (not want :) to do it safely (i.e. atomically). >I'm doing this in Linux; NFS4 is available. As I u

Re: Automatic language translation

2005-09-02 Thread Magnus Lycka
Jon wrote: > Does python have a module that will translate between different spoken > languages? My python program displays all of its messages in English > currently and my boss wants it to default to Korean now. > > Any ideas how to go about doing this? "import gettext" is a start... See http:

Re: Proposal: add sys to __builtins__

2005-09-02 Thread tiissa
Michael Hoffman a écrit : > MrJbQ7 wrote: > > > Besides, a better way is to use your ~/.pythonrc file for customizing > > according to your needs. > > > > A simple: > > > > echo "import sys, os" >> ~./pythonrc > > > > will do the job. > > Until someone else tries to use your script or module. A

Re: Python / web

2005-09-02 Thread Luis M. Gonzalez
Karrigell is a very good option. Easy to learn and easy to use. In words of his author: "Karrigell is a simple web programming solution, written in Python. It has been designed to be really simple to use : integrated web server and data base ( gadfly), easy access to environement data and form fie

Re: problems with smtplib

2005-09-02 Thread Steve Holden
n00m wrote: > I also can't get my SMTP (win2k) working with Python. > But... funnily this works fine: > > import smtplib > s = smtplib.SMTP('smtp.mail.ru') > s.sendmail('[EMAIL PROTECTED]', '[EMAIL PROTECTED]', 'hi > there!') > s.quit() > That's pretty strange: the second argument should be a lis

HTML tags optimization

2005-09-02 Thread DENG
hi all, i want to do some optimizations for HTML tags, something like this: TEXT1TEXT2 optimise to TEXT1TEXT2 at the very beginning, i was thinking of analysing each text-block, to know their color, size, if is bold or italic, but i found it was too complicated. e.g TEXT1 optimise to TEXT

Re: problems with smtplib

2005-09-02 Thread n00m
Steve Holden wrote: > That's pretty strange: the second argument should be a list. Are you > *sure* it worked? Hmm... I sent a couple of letters to my two different addresses... and got them! -- http://mail.python.org/mailman/listinfo/python-list

Re: pickling the objects returned by array.array()

2005-09-02 Thread Raymond Hettinger
John Machin wrote: > Looks like arrays are NOW (2.4.1) pickleable but not unpickleable Please file a bug report and assign to me. Raymond Hettinger -- http://mail.python.org/mailman/listinfo/python-list

Re: Decrypting GPG/PGP email messages

2005-09-02 Thread François Pinard
[Piet van Oostrum] > > Alessandro Bottoni <[EMAIL PROTECTED]> (AB) wrote: > >AB> Of course, I want to be sure that only the allowed people is > >AB> able to send such dangerous messages to my server so I will ask > >AB> my users to encrypt and digitally sign their messages using > >AB> Thunder

Re: HTML tags optimization

2005-09-02 Thread Steve Holden
DENG wrote: > hi all, > > i want to do some optimizations for HTML tags, > > something like this: > > TEXT1TEXT2 > > optimise to > > TEXT1TEXT2 > > at the very beginning, i was thinking of analysing each text-block, to > know their color, size, if is bold or italic, but i found it was too > c

Re: Python and file locking - NFS or MySQL?

2005-09-02 Thread Fredrik Lundh
Christopher DeMarco wrote: > 2. open(2) is atomic on a local FS, I've read discussions that imply > that link(2) is atomic over NFS (is it?), so I can link from local > lockfile to remote target atomically. I don't grok this; open(2) + > link(2) + stat(2) == 3 calls on my fingers. HTH is this s

Re: Python / web

2005-09-02 Thread Benji York
Mike Meyer wrote: > Robert <[EMAIL PROTECTED]> writes: >> I know general Python pretty well and interested in using Python >> for a web project. > Others have already suggested Zope/Plone, which seems to be the most > popular such system. I only have limit experience with Zope, but I > found that

Re: OpenSource documentation problems

2005-09-02 Thread A.M. Kuchling
On Fri, 02 Sep 2005 06:19:16 GMT, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > My attempts at simple came in closer to the life insurance than > Lincoln -- forget about Hemingway; the only way I could approach his > writing was to stick to: Hello World; Good day; See you later; Bye

Re: [OT] HTML tags optimization

2005-09-02 Thread bruno modulix
DENG wrote: (snip same post as two days ago) In case you don't know, google.groups is just a web interface (and archive) to usenet groups. No need to repost the same question twice... BTW, for what you want to do (which is mostly a waste of time IMHO, but what, that's your time, not mine), the

Re: Python and file locking - NFS or MySQL?

2005-09-02 Thread Fredrik Lundh
Fredrik Lundh wrote: > 5) check the number of links to each file > > n = os.stat(tempfile)[3] > m = os.stat(lockfile)[3] aw, forget that. I shouldn't trust google over my own code. here's the correct algorithm: f = open(tempfile, "w") f.close() n = os.stat(tempfile)[3]

Re: OpenSource documentation problems

2005-09-02 Thread A.M. Kuchling
On Thu, 1 Sep 2005 23:08:18 -0400, Fred L. Drake, Jr. <[EMAIL PROTECTED]> wrote: > Ideally, emails to docs at python.org would result in issues being created > somewhere, simply so they don't get lost. It probably doesn't make sense for > those to land in SourceForge automatically, sinc

Re: problems with smtplib

2005-09-02 Thread Jon Hewer
I'm running Fedora Core 3, and I assume thats useing sendmail... On 2 Sep 2005 04:25:41 -0700, Harlin Seritt <[EMAIL PROTECTED]> wrote: > What are you getting in your smtpd logs? Are you using postfix? > sendmail? or are you running this against a Windows stmp service? > > Harlin Seritt > Interne

RE: HTML tags optimization

2005-09-02 Thread Michael . Coll-Barth
Maybe you can get some ideas over at http://validator.w3.org/docs/. At least they have the whole parser thing worked out. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] n.org]On Behalf Of DENG Sent: Friday, September 02, 2005 8:36 AM To: python-list@python.org Subje

Re: OpenSource documentation problems

2005-09-02 Thread A.M. Kuchling
On Fri, 2 Sep 2005 01:28:22 -0500, Terry Hancock <[EMAIL PROTECTED]> wrote: > Hmm. Still sounds like "there ought to be a wiki". I've seen references > to two different ones on this thread. One was then debunked as a "failed > experiment". The other just gave me a DNS lookup failure (may

Re: HTML tags optimization [ interesting problem]

2005-09-02 Thread DENG
hi, Sybren, thanks for your reply, if use CSS: texttexttext optimise to: texttexttext what i need is the METHOD to do optimization, in fact, i have ready write a program to analyse the syntax of CSS, to make it works with all situation -- http://mail.python.org/mailman/listinfo/python-list

Re: Epydoc - Documenting class members?

2005-09-02 Thread Michael Ekstrand
On Thu, 1 Sep 2005 22:38:03 -0500 Terry Hancock <[EMAIL PROTECTED]> wrote: > > I don't like this, I want to document where I declare the variable > > below. Doxygen (www.doxygen.org), for one example, knows how to do > > this. > > Then use Doxygen if it's a superior product. I presume > it knows h

Re: How to handle video & alpha channel

2005-09-02 Thread Diez B. Roggisch
Mic wrote: > I'm looking for a way to build a little player (if possibile with > python ) that could handle common video file formats (mpeg or other) > with above an image with alpha channel (png or other) > > Is there a way to make this with python and available libs (PIL etc)? Check out pym

Re: anaconda.real in RH7.1

2005-09-02 Thread pruebauno
Allan Adler wrote: > I'm using the book, "Programming Python", by Mark Lutz, as a reference. No offence to Mark Lutz or O'Reilly but I consider "Programming Python" one of the worst books I have read (in my case an old first edition). It overwhelms the beginning programmer ("Learning Python" is pr

Re: Well, Python is hard to learn...

2005-09-02 Thread Magnus Lycka
wen wrote: > due to the work reason, i have to learn python since last month. i have > spent 1 week on learning python tutorial and felt good. but i still don't > understand most part of sourcecode of PYMOL(http://pymol.sourceforge.net/) > as before. Maybe you (or someone else) is making a mistake

PyBool_FromLong

2005-09-02 Thread Andrew MacKeith
In the C API Docs, the signature of PyBool from long seems to be incorrect. int PyBool_FromLong(long v) Returns Py_True or Py_False depending on the truth value of v. New in version 2.3. The description would suggest: PyObject* PyBool_FromLong(long v) -- http://mail.python.org/mailman/li

Re: Proposal: add sys to __builtins__

2005-09-02 Thread Michael Hoffman
tiissa wrote: > A developper should not be too lazy to add one small line in a complete > script/module. To the contrary, I agree with Larry Wall that laziness is one of the cardinal virtues of a programmer. Although my personal desire to be lazy is not at issue here--I always start new scripts

Re: anaconda.real in RH7.1

2005-09-02 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: > If I know the the name of the module > (for example it starts with sys.zz) I use: > http://www.python.org/doc/2.4.1/modindex.html > > If I know what I want but not the name I use: > http://www.python.org/doc/2.4.1/lib/lib.html I have a Firefox Quick Search installed wi

Re: PyBool_FromLong

2005-09-02 Thread Michael Hoffman
Andrew MacKeith wrote: > In the C API Docs, the signature of PyBool from long seems to be incorrect. > > int PyBool_FromLong(long v) > Returns Py_True or Py_False depending on the truth value of v. New > in version 2.3. > > The description would suggest: > > PyObject* PyBool_FromLong(long v

Re: The penis is way too delicate for masturbation

2005-09-02 Thread Chucky & Janica
Once upon a time - for example, 1 Sep 2005 05:32:54 -0700 - there was this guy, or something, called [EMAIL PROTECTED], and they made us all feel better by saying the following stuff: >. That penis, more to the point, is too small for masturbation. C&J -- Beware of Trojans, they're complete

__setslice__ and classes derived from list

2005-09-02 Thread Dave Opstad
According to the documentation the __setslice__ method has been deprecated since Python 2.0. However, if I'm deriving classes from the builtin list class, I've discovered I can't really ignore __setslice__. Have a look at this snippet: >>> cl

Re: 'isa' keyword

2005-09-02 Thread Rocco Moretti
Terry Hancock wrote: > On Thursday 01 September 2005 07:28 am, Fuzzyman wrote: > >>What's the difference between this and ``isinstance`` ? > > I must confess that an "isa" operator sounds like it would > have been slightly nicer syntax than the isinstance() built-in > function. But not enough nic

Re: OpenSource documentation problems

2005-09-02 Thread Tim Peters
[Paul Rubin] > Until not that long ago, it was possible to submit sf bugs without > being logged into sf. Why did that change? To reduce tracker spam, to reduce tracker vandalism, and to make it possible to contact submitters when needed. -- http://mail.python.org/mailman/listinfo/python-list

Re: __setslice__ and classes derived from list

2005-09-02 Thread Michael Hoffman
Dave Opstad wrote: > There's a workaround for this, namely to include this method: > > def __setslice__(self, i, j, seq): > self.__setitem__(slice(i, j), seq) > > That way any custom code I need to include in __setitem__ doesn't have > to be duplicated in __setslice__. But just out

Re: To the python-list moderator

2005-09-02 Thread Neil Schemenauer
Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Terry Hancock wrote: > >> I got one of these too, recently. Maybe somebody is turning up the >> screws to get rid of spam that's been appearing on the list? In the future, sending a message to [EMAIL PROTECTED] is suggested rather than posting to only to

why no user-def. attributes?

2005-09-02 Thread severa
I appologize in advance for stupid question, which is: why are user-defined attributes not allowed for builtin types? [I guess I undestand why *instances* cannot have them (e.g. then every dict would have a dict which would have a dict..), but this is a different question] I can imagine several

Re: OpenSource documentation problems

2005-09-02 Thread Peter Hansen
A.M. Kuchling wrote: > On Fri, 02 Sep 2005 06:19:16 GMT, > Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > >> My attempts at simple came in closer to the life insurance than >>Lincoln -- forget about Hemingway; the only way I could approach his >>writing was to stick to: Hello World; Go

.pth files question

2005-09-02 Thread Benjamin Rutt
Am I correct in understanding that: 1) foo.pth will be used if it is in the directory /usr/lib/python-2.4/site-packages 2) foo.pth will not be read from if it is only placed somewhere in the PYTHONPATH environment, such as foo.pth exists as the file /tmp/bar/foo.pth, where PYTHONPATH contains "/t

Re: __setslice__ and classes derived from list

2005-09-02 Thread Dave Opstad
In article <[EMAIL PROTECTED]>, Michael Hoffman <[EMAIL PROTECTED]> wrote: > Perhaps you should submit a feature request? It must be time to get rid > of __setslice__, if not now, then maybe by Python 3.0. I'm happy to submit a feature request, once I figure out how to do it! Dave -- http://m

Re: is there a better way to check an array?

2005-09-02 Thread Peter Hansen
Mike Meyer wrote: > "Steve M" <[EMAIL PROTECTED]> writes: >>my_list.find(candidate) >>-returns the index into my_list of the first occurrence of candidate. >>Returns -1 if candidate doesn't occur in my_list. > > Lists don't have a find method. strings do. Why is a good question. Probably because

Re: pain

2005-09-02 Thread Peter Hansen
Steve Holden wrote: > and the day managers stop being ignorant we'll all be able to fly around > on pigs. Not wishing to offend the pigs, of course. > > still-working-for-myself-ly y'rs - steve What Steve means here, of course, is that he is his own manager. ;-) -Peter -- http://mail.python.

Re: Jargons of Info Tech industry

2005-09-02 Thread axel
In comp.lang.perl.misc John Bokma <[EMAIL PROTECTED]> wrote: > "T Beck" <[EMAIL PROTECTED]> wrote: >> I suppose I was (as many people on the internet have a bad habit of >> doing) being more caustic than was strictly necessary. I don't really >> forsee the death of usenet anytime soon, I just do

Re: problems with smtplib

2005-09-02 Thread Peter Hansen
Steve Holden wrote: > n00m wrote: > >> I also can't get my SMTP (win2k) working with Python. >> But... funnily this works fine: >> >> import smtplib >> s = smtplib.SMTP('smtp.mail.ru') >> s.sendmail('[EMAIL PROTECTED]', '[EMAIL PROTECTED]', 'hi >> there!') >> s.quit() >> > That's pretty strange: t

Re: __setslice__ and classes derived from list

2005-09-02 Thread Michael Hoffman
Dave Opstad wrote: > I'm happy to submit a feature request, once I figure out how to do it! http://sourceforge.net/projects/python/ Follow the RFE link. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: scroll a frame to display several lines of widgets at a time

2005-09-02 Thread William Gill
Matt Hammond wrote: > I don't quite understand (if I'm interpreting you correctly) why you > want separate widgets, all displayed at once, for several hundred > records - surely better to just reuse the one set of widgets and have > the scrollbar or back-forward buttons change which record

Re: .pth files question

2005-09-02 Thread Michael Hoffman
Benjamin Rutt wrote: > Am I correct in understanding that: > > 1) foo.pth will be used if it is in the directory > /usr/lib/python-2.4/site-packages > > 2) foo.pth will not be read from if it is only placed somewhere in the > PYTHONPATH environment, such as foo.pth exists as the file > /tmp/bar/f

Re: .pth files question

2005-09-02 Thread Peter Hansen
Benjamin Rutt wrote: > Am I correct in understanding that: > > 1) foo.pth will be used if it is in the directory > /usr/lib/python-2.4/site-packages > > 2) foo.pth will not be read from if it is only placed somewhere in the > PYTHONPATH environment, such as foo.pth exists as the file > /tmp/bar/f

Re: is there a better way to check an array?

2005-09-02 Thread Fredrik Lundh
Peter Hansen wrote: > Probably because at one point lists didn't even have the index() method, > and when it was suggested and (I believe) Raymond H. added it the list "index" method has been in Python since, like, forever (early 1991, according to CVS, which means that it was added about two yea

Help for NewBies at WikiBooks

2005-09-02 Thread Alessandro Bottoni
I just discovered that Wikipedia has a very fine WikiBook about Python Programming: http://en.wikibooks.org/wiki/Programming:Python I think that most of the newbies (like me ;-) will find it very interesting. CU --- Alessandro Bottoni -- http://mail.python.org/ma

Re: Code run from IDLE but not via double-clicking on its *.py

2005-09-02 Thread Bryan Olson
Dennis Lee Bieber wrote: > I'm going to go back a few messages... Looking for a > simplification... [...] > TWO threads, both just infinite loops of the same nature (you could > actually have done ONE def and passed different arguments in to > differentiate the two thread invocations

Re: Sockets: code works locally but fails over LAN

2005-09-02 Thread Bryan Olson
I wrote: > Below is a version that respects ^C to terminate > more-or-less cleanly. Oops, one more bug^H^H^H improvement. I forgot to shutdown writing. > import socket, threading, select > > sqls_host, sqls_port = '192.168.0.3', 1443 > proxy_host, proxy_port = '', 1434 > > > def start_d

Re: Code run from IDLE but not via double-clicking on its *.py

2005-09-02 Thread bryanjugglercryptographer
I wrote: > I prefer the tread solution. You can see my exmaple > in message <[EMAIL PROTECTED]>. > >http://groups.google.com/group/comp.lang.python/msg/ffd0159eb52c1b49 [...] > you should send the shutdown > across, much like you copy data across: shutdown writing on the > other socket. Whic

Re: Add lists to class?

2005-09-02 Thread BBands
That's interesting and I take your point. Maybe there is a better way. Here is what I am doing now. (working) I start with a text file of ticker symbols. I read each symbol and stick it in a list, retrieve the data for it from MySQL, do a trivial smoothing and pass the data to a modeling routine.

Re: 'isa' keyword

2005-09-02 Thread talin at acm dot org
Thanks for all the respones :) I realized up front that this suggestion is unlikely to gain approval, for reasons eloquently stated above. However, there are still some interesting issues raised that I would like to discuss. Let me first respond to a few of the comments: >What's the difference be

Re: Add lists to class?

2005-09-02 Thread BBands
That's interesting and I take your point. Maybe there is a better way. Here is what I am doing now. (working) I start with a text file of ticker symbols. I read each symbol and stick it in a list, retrieve the data for it from MySQL, do a trivial smoothing and pass the data to a modeling routine.

Re: Sockets: code works locally but fails over LAN

2005-09-02 Thread n00m
My today's tests (over LAN). I think *it* will drive me mad very soon. Firstly I tested both Bryan's codes. And they worked fine! Just as if they were tested locally! Then I tested Fredrik suggestion. And it worked out too. Expect unexpected, - as they say. At last I decided to test my own versi

Re: Bug in string.find

2005-09-02 Thread Steve Holden
Dennis Lee Bieber wrote: > On Fri, 02 Sep 2005 00:23:14 GMT, Ron Adam <[EMAIL PROTECTED]> declaimed > the following in comp.lang.python: > > >>So how do I express a -0? Which should point to the gap after the last >>item. >> > > Step one: Obtain a processor that uses ones-complement arit

Re: problems with smtplib

2005-09-02 Thread Steve Holden
Peter Hansen wrote: > Steve Holden wrote: > >>n00m wrote: >> >> >>>I also can't get my SMTP (win2k) working with Python. >>>But... funnily this works fine: >>> >>>import smtplib >>>s = smtplib.SMTP('smtp.mail.ru') >>>s.sendmail('[EMAIL PROTECTED]', '[EMAIL PROTECTED]', 'hi >>>there!') >>>s.quit()

Re: Add lists to class?

2005-09-02 Thread Michael Hoffman
BBands wrote: > I start with a text file of ticker symbols. I read each symbol and > stick it in a list, retrieve the data for it from MySQL, do a trivial > smoothing and pass the data to a modeling routine. I read the tickers > into a list, self.symbols. OK... > Then for each ticker I create a

Re: is there a better way to check an array?

2005-09-02 Thread Peter Hansen
Fredrik Lundh wrote: > Peter Hansen wrote: >>Probably because at one point lists didn't even have the index() method, >>and when it was suggested and (I believe) Raymond H. added it > > the list "index" method has been in Python since, like, forever (early 1991, > according to CVS, which means tha

Problem building Python on HP-UX

2005-09-02 Thread Dr. Who
I'm trying to build Python 2.4.1 on HP-UX 11.00 with full tcl/tk IDLE support. So far, I haven't had any luck. I always wind up getting errors of the form: ld: DP relative code in file /ptg/devtools/hppa1.1/pre/lib/libtk8.4.a(tkWindow.o) - shared library must be position independent. Use +z or

Re: problems with smtplib

2005-09-02 Thread Jon Hewer
just got home and i've tried my script on windows with my isp's smtp server, and found that my code wasn't getting past the s.connect() changed me code to: s = smtplib.SMTP('smtp.lineone.net') s.sendmail(me, to, msg.as_string()) s.quit() and now it works fine On 9/2/05, Steve Holden

Re: Code run from IDLE but not via double-clicking on its *.py

2005-09-02 Thread n00m
Dennis Lee Bieber wrote: > Hope you'll forgive my comment -- but for some reason those look... Your comments are absolutely relevant. > My version, using select(), shouldn't have this problem. Now I see what you meant ("You need no threads"). Your code works just fine (hope over LAN too). I correc

Find day of week from month and year

2005-09-02 Thread Laguna
Hi Gurus, I want to find the expiration date of stock options (3rd Friday of the month) for an any give month and year. I have tried a few tricks with the functions provided by the built-in module time, but the problem was that the 9 element tuple need to be populated correctly. Can anyone help me

Re: Find day of week from month and year

2005-09-02 Thread Paul Rubin
"Laguna" <[EMAIL PROTECTED]> writes: > I want to find the expiration date of stock options (3rd Friday of the > month) for an any give month and year. I have tried a few tricks with > the functions provided by the built-in module time, but the problem was > that the 9 element tuple need to be popul

Re: Find day of week from month and year

2005-09-02 Thread Robert Kern
Laguna wrote: > Hi Gurus, > > I want to find the expiration date of stock options (3rd Friday of the > month) for an any give month and year. I have tried a few tricks with > the functions provided by the built-in module time, but the problem was > that the 9 element tuple need to be populated cor

Re: OpenSource documentation problems

2005-09-02 Thread skip
Tim> [Paul Rubin] >> Until not that long ago, it was possible to submit sf bugs without >> being logged into sf. Why did that change? Tim> To reduce tracker spam, to reduce tracker vandalism, and to make it Tim> possible to contact submitters when needed. Also, "not that lon

Re: Problem building Python on HP-UX

2005-09-02 Thread Trent Mick
[Dr. Who wrote] > I'm trying to build Python 2.4.1 on HP-UX 11.00 with full tcl/tk IDLE > support. So far, I haven't had any luck. I always wind up getting > errors of the form: > > ld: DP relative code in file > /ptg/devtools/hppa1.1/pre/lib/libtk8.4.a(tkWindow.o) - shared library > must be pos

Re: Find day of week from month and year

2005-09-02 Thread Donn Cave
In article <[EMAIL PROTECTED]>, "Laguna" <[EMAIL PROTECTED]> wrote: > I want to find the expiration date of stock options (3rd Friday of the > month) for an any give month and year. I have tried a few tricks with > the functions provided by the built-in module time, but the problem was > that the

Re: OpenSource documentation problems

2005-09-02 Thread Paul Rubin
[EMAIL PROTECTED] writes: > Also, "not that long ago" must mean different things for different people. > I think we've required logins for three years or more. I hope you're not right and that it hasn't really been that long. Yikes ;-). -- http://mail.python.org/mailman/listinfo/python-list

defining classes

2005-09-02 Thread LeRoy Lee
I have been searching for the answer to this as it will determine how I use classes. Here are two bits of code. class foo1: def __init__(self, i): self.r = i self.j = 5 >>h = foo1(1) >>h.r 1 >>h.j 5 Now take this example class foo2: def __init__(self): self.j

  1   2   >