Re: How to format datetime values

2006-06-01 Thread Paul Osman
On 1-Jun-06, at 2:55 PM, A.M wrote:

> Hi,
>
>
>
> I have a datetime value and want to format it to "June 1, 2006"  
> shape. How
> can I do that?
>
>
>
> Thank you,
>
> Alan

Why don't you just post the specs to your program and maybe someone  
will write it *FOR* you in less than a day?

This is quicker than waiting for replies:

Python Tutorial
http://docs.python.org/tut/tut.html

Module Index
http://docs.python.org/modindex.html

Cheers,

-- 
Paul Osman
http://www.eval.ca
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python or Ajax?

2006-06-09 Thread Paul Osman
On 9-Jun-06, at 4:00 PM, Redefined Horizons wrote:

> I've been hearing a ot about AJAX lately. I may have to build a web
> application in the near future, and I was curoius:
>
> How does a web application that uses Python compare with one that  
> uses AJAX?
>
> I've done some basic web page design with HTML and CSS, but never any
> web applications. I don't want to learn a new language if I can use
> Python. Would AJAX offer me any significant advantages?
>
> Thanks,
>
> Scott Huey

Apples and Oranges my friend :) You may want to browse through the  
following:

http://en.wikipedia.org/wiki/AJAX

A nice toolkit for such things:
http://mochikit.com/

Which is conveniently used in a Python framework called Turbogears:
http://www.turbogears.org/

Hope that helps clear things up.

Cheers,

--
Paul Osman
http://www.eval.ca
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Install

2006-05-18 Thread Paul Osman
On 18-May-06, at 10:30 AM, D wrote:

> I'm sure this is an easy question for most here, but it's throwing me
> for a loop at the moment - I need to upgrade RHEL 3 with the latest
> version of Python.  I downloaded the source and installed, but we're
> still having problems (i.e. some Python apps don't work, Add/Remove
> Applications console errors out and doesn't open, etc.).  My guess is
> that it's using old libraries or otherwise conflicting with the old
> Python version, but I'm not sure how to remove the original version.
> Any help would be greatly appreciated!

RHEL uses python for distro specific tools pretty extensively iirc.  
I'd stay away from source installs and stick to rpms / yum /  
up2date / whatever RH uses these days.

Cheers,

Paul Osman
http://www.eval.ca
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: simple print is not working..

2006-05-24 Thread Paul Osman
On 24-May-06, at 3:41 PM, [EMAIL PROTECTED] wrote:

> What is wrong with this script?
>
> #!/usr/bin/python
> fsfile = open('/tmp/fs_info.al', 'r')
> for line in fsfiles.readlines():
> print line
> fsfile.close()
>
>
> #./get_fs_info.py
>   File "./get_fs_info.py", line 4
> print line
> ^
> SyntaxError: invalid syntax
>
>
> Any ideas?
>
> Thanks
> AL

Well first, you have to indent properly :) Assuming you did that and  
the copy & paste just removed it, you're also creating a variable  
called fsfile, then trying to call the readlines() method on an  
object called fsfiles... that'll cause a problem.

Cheers,

--
Paul Osman
http://www.eval.ca
-- 
http://mail.python.org/mailman/listinfo/python-list