"M.E.Farmer" wrote:
> What about a generator and xreadlines for those really large files:
when you loop over a file object, Python uses a generator and a xreadlines-
style buffering system to read data as you go. (if you check the on-line help,
you'll notice that xreadlines itself is only provid
Gezer Punta wrote:
hi all
I am looking for a forum which was produced by python
If you want Zope-based, try Plone. But probably you don't.
I am not aware of any standard python CGI-based forum software, but I am
sure you could find one if you search sourceforge or google.
I am surprised no one e
Doug Holton wrote:
Boo, a programming language that is virtually identical to python, ...
See http://boo.codehaus.org/
In fact, since not many seem to be aware of its existence, I encourage
everyone here to check out boo as an alternative to python.
Why? If it's virtually identical, why would any
On Sun, 19 Dec 2004 18:30:03 -0600, Doug Holton <[EMAIL PROTECTED]> wrote:
>Gezer Punta wrote:
>
> > hi all
> > I am looking for a forum which was produced by python
>
> If you want Zope-based, try Plone. But probably you don't.
> I am not aware of any standard python CGI-based forum software,
Jp Calderone wrote:
Part of fostering a friendly environment on python-list is not making
comments like these.
Another part is actually answering the content of a person's question
like I did, instead of trolling and flaming, like Fredrik and others
here are want to do.
--
http://mail.python.
Peter Hansen wrote:
Why? If it's virtually identical, why would anyone bother even
visiting that site? ;-)
But I suspect you mean that the syntax of the language is virtually
identical, while probably there are some significant differences.
Maybe in the richness of its standard library? Or the s
On Mon, 20 Dec 2004, Fredrik Lundh wrote:
> Simo Melenius wrote:
>
> >> Ahem. If you name the function, you can reuse the name (or just
> >> forget about it) as soon as you've used the function object.
> >
> > Sure, but mental pollution counts too IMO. What you write and what you
> > read must go t
Fredrik Lundh wrote:
> well, since I'm not in the ego-stroking business, what if I
> promise never to
> reply to posts by you, robert, and alex?
?? I'll take your replies anytime. You're a long way from all noise and
no signal. I'm happy to learn what I can from you.
Robert Brewer
MIS
Amor Mini
try http://kldp.net/projects/pybb/
example site is http://bbs.pythonworld.net:9080/pybbs.py
On Sun, 19 Dec 2004 22:09:52 +0200, Gezer Punta <[EMAIL PROTECTED]> wrote:
> hi all
> I am looking for a forum which was produced by python
>
> link pls
> --
> http://mail.python.org/mailman/listinfo/pyt
> Why? If it's virtually identical, why would anyone bother even
> visiting that site? ;-)
>
> But I suspect you mean that the syntax of the language is virtually
> identical, while probably there are some significant differences.
> Maybe in the richness of its standard library? Or the size of
> I do understand the feeling though; Fredrik Lundh jumped at me only a
> few days ago when I said that I personally found list comprehensions
> more readable than map. I certainly don't mind being advised or
> corrected if I've written incorrect or even just suboptimal code, but
> attacking a per
On Sun, 19 Dec 2004 18:45:12 -0600, Doug Holton <[EMAIL PROTECTED]> wrote:
>Jp Calderone wrote:
> > Part of fostering a friendly environment on python-list is not making
> > comments like these.
>
> Another part is actually answering the content of a person's question
> like I did, instead of
eScrew
Welcome to eScrew!
eScrew is eScrew and this is eScrew story. eScrew will tell you eScrew
story if you promise eScrew to consider eScrew story as joke. eScrew
story is very funny. eScrew story is so funny that eScrew will have to
take break from time to time because eScrew needs some rest f
On Sun, 19 Dec 2004 23:15:40 GMT, Keith Dart <[EMAIL PROTECTED]> wrote:
>Mike Meyer wrote:
> > The termios gives module gives you the tools to manipulate the tty
> > directly, without invoking stty. The tty module gives you an easier
> > interface to those routines. However, it's missing a setsane
Fredrik,
Thanks didn't realize that about reading a file on a for loop. Slick!
By the way the code I posted was an attempt at not building a
monolithic memory eating list like you did to return the values in your
second example.
Kinda thought it would be nice to read them as needed instead of all a
Simon Wittber wrote:
> We've just had a Python 2.4 release, and poor Mr Lundh has likely had
> hundreds of user's clamouring for a binary, 2.4 compatible PIL
> release.
many hundreds, indeed. but that's not a problem at all; I have a webserver
that helps me with things like that.
--
http:
Steven Bethard wrote:
I don't really have a good solution; despite the unnecessarily vicious
comments, I don't feel like I can set my newsreader to ignore messages
from, for example, Fredrik, because his answers, when not attacks, are
often very insightful. If you find a good solution to this p
Hi Mike - Thanks for taking the time to put this together.
In article <[EMAIL PROTECTED]>, Mike Meyer wrote:
> - max(*args): return the largest of a list of numbers and self.
> - min(*args): return the smallest of a list of numbers and self.
I would strongly prefer either adapting the already bui
M.E.Farmer wrote:
I dont have itertools yet. That module looks like it rocks.
thanks for the pointers,
M.E.Farmer
If you have python 2.3 or 2.4, you have itertools.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
Doug Holton wrote:
Jp Calderone wrote:
Part of fostering a friendly environment on python-list is not making
comments like these.
Another part is actually answering the content of a person's question
like I did, instead of trolling and flaming, like Fredrik and others
here are want to do.
Non
Luis M. Gonzalez wrote:
Why? If it's virtually identical, why would anyone bother even
visiting that site? ;-)
The difference is that it runs on the .NET frmework (and Mono).
So instead of using the python standard libraries, you use the .NET
ones.
Regarding its syntax, it is very similar to Pyth
On Sun, 19 Dec 2004 16:46:34 +0100, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote:
>Jerry Sievers wrote:
>
>> It gets uglier though if you want to do this from inside a function
>> and have variables from more than one scope interpolated. For that
>> you need something that can treat a series of dict
Peter Hansen wrote:
"Virtually identical" indeed. :-)
As noted on the website that I've pointed out to you multiple times now,
the syntax of boo is indeed virtually identical to python. The
functionality however, is more like C#.
--
http://mail.python.org/mailman/listinfo/python-list
Peter Hansen wrote:
None of which in any way invalidates Jp's point...
Neither does it invalidate mine. What is up with the trollers today?
They are out in force now that the holidays are here.
--
http://mail.python.org/mailman/listinfo/python-list
This book is due to be published any day now:
"Introduction to computing and programming with Python: A Multimedia
Approach" by Mark Guzdial, a CS professor at Georgia Tech.
It uses the Jython Environment for Students (JES). It is completely
free and open source. You can use it for example to
Yea I should have mentioned I am running python 2.2.2.
Can it be ported to python 2.2.2?
Till they get python 2.4 all up and runningI'll wait a bit.
Thanks for the info,
M.E.Farmer
Scott David Daniels wrote:
> M.E.Farmer wrote:
> > I dont have itertools yet. That module looks like it rocks.
>
Jp Calderone wrote:
On Sun, 19 Dec 2004 23:15:40 GMT, Keith Dart <[EMAIL PROTECTED]> wrote:
Mike Meyer wrote:
The termios gives module gives you the tools to manipulate the tty
directly, without invoking stty. The tty module gives you an easier
interface to those routines. However, it's missing a s
What does this error message mean? What can I do to fix it?
Here'e the command that I just tried running, and the messages that
I received. I just barely unpacked python.
linux:/Python-2.4 # ./configure
checking MACHDEP... linux2
checking EXTRAPLATDIR...
checking for --without-gcc... n
Often I've written code that generates some textual output and dumps
said output to a file or socket. Of course, we are all familiar with
the performance impact (multiple copies of text data and O(n**2)
performance) associated with the naive approach of:
string += "some other string"
string +=
"Jim Hill" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I've done some Googling around on this and it seems like creating a here
document is a bit tricky with Python. Trivial via triple-quoted strings
if there's no need for variable interpolation but requiring a long, long
formatte
On Sun, 19 Dec 2004 21:29:27 +0100, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote:
>Mike Meyer wrote:
>
>> Personally, I'd love a language feature that let you create a function
>> that didn't evaluate arguments until they were actually used - lazy
>> evaluation. That lets you write the C ?: operator
I have to say i'm really impressed at that fledgling progject choe, the
only problem i could see is that it seemed to have problems connecting
to the database everytime. I think pybbs is a wonderful idea and a
great think to give back to the commnity. I will keep checking on your
sites for future
On Sun, 19 Dec 2004 20:59:43 +0100, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote:
>Walter S. Leipold wrote:
>
>> I think that Charlie's point is that, when you use "def ", you have
>> polluting your namespace. The whole program becomes harder to
>> understand because you can't ignore anywhere, eve
On Sun, 19 Dec 2004 23:12:27 -0500, Adam DePrince <[EMAIL PROTECTED]> wrote:
> [snip]
>
> Of course, to take advantage of this requires that writev be exposed. I
> have an implementation of writev. This implementation is reasonably
> smart, it "unrolls" only so as many iteration.next calls as ne
Raymond Hettinger wrote:
> [Rahul].
> > I want to compute dot product of two vectors stored as lists a and
b.a
> > and b are of the same length.
> >
> > one simple way is
> > sum(a[i]*b[i] for i in range(len(a)))
> >
> > another simple way is
> > ans=0.0
> > for i in range(len(a)):
> > ans=ans+a[i
I'm trying to prototype an application which runs multiple python
scripts, each in its own interpreter and OS thread. I've not been able
to forceable stop a script which does not respond to a request to stop.
My thought was to simply call:
PyThreadState_Clear(xxx);
PyThreadState_Delete(xxx); //
Doug Holton wrote:
Fredrik Lundh wrote:
well, since I'm not in the ego-stroking business, what if I promise
never to reply to posts by you, robert, and alex?
That's not fair to the rest of us though :)
That's not even fair to the non-rest of us. =) As I noted, "his answers
... are often very ins
Hi,
I'm a newbie (oh no I can here you say another one...)
How can I get Python to send emails using the default windows email
client (eg outlook express)?
I thought I could just do the following
import win32com.client
s = win32com.client.Dispatch('CDO.Message')
s.From = "[EMAIL PROTECTED]"
Adam DePrince wrote:
Many other programmers have faced a similar issue; cStringIO,
''.join([mydata]), map( file.write, [mydata]) are but some attempts at
making this process more efficient by jamming the components to be
written into a sequence.
I'm obviously misunderstanding something because I ca
> "ian" == ian <[EMAIL PROTECTED]> writes:
> import win32com.client
> s = win32com.client.Dispatch('CDO.Message')
> s.From = "[EMAIL PROTECTED]"
> s.To = "[EMAIL PROTECTED]"
> s.Subject = "The subject"
> s.Send
> ... but nothing happens.
> What am I doing wrong? Does anyone have some sampl
On 19 Dec 2004 03:04:15 -0800, "Rahul" <[EMAIL PROTECTED]> wrote:
>HI.
>I want to compute dot product of two vectors stored as lists a and b.a
>and b are of the same length.
>
>one simple way is
>sum(a[i]*b[i] for i in range(len(a)))
>
>another simple way is
>ans=0.0
>for i in range(len(a)):
>ans=
On Sun, 2004-12-19 at 23:43, Jp Calderone wrote:
> On Sun, 19 Dec 2004 23:12:27 -0500, Adam DePrince <[EMAIL PROTECTED]> wrote:
> > [snip]
[snip]
to free the memory, of course.
>
> The support of iterators is a cool idea, but I'm not sure
> it is actually useful. Consider the case where not
I call it "DBITM" or database internal text messaging.
For a free writing of this, send email to:
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
Hi Ganesan
I tried changing s.Send to s.Send(). It now comes up with an exception
error..
The details are below.
Ian
Traceback (most recent call last):
File
"C:\Python23\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py",
line 307, in RunScript
debugger.run(codeObject, __main__.__dict__
Nick Craig-Wood wrote:
>Jim Hill <[EMAIL PROTECTED]> wrote:
>> Is there a way to produce a very long multiline string of output with
>> variables' values inserted without having to resort to this wacky
>> """v = %s"""%(variable)
>I prefer this
>
> ... I'll have %(amount)s %(what)s
> ... f
Fredrik Lundh wrote:
>Scott David Daniels wrote:
>
>> And if you enjoy building insecure stuff, try:
>>
>> def fix(text, globals_=None, locals=None, quote='"'):
>> d = (globals_ or locals or globals()).copy()
>> source = text.split(quote)
>> source[1::2] = (str(eval(expr
Keith Dart wrote:
>Jim Hill wrote:
>> Is there a way to produce a very long multiline string of output with
>> variables' values inserted without having to resort to this wacky
>
>I was thinking about this. But I can't think of any reason why you would
>want to do this in Python. What's wrong wit
John Roth wrote:
[Here docs]
>I'm not sure why you'd want to do this, though.
>It seems like it would be mostly useful in a style
>of programming that's quite foreign to the way
>Python wants to be programmed.
I'm going to try some of the suggestions that others have floated but I
think you've re
On Mon, 2004-12-20 at 00:30, Steven Bethard wrote:
> Adam DePrince wrote:
> > Many other programmers have faced a similar issue; cStringIO,
> > ''.join([mydata]), map( file.write, [mydata]) are but some attempts at
> > making this process more efficient by jamming the components to be
> > written i
Steven Bethard wrote:
Doug Holton wrote:
Fredrik Lundh wrote:
well, since I'm not in the ego-stroking business, what if I promise
never to reply to posts by you, robert, and alex?
That's not fair to the rest of us though :)
That's not even fair to the non-rest of us. =) As I noted, "his answers
"banaticus" <[EMAIL PROTECTED]> wrote:
> What does this error message mean? What can I do to fix it?
it usually means what it says... (read on)
> Here'e the command that I just tried running, and the messages that
> I received. I just barely unpacked python.
>
> linux:/Python-2.4 # ./configure
Jim Hill wrote:
>>And if you prefer not to type so much:
>>
>>def I(*args): return "".join(map(str, args))
>>def F(v, fmt): return ("%" + fmt) % v
>
> Not that I don't appreciate the suggestions from masters of the Python
> universe, but the reason I'm switching to Python from Perl is for the
> re
Bengt Richter wrote:
>>Ahem. If you name the function, you can reuse the name (or just forget about
>>it)
>>as soon as you've used the function object.
>>
>>If you don't want to reuse the name because you might want to reuse the
>>function
>>object, you have to name it anyway.
>>
> Are you forg
<[EMAIL PROTECTED]> wrote:
> I tried changing s.Send to s.Send(). It now comes up with an exception
> error..
> com_error: (-2147352567, 'Exception occurred.', (0, None, 'The server
> rejected one or more recipient addresses. The server response was: 554
> <[EMAIL PROTECTED]>: Relay access denied
My wxPython program starts execution in mainFrame.py like this
[...]
class MainApp(wxApp):
def OnInit(self):
self.mainFrame = MainFrame(None)
self.mainFrame.Show()
self.SetTopWindow(self.mainFram
Adam DePrince wrote:
file.writelines( seq ) and map( file.write, seq ) are the same; the
former is syntactic sugar for the later.
Well, that's not exactly true. For one thing, map(file.write, seq)
returns a list of Nones, while file.writelines returns only the single
None that Python functions w
Withing a module I can assign a value to a global var by assigning to
it in the outermost scope. Fine.
But how can I do this if the attribute name itself is kept in a
variable. Once the module is loaded I can access the module's
namespace no problem, but inside the module the dictionary is not yet
Thanks Fredrik,
That was my first impression too.
But all I want to do is use Python to instruct Outlook Express to send
an email.
That way the user would not have to do any setting up etc of the mail
server properties etc and Outlook Express will magage all the
connection side of things.
I have
Doug Holton wrote:
He was only acknowledging the problem to those 3 people who complained
about it. I was making the point that others do not like being trolled
either.
Ahh, gotcha. Read your comment with the right intonation this time. =)
Steve
--
http://mail.python.org/mailman/listinfo/python
Jim Hill wrote:
> I'm trying to write a script that writes a script for a rather specialized
> task. I know that seems weird, but the original version was written in
> Korn shell and most of my team are familiar with the way it does things
> even though they don't read Korn.
so why didn't you te
[EMAIL PROTECTED] wrote:
Hi Ganesan
I tried changing s.Send to s.Send(). It now comes up with an exception
error..
The details are below.
Looks like the COM part works, but sending mail has an error from the
SMTP host. But, slightly off topic, FYI, Python can send email directly
with the email an
Martin Drautzburg wrote:
IOW how can I write something like
# xxx.py
for varName in ("foo", "bar"):
magic.varName = 1
I think you want to use the dict returned by globals(). Modifying this
dict can add/remove names from the global scope.[1]
>>> foo
Traceback (most recent call last):
Fi
[EMAIL PROTECTED] wrote:
Thanks Fredrik,
That was my first impression too.
But all I want to do is use Python to instruct Outlook Express to send
an email.
Which you did! From the look of the traceback.
But your mailserver is configured in such a way that you cannot send
mail from your machine us
Martin Drautzburg wrote:
> My wxPython program starts execution in mainFrame.py like this
>[...]
>class MainApp(wxApp):
>def OnInit(self):
>self.mainFrame = MainFrame(None)
>self.mainFrame.Show()
>
Fredrik Lundh wrote:
Jim Hill wrote:
I'm trying to write a script that writes a script for a rather specialized
task. I know that seems weird, but the original version was written in
Korn shell and most of my team are familiar with the way it does things
even though they don't read Korn.
so why
<[EMAIL PROTECTED]> wrote:
> But all I want to do is use Python to instruct Outlook Express to send
> an email.
and you succeeded -- the error message you saw came from the mail server, not
outlook itself. your problem is that the server didn't like the mail you sent;
checking
the server config
Hi Keith
Thanks for your reply.
I am aware of the smtplib module and it works very well! (refer script
below)
The problem is that I have a developed a freeware application called
Kirby Alarm And Task Scheduler (see www.kirbyfooty.com).
The program can pop up a note, run a program, play a sound, o
101 - 167 of 167 matches
Mail list logo