arizona_utc_offset = -7.00
h = (time.time() / 3600 + arizona_utc_offset) % 24
dt.timetuple() is the day of the week; struct tm_time doesn't
include a sub-second field.
On Jan 10, 10:28?am, "W. eWatson" wrote:
Maybe there's a more elegant way to do this. I want to express the
result of datetime.datetime.now() in fractional hours.
Here's one way.
xtup = dt.timetuple()
h = xtup+xtup/60.0+xtup/3600.00+xtup/10**6
# ?now is in fractions of an hour
From Dave Mon Jan 11 05:16:03 2010
From: Dave (Dave)
Date: Sun, 10 Jan 2010 22:16:03 -0600
Subject: interactive terminal in Ubuntu Linux : libreadline5-dev works
only in Python 2.6 not 3.1
References: <[email protected]
Message-ID: <[email protected]
On Sat, 9 Jan 2010 16:48:52 -0800 (PST), casevh wrote:
On Jan 9, 3:10?pm, pdlem... at earthlink.net wrote:
On Sat, 9 Jan 2010 13:27:07 -0800 (PST), casevh <cas... at gmail.com>
1) Try the commands again. Make sure all the "./configure" options are
on one line. Make sure to do "sudo make altinstall". (Don't use "sudo
make install"; it will give your version of Python the name "python"
and that can cause confusion on your system.)
2) Move your applications to another directory.
3) Try running "python3.1" while you are in that directory.
If this doesn't work, report back on the error messages you receive.
Thanks casevh for your time & patience.
The ./configure . . . was a "continuous" line , although it ran over to
next line even on 132 char wide terminal because of names of system &
dir. I was careful with the spaces and hyphens.
In my reply the "make install" was a typo , I did run make altinstall.
Moved all my code to pycode dir on my home directory. Removed all
files from /usr/local/lib/python3.1/dlmodules and removed that dir.
Twice ran the recompile :
./configure --prefix=/usr/local --with-computed-gotos
<^ one space>
sudo make altinstall
After each reinstall had same problems : cannot import random or
any code using it, although random.py is in Lib :
File "<stdin>", line 1, in <module>
File "random.py", line 46, in <module>
import collections as _collections
File "collections.py", line 9 in <module>
from _collections import deque, default dict
undefined symbol: PyUnicodeUCS4_FromString
After second reinstall today I also found that a module importing
"time" would not run. Likewise could not import time at >>> .
Same error, ending : undefined symbol: PyUnicode UCS4_FromString
And my original problem still there : fouled up keys in interactive
terminal. Seems minor now ; ) Should I try to remove everything
and reopen the tarball ?
Dave WB3DWE, central Texas