summaryrefslogtreecommitdiff
path: root/django/core
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-04-28 18:02:01 +0200
committerClaude Paroz <claude@2xlibre.net>2012-04-30 20:45:03 +0200
commit596cb9c7e287abbb98c64974fb4944d522cb6b5a (patch)
treee8ad5402dd233458b392d1822146bb1102ba74a6 /django/core
parentfe43ad5707d116bb1729bc17a24ca16c90ae040d (diff)
Replaced print statement by print function (forward compatibility syntax).
Diffstat (limited to 'django/core')
-rw-r--r--django/core/management/__init__.py4
-rw-r--r--django/core/management/sql.py2
-rw-r--r--django/core/servers/fastcgi.py16
3 files changed, 11 insertions, 11 deletions
diff --git a/django/core/management/__init__.py b/django/core/management/__init__.py
index 840a3b74df..b4e82e454f 100644
--- a/django/core/management/__init__.py
+++ b/django/core/management/__init__.py
@@ -299,7 +299,7 @@ class ManagementUtility(object):
# subcommand
if cword == 1:
- print ' '.join(sorted(filter(lambda x: x.startswith(curr), subcommands)))
+ print(' '.join(sorted(filter(lambda x: x.startswith(curr), subcommands))))
# subcommand options
# special case: the 'help' subcommand has no options
elif cwords[0] in subcommands and cwords[0] != 'help':
@@ -333,7 +333,7 @@ class ManagementUtility(object):
# append '=' to options which require args
if option[1]:
opt_label += '='
- print opt_label
+ print(opt_label)
sys.exit(1)
def execute(self):
diff --git a/django/core/management/sql.py b/django/core/management/sql.py
index 68c72b3487..83c17d9731 100644
--- a/django/core/management/sql.py
+++ b/django/core/management/sql.py
@@ -173,7 +173,7 @@ def emit_post_sync_signal(created_models, verbosity, interactive, db):
for app in models.get_apps():
app_name = app.__name__.split('.')[-2]
if verbosity >= 2:
- print "Running post-sync handlers for application", app_name
+ print("Running post-sync handlers for application %s" % app_name)
models.signals.post_syncdb.send(sender=app, app=app,
created_models=created_models, verbosity=verbosity,
interactive=interactive, db=db)
diff --git a/django/core/servers/fastcgi.py b/django/core/servers/fastcgi.py
index 9c652a74ef..750bff7e9f 100644
--- a/django/core/servers/fastcgi.py
+++ b/django/core/servers/fastcgi.py
@@ -82,9 +82,9 @@ Examples:
""" % FASTCGI_OPTIONS
def fastcgi_help(message=None):
- print FASTCGI_HELP
+ print(FASTCGI_HELP)
if message:
- print message
+ print(message)
return False
def runfastcgi(argset=[], **kwargs):
@@ -103,11 +103,11 @@ def runfastcgi(argset=[], **kwargs):
try:
import flup
except ImportError as e:
- print >> sys.stderr, "ERROR: %s" % e
- print >> sys.stderr, " Unable to load the flup package. In order to run django"
- print >> sys.stderr, " as a FastCGI application, you will need to get flup from"
- print >> sys.stderr, " http://www.saddi.com/software/flup/ If you've already"
- print >> sys.stderr, " installed flup, then make sure you have it in your PYTHONPATH."
+ sys.stderr.write("ERROR: %s\n" % e)
+ sys.stderr.write(" Unable to load the flup package. In order to run django\n")
+ sys.stderr.write(" as a FastCGI application, you will need to get flup from\n")
+ sys.stderr.write(" http://www.saddi.com/software/flup/ If you've already\n")
+ sys.stderr.write(" installed flup, then make sure you have it in your PYTHONPATH.\n")
return False
flup_module = 'server.' + options['protocol']
@@ -136,7 +136,7 @@ def runfastcgi(argset=[], **kwargs):
module = importlib.import_module('.%s' % flup_module, 'flup')
WSGIServer = module.WSGIServer
except Exception:
- print "Can't import flup." + flup_module
+ print("Can't import flup." + flup_module)
return False
# Prep up and go