Re: different time tuple format

2005-06-07 Thread Rick Holbert
Like the last poster said, use %Z. On my Mandriva Linux system I get the following results: >>> time.localtime() (2005, 6, 7, 15, 7, 12, 1, 158, 1) >>> time.strptime("2005-06-07 15:07:12 EDT", "%Y-%m-%d %H:%M:%S %Z") (2005, 6, 7, 15, 7, 12, 1, 158, 1) Rick Maksim Kasimov wrote: > hi all, sorry

Re: Put a file on an ftp server over ssl

2005-05-11 Thread Rick Holbert
Have a look at Putty's pscp and PySCP... http://www.chiark.greenend.org.uk/~sgtatham/putty/ http://py.vaults.ca/apyllo.py/990075885.195097684.69935243 Rick Lars wrote: > Daniel, > > Why don't you just use the 'sftp' command line program, it's available > for all unixes and I bet you can find a

Re: pulling info from website

2005-01-10 Thread Rick Holbert
Bob, Have a look at feedparser: http://www.feedparser.org/ http://diveintomark.org/projects/feed_parser/ For bbc news feeds, I use the following url: http://www.bbc.co.uk/syndication/feeds/news/ukfs_news/front_page/rss091.xml bob wrote: > i am trying to write a script for Xbox media center th

Re: % operation

2005-01-05 Thread Rick Holbert
It also looks like you are using an old version of Python running on an old version of Linux. Time to upgrade? Christopher Koppler wrote: > On Wed, 05 Jan 2005 15:36:30 +0900, Daewon YOON wrote: > >> >> Python 1.5.2 (#1, Jul 5 2001, 03:02:19) [GCC 2.96 2731 (Red Hat >> Linux 7.1 2 on

Re: jython and swing

2004-12-09 Thread Rick Holbert
Could it have something to do with your PATH or CLASSPATH settings? Here's a test script that works for me: #!/usr/bin/env jython from java import lang from javax import swing print "lang attributes: " for attr in dir(lang): print "\t%s" % attr print print "swing attributes: " for attr i

Re: date diff calc

2004-11-29 Thread Rick Holbert
Here's how to do it as a one-liner: python -c "import datetime; import time; print 'Only %d days until Christmas' % (datetime.date(2004, 12, 25) - datetime.date.fromtimestamp(time.time())).days" Here's a slightly shorter way of doing it: python -c "import time; print 'Only %f more days until Ch