我想使用的strftime()以微秒级精度,这似乎可以使用%F(为说明这里).但是,当我尝试以下代码时:
import time
import strftime from time
print strftime("%H:%M:%S.%f")
Run Code Online (Sandbox Code Playgroud)
...我得到小时,分钟和秒,但%f打印为%f,没有微秒的迹象.我在Ubuntu上运行Python 2.6.5,所以应该没问题,应该支持%f(据我所知,它支持2.6及以上版本.)