~ubuntu-branches/ubuntu/feisty/pyblosxom/feisty

« back to all changes in this revision

Viewing changes to contrib/editfile.py

  • Committer: Bazaar Package Importer
  • Author(s): Charles Majola
  • Date: 2005-02-21 14:38:10 UTC
  • mfrom: (1.1.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20050221143810-c1r07ibzr5hr863u
Tags: 1.0.0-2ubuntu1
* Rebuild for python2.4
* Fixed patches also 2.3 -> 2.4 
* Standards Version 3.6.1.1 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python2
 
1
#!/usr/bin/env python
2
2
# vim: shiftwidth=4 tabstop=4 expandtab
3
3
"""
4
4
This utility can be used to update a file entry while keeping the
13
13
from os import environ
14
14
EDITOR=environ.get('VISUAL')
15
15
 
16
 
from os import stat, path, system, utime
 
16
from os import stat, path, spawnl, utime, P_WAIT
17
17
import sys, time
18
18
 
19
19
if len(sys.argv) > 1:
34
34
 
35
35
atime, mtime = filestats[7:9]
36
36
 
37
 
system('%s %s' % (EDITOR, filename))
 
37
spawnl(P_WAIT, EDITOR, EDITOR, filename)
38
38
 
39
39
print "Setting back the time"
40
40
try: