file « date « Python Data Type Q&A

Home
Python Data Type Q&A
1.array
2.date
3.dictionary
4.Format
5.integer
6.List
7.numpy
8.regex
9.string
10.tuple
Python Data Type Q&A » date » file 

1. How do I get the modified date/time of a file in Python?    stackoverflow.com

How do I get the modified date/time of a file in Python?

2. Python - change file creation date    stackoverflow.com

Can I change creation date of some file using Python in Linux?

3. Windows file creation date/time using python    stackoverflow.com

I need to get a file creation date&time using python. I tried:

os.stat(r"path")[ST_CTIME]
But it is returning:
1263538277
This is not the creation date time. Is there a way to do it?

4. How do I create a script that appends the file create date to filename using python?    stackoverflow.com

I would like to create a python script that appends the file created date to the end of the filename while retaining the oringinal file name ("Report") for a batch of pdf ...

5. Python Date Modified Wrong For Some Files    stackoverflow.com

Python 3.1.2
Windows XP SP3 I am running into a problem with some files and their timestamps in python. I have a bunch of files in a directory that I received ...

7. Reading a file and changing the input to a date    stackoverflow.com

Ok so I have a "holiday.txt" file that I intend to have Python read. In it, I want to have lines that say such things as:

11/24/11
11/25/11
12/25/11
12/31/11
1/1/12
5/28/12
7/4/12
9/3/12
etc. These are the holidays for ...

9. Python build date file    python-forum.org

I am curious if there is an IDE for python that will create a build file every time a complete build is done, hopefully something I can sync up with a SVN automatically or manually through tortoise. Basically I just want a file with date and time for every build, I have been looking through Eclipse and pydev if there are ...

10. unable to write date to file    python-forum.org

>>>import datetime >>>file=open('mkbackup.log', 'w') >>>file.write(datetime.date.today()) TypeError: argument 1 must be string or read-only character buffer, not datetime.date i got the above error in posting 'date' to the output file. also, date.today() works in a print statement. but it fails to print it to the file when i redirect the file to stdout. i noted that the compiler did not like like ...

11. Missing dates in a text file    python-forum.org

Missing dates in a text file by zeumann Mon Mar 15, 2010 8:11 am I have a text file with dates in a column and corresponding values. Something like: Code: Select all 19720101 12 4.0 -2.6 73.0 19720102 12 1.0 -4.4 83.0 19720103 12 ...

13. file date modified    python-forum.org

import os import time filename = "test.txt" file_modified = os.path.getmtime(filename) # eg. 1124821002 = seconds since epoch 1/1/1970 00:00:00 time_tuple = time.localtime(file_modified) print time_tuple # eg. (2005, 8, 23, 11, 16, 42, ...

14. filename + current date and time    python-forum.org

I am sure this has been discussed before but if some one is kind enough to discuss it again i would really appreciate it. Oh, i'm trying to add current date and time to the CSV file name and its not working. Heres the code i wrote time_now = datetime.datetime.now() time_now = str(time_now) time_now = time_now[0:19] print time_now # open/create a ...

15. Get Date information from file properties    python-forum.org

Code: Select all import time,os def do_housekeep(path,daystodelete): ''' Simple function to go into a directory to delete files Input : path : Specify the full path of the directory to delete ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.