From d9c0aab0459a921ee83ede83146f1532195b18f2 Mon Sep 17 00:00:00 2001 From: Antonio de la Rosa Date: Thu, 25 Aug 2016 02:12:30 +0200 Subject: [PATCH] Massive change of python3 executable in files to env python3 --- paramecio/citoplasma/adminutils.py | 2 +- paramecio/citoplasma/check_i18n.py | 4 ++-- paramecio/citoplasma/filesize.py | 2 +- paramecio/citoplasma/filterip.py | 2 +- paramecio/citoplasma/gunicornssl.py | 2 +- paramecio/citoplasma/hierarchy_links.py | 2 +- paramecio/citoplasma/httputils.py | 2 +- paramecio/citoplasma/i18n.py | 2 +- paramecio/citoplasma/pages.py | 2 +- paramecio/citoplasma/sendmail.py | 2 +- paramecio/citoplasma/sessions.py | 2 +- paramecio/citoplasma/show_links.py | 2 +- paramecio/citoplasma/urls.py | 2 +- paramecio/console.py | 2 +- paramecio/create_module.py | 4 ++-- paramecio/cromosoma/coreforms.py | 2 +- paramecio/cromosoma/databases/mysql.py | 2 +- paramecio/cromosoma/databases/mysqldb.py | 2 +- paramecio/cromosoma/dbadmin.py | 4 ++-- paramecio/cromosoma/extrafields/i18nfield.py | 2 +- paramecio/cromosoma/extrafields/langfield.py | 2 +- paramecio/cromosoma/extrafields/parentfield.py | 2 +- paramecio/cromosoma/extrafields/slugifyfield.py | 2 +- paramecio/cromosoma/extraforms/dateform.py | 2 +- paramecio/cromosoma/extraforms/fileform.py | 2 +- paramecio/cromosoma/extraforms/i18nform.py | 2 +- paramecio/cromosoma/formsutils.py | 2 +- paramecio/cromosoma/usermodel.py | 2 +- paramecio/cromosoma/webmodel.py | 2 +- paramecio/i18n/admin.py | 2 +- paramecio/i18n/common.py | 2 +- paramecio/modules/admin/admin/ausers.py | 2 +- paramecio/modules/admin/index.py | 2 +- paramecio/modules/admin/models/admin.py | 2 +- paramecio/modules/welcome/ajax/index.py | 2 +- paramecio/modules/welcome/index.py | 2 +- paramecio/settings/config.py.sample | 2 +- paramecio/settings/config_admin.py.sample | 2 +- paramecio/settings/modules.py | 2 +- paramecio/settings/modules.py.admin | 2 +- setup.py | 2 +- 41 files changed, 44 insertions(+), 44 deletions(-) diff --git a/paramecio/citoplasma/adminutils.py b/paramecio/citoplasma/adminutils.py index 6bef5fb..477a41b 100644 --- a/paramecio/citoplasma/adminutils.py +++ b/paramecio/citoplasma/adminutils.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 from collections import OrderedDict from paramecio.citoplasma.sessions import get_session diff --git a/paramecio/citoplasma/check_i18n.py b/paramecio/citoplasma/check_i18n.py index ad0625c..790fe1a 100644 --- a/paramecio/citoplasma/check_i18n.py +++ b/paramecio/citoplasma/check_i18n.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 import argparse import os @@ -84,7 +84,7 @@ def start(): pass - file_lang="#!/usr/bin/python3\n\n" + file_lang="#!/usr/bin/env python3\n\n" file_lang+="from paramecio.citoplasma.i18n import I18n\n\n" diff --git a/paramecio/citoplasma/filesize.py b/paramecio/citoplasma/filesize.py index ebd4b5c..bf2faf2 100644 --- a/paramecio/citoplasma/filesize.py +++ b/paramecio/citoplasma/filesize.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # Code based in http://stackoverflow.com/questions/5194057/better-way-to-convert-file-sizes-in-python diff --git a/paramecio/citoplasma/filterip.py b/paramecio/citoplasma/filterip.py index d820df6..4eab10c 100644 --- a/paramecio/citoplasma/filterip.py +++ b/paramecio/citoplasma/filterip.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # A simple utility for filter ips. Only use this if you don't use a server with blocking ips system diff --git a/paramecio/citoplasma/gunicornssl.py b/paramecio/citoplasma/gunicornssl.py index 40f50de..9cb3140 100644 --- a/paramecio/citoplasma/gunicornssl.py +++ b/paramecio/citoplasma/gunicornssl.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # This module is suitable for create ssl apis that don't need much performance, if you need more performance use nginx or apache proxiying for generate https content and Paramecio with gunicorn or others wsgi servers for generate the html/json content. diff --git a/paramecio/citoplasma/hierarchy_links.py b/paramecio/citoplasma/hierarchy_links.py index 06490c3..cad30c1 100644 --- a/paramecio/citoplasma/hierarchy_links.py +++ b/paramecio/citoplasma/hierarchy_links.py @@ -1,4 +1,4 @@ -#/usr/bin/python3 +#/usr/bin/env python3 from paramecio.citoplasma.urls import add_get_parameters diff --git a/paramecio/citoplasma/httputils.py b/paramecio/citoplasma/httputils.py index 7a9422d..fc8a110 100644 --- a/paramecio/citoplasma/httputils.py +++ b/paramecio/citoplasma/httputils.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 import json, re from bottle import request, response diff --git a/paramecio/citoplasma/i18n.py b/paramecio/citoplasma/i18n.py index 446029f..ed559e8 100644 --- a/paramecio/citoplasma/i18n.py +++ b/paramecio/citoplasma/i18n.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 from importlib import import_module from paramecio.citoplasma.sessions import get_session diff --git a/paramecio/citoplasma/pages.py b/paramecio/citoplasma/pages.py index 9411c9b..2b18f20 100644 --- a/paramecio/citoplasma/pages.py +++ b/paramecio/citoplasma/pages.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 from math import ceil, floor from paramecio.citoplasma.urls import add_get_parameters diff --git a/paramecio/citoplasma/sendmail.py b/paramecio/citoplasma/sendmail.py index 8618c1f..60e832b 100644 --- a/paramecio/citoplasma/sendmail.py +++ b/paramecio/citoplasma/sendmail.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 import os import smtplib import mimetypes diff --git a/paramecio/citoplasma/sessions.py b/paramecio/citoplasma/sessions.py index 5b01b68..e14c6d0 100644 --- a/paramecio/citoplasma/sessions.py +++ b/paramecio/citoplasma/sessions.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 from itsdangerous import JSONWebSignatureSerializer from paramecio.citoplasma.keyutils import create_key_encrypt, create_key_encrypt_256, create_key diff --git a/paramecio/citoplasma/show_links.py b/paramecio/citoplasma/show_links.py index 32588b1..4527368 100644 --- a/paramecio/citoplasma/show_links.py +++ b/paramecio/citoplasma/show_links.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 def show_links(switch, arr_links): diff --git a/paramecio/citoplasma/urls.py b/paramecio/citoplasma/urls.py index 16bed9a..014c27d 100644 --- a/paramecio/citoplasma/urls.py +++ b/paramecio/citoplasma/urls.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 from settings import config from bottle import request, response, HTTPResponse diff --git a/paramecio/console.py b/paramecio/console.py index 90e5595..f74778c 100644 --- a/paramecio/console.py +++ b/paramecio/console.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 import argparse import os diff --git a/paramecio/create_module.py b/paramecio/create_module.py index 1bca0d0..a58160f 100644 --- a/paramecio/create_module.py +++ b/paramecio/create_module.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 import traceback import argparse @@ -53,7 +53,7 @@ def regenerate_modules_config(): modules=[] - modules.append("#!/usr/bin/python3\n\n") + modules.append("#!/usr/bin/env python3\n\n") modules.append("list_modules=[]\n\n") for module in config.modules: diff --git a/paramecio/cromosoma/coreforms.py b/paramecio/cromosoma/coreforms.py index 890980f..8287a76 100644 --- a/paramecio/cromosoma/coreforms.py +++ b/paramecio/cromosoma/coreforms.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 from collections import OrderedDict diff --git a/paramecio/cromosoma/databases/mysql.py b/paramecio/cromosoma/databases/mysql.py index d2ee519..7ea17f2 100644 --- a/paramecio/cromosoma/databases/mysql.py +++ b/paramecio/cromosoma/databases/mysql.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 import sys import pymysql diff --git a/paramecio/cromosoma/databases/mysqldb.py b/paramecio/cromosoma/databases/mysqldb.py index 8634517..323dd77 100644 --- a/paramecio/cromosoma/databases/mysqldb.py +++ b/paramecio/cromosoma/databases/mysqldb.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 import sys import MySQLdb.cursors diff --git a/paramecio/cromosoma/dbadmin.py b/paramecio/cromosoma/dbadmin.py index 1a1f4dc..b5b0cbc 100644 --- a/paramecio/cromosoma/dbadmin.py +++ b/paramecio/cromosoma/dbadmin.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 import argparse import os,traceback @@ -353,7 +353,7 @@ def create_backup(original_file_path, file_path): if not p.is_dir(): p.mkdir(0o755, True) with open(path+'/__init__.py', 'w') as f: - f.write("#!/usr/bin/python3\n") + f.write("#!/usr/bin/env python3\n") #Create path diff --git a/paramecio/cromosoma/extrafields/i18nfield.py b/paramecio/cromosoma/extrafields/i18nfield.py index bd4544f..5e88326 100644 --- a/paramecio/cromosoma/extrafields/i18nfield.py +++ b/paramecio/cromosoma/extrafields/i18nfield.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 import json from paramecio.cromosoma.webmodel import PhangoField diff --git a/paramecio/cromosoma/extrafields/langfield.py b/paramecio/cromosoma/extrafields/langfield.py index c67469c..db8d5e5 100644 --- a/paramecio/cromosoma/extrafields/langfield.py +++ b/paramecio/cromosoma/extrafields/langfield.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 from paramecio.cromosoma.corefields import CharField from paramecio.cromosoma import coreforms diff --git a/paramecio/cromosoma/extrafields/parentfield.py b/paramecio/cromosoma/extrafields/parentfield.py index 07f5141..464517b 100644 --- a/paramecio/cromosoma/extrafields/parentfield.py +++ b/paramecio/cromosoma/extrafields/parentfield.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 #from paramecio.cromosoma.webmodel import PhangoField from paramecio.cromosoma.corefields import IntegerField diff --git a/paramecio/cromosoma/extrafields/slugifyfield.py b/paramecio/cromosoma/extrafields/slugifyfield.py index 392115f..3086450 100644 --- a/paramecio/cromosoma/extrafields/slugifyfield.py +++ b/paramecio/cromosoma/extrafields/slugifyfield.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 from paramecio.cromosoma.corefields import CharField from paramecio.citoplasma.slugify import slugify diff --git a/paramecio/cromosoma/extraforms/dateform.py b/paramecio/cromosoma/extraforms/dateform.py index 2f90ec0..07109db 100644 --- a/paramecio/cromosoma/extraforms/dateform.py +++ b/paramecio/cromosoma/extraforms/dateform.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 from paramecio.cromosoma.coreforms import BaseForm from paramecio.citoplasma.mtemplates import standard_t diff --git a/paramecio/cromosoma/extraforms/fileform.py b/paramecio/cromosoma/extraforms/fileform.py index 944886c..0ecbddf 100644 --- a/paramecio/cromosoma/extraforms/fileform.py +++ b/paramecio/cromosoma/extraforms/fileform.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 from paramecio.cromosoma.coreforms import BaseForm diff --git a/paramecio/cromosoma/extraforms/i18nform.py b/paramecio/cromosoma/extraforms/i18nform.py index 76b3d79..ae0e60b 100644 --- a/paramecio/cromosoma/extraforms/i18nform.py +++ b/paramecio/cromosoma/extraforms/i18nform.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 from paramecio.cromosoma.coreforms import BaseForm from paramecio.citoplasma.i18n import I18n diff --git a/paramecio/cromosoma/formsutils.py b/paramecio/cromosoma/formsutils.py index 217f75e..d8161aa 100644 --- a/paramecio/cromosoma/formsutils.py +++ b/paramecio/cromosoma/formsutils.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 from paramecio.cromosoma import corefields from paramecio.cromosoma.coreforms import PasswordForm diff --git a/paramecio/cromosoma/usermodel.py b/paramecio/cromosoma/usermodel.py index a038a50..85b6fab 100644 --- a/paramecio/cromosoma/usermodel.py +++ b/paramecio/cromosoma/usermodel.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 from paramecio.cromosoma.webmodel import WebModel from paramecio.cromosoma.coreforms import PasswordForm diff --git a/paramecio/cromosoma/webmodel.py b/paramecio/cromosoma/webmodel.py index c2815c7..58ef3a3 100644 --- a/paramecio/cromosoma/webmodel.py +++ b/paramecio/cromosoma/webmodel.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 import sys import re diff --git a/paramecio/i18n/admin.py b/paramecio/i18n/admin.py index 2ac135c..fdd8b40 100644 --- a/paramecio/i18n/admin.py +++ b/paramecio/i18n/admin.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 from paramecio.citoplasma.i18n import I18n diff --git a/paramecio/i18n/common.py b/paramecio/i18n/common.py index 4442770..0d33dd9 100644 --- a/paramecio/i18n/common.py +++ b/paramecio/i18n/common.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 from paramecio.citoplasma.i18n import I18n diff --git a/paramecio/modules/admin/admin/ausers.py b/paramecio/modules/admin/admin/ausers.py index b4b76c9..5966ac1 100644 --- a/paramecio/modules/admin/admin/ausers.py +++ b/paramecio/modules/admin/admin/ausers.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 from paramecio.modules.admin.models.admin import UserAdmin from paramecio.citoplasma.urls import make_url diff --git a/paramecio/modules/admin/index.py b/paramecio/modules/admin/index.py index 655a38c..2b54779 100644 --- a/paramecio/modules/admin/index.py +++ b/paramecio/modules/admin/index.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 import traceback, sys from paramecio.citoplasma.mtemplates import env_theme, PTemplate diff --git a/paramecio/modules/admin/models/admin.py b/paramecio/modules/admin/models/admin.py index a1c799d..f2b6805 100644 --- a/paramecio/modules/admin/models/admin.py +++ b/paramecio/modules/admin/models/admin.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 from paramecio.citoplasma.i18n import I18n from paramecio.cromosoma.webmodel import WebModel diff --git a/paramecio/modules/welcome/ajax/index.py b/paramecio/modules/welcome/ajax/index.py index 946b763..65b9898 100644 --- a/paramecio/modules/welcome/ajax/index.py +++ b/paramecio/modules/welcome/ajax/index.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 def home(request, **args): diff --git a/paramecio/modules/welcome/index.py b/paramecio/modules/welcome/index.py index f5379cb..21a00f1 100644 --- a/paramecio/modules/welcome/index.py +++ b/paramecio/modules/welcome/index.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 from paramecio.citoplasma.mtemplates import PTemplate, env_theme from paramecio.citoplasma.urls import make_url diff --git a/paramecio/settings/config.py.sample b/paramecio/settings/config.py.sample index 1d2c53b..f9941eb 100644 --- a/paramecio/settings/config.py.sample +++ b/paramecio/settings/config.py.sample @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # You need install cromosoma for use this. diff --git a/paramecio/settings/config_admin.py.sample b/paramecio/settings/config_admin.py.sample index 4a8336b..eabd8d8 100644 --- a/paramecio/settings/config_admin.py.sample +++ b/paramecio/settings/config_admin.py.sample @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 from paramecio.citoplasma.i18n import I18n diff --git a/paramecio/settings/modules.py b/paramecio/settings/modules.py index 797b155..964fe38 100644 --- a/paramecio/settings/modules.py +++ b/paramecio/settings/modules.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 list_modules=[] diff --git a/paramecio/settings/modules.py.admin b/paramecio/settings/modules.py.admin index 692c091..e83aa99 100644 --- a/paramecio/settings/modules.py.admin +++ b/paramecio/settings/modules.py.admin @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 list_modules=[] diff --git a/setup.py b/setup.py index aa767d8..e99a2c4 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 import sys import os