2.5 with_statement support!

This commit is contained in:
star:Kenneth Reitz
2011-03-24 05:06:23 -04:00
parent 6404b0e49c
commit bf7b5d0930
8 changed files with 14 additions and 4 deletions
+1
View File
@@ -9,6 +9,7 @@ This module contains the helper functions for dealing with unix pipes.
"""
from __future__ import absolute_import
from __future__ import with_statement
import sys
+1
View File
@@ -10,6 +10,7 @@ This module contains all the application resource features of clint.
from __future__ import absolute_import
from __future__ import with_statement
import errno
from os import remove, removedirs
+1 -3
View File
@@ -8,8 +8,6 @@ This module provides the text output helper system.
"""
from __future__ import absolute_import
from . import colored
from .core import *
from core import *
+2 -1
View File
@@ -9,6 +9,7 @@ Various Python helpers used within clint.
"""
from __future__ import absolute_import
from __future__ import with_statement
import sys
import errno
@@ -28,7 +29,7 @@ def mkdir_p(path):
"""Emulates `mkdir -p` behavior."""
try:
makedirs(path)
except OSError as exc: # Python >2.5
except OSError, exc: # Python >2.5
if exc.errno == errno.EEXIST:
pass
else:
+3
View File
@@ -1,6 +1,9 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import with_statement
import sys
import os
+2
View File
@@ -1,6 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import with_statement
import sys
import os
+2
View File
@@ -1,6 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import with_statement
import sys
import os
+2
View File
@@ -4,6 +4,8 @@
import sys
import os
from __future__ import with_statement
sys.path.insert(0, os.path.abspath('..'))
from clint import piped_in