Bonjour, nouveau défis : Packager une application métier nécessitant oracle 10g.
J'ai réussi avec des .bat à exécuter en silencieux l'install de oracle et des patch. Pour rendre plus propre mon paquet (qui exécute le bat dans la version actuelle) , je voudrai retranscrire ce code en python mais je me heurte au variable..
@ECHO OFF ECHO Oracle 10g R2 Client.. SET OPTIONS= SET OPTIONS=ORACLE_HOME=C:\oracle\ora1020 SET OPTIONS=%OPTIONS% ORACLE_HOME_NAME=ora1020 SET OPTIONS=%OPTIONS% TOPLEVEL_COMPONENT={"oracle.client","10.2.0.3.0"} SET OPTIONS=%OPTIONS% SHOW_SPLASH_SCREEN=false SET OPTIONS=%OPTIONS% SHOW_WELCOME_PAGE=false SET OPTIONS=%OPTIONS% SHOW_CUSTOM_TREE_PAGE=false SET OPTIONS=%OPTIONS% SHOW_SUMMARY_PAGE=false SET OPTIONS=%OPTIONS% SHOW_INSTALL_PROGRESS_PAGE=true SET OPTIONS=%OPTIONS% SHOW_CONFIG_TOOL_PAGE=false SET OPTIONS=%OPTIONS% SHOW_XML_PREREQ_PAGE=false SET OPTIONS=%OPTIONS% SHOW_ROOTSH_CONFIRMATION=false SET OPTIONS=%OPTIONS% SHOW_END_SESSION_PAGE=false SET OPTIONS=%OPTIONS% SHOW_EXIT_CONFIRMATION=false SET OPTIONS=%OPTIONS% NEXT_SESSION=false SET OPTIONS=%OPTIONS% NEXT_SESSION_ON_FAIL=false SET OPTIONS=%OPTIONS% COMPONENT_LANGUAGES={"en"} SET OPTIONS=%OPTIONS% INSTALL_TYPE="Custom" SET OPTIONS=%OPTIONS% oracle.client:DEPENDENCY_LIST={"oracle.winprod:10.2.0.3.0","oracle.sqlplus:10.2.0.3.0","oracle.network.client:10.2.0.3.0"} SET OPTIONS=%OPTIONS% oracle.winprod:DEPENDENCY_LIST={"oracle.odbc:10.2.0.3.0","oracle.ntoledb:10.2.0.3.0","oracle.ntoledb.odp_net:10.2.0.3.0"} SET OPTIONS=%OPTIONS% oracle.has.common:OPTIONAL_CONFIG_TOOLS="{}" SET OPTIONS=%OPTIONS% oracle.network.client:OPTIONAL_CONFIG_TOOLS="{}" START /WAIT %client%\install\oui.exe -silent %OPTIONS% -nowelcome -noconfig -waitforcompletion -force -nowait -noconsole
Les roi du Python, pouvez vous m'expliquer comment en faire un joli bout de code avec les variables.
Merci d'avance.
Cordialement.
Salut
Pour inclure des variables dans d'autre variable je fait comme ceci :
user = 'Simon' timevar = time.strftime('%d/%m/%y %H:%M:%S',time.localtime()) messageprint = 'Bonjour %s Il est actuellement %s ' % (user,timevar)
Simon
Le 04/09/2015 13:11, Didier Paulin a écrit :
Bonjour, nouveau défis : Packager une application métier nécessitant oracle 10g.
J'ai réussi avec des .bat à exécuter en silencieux l'install de oracle et des patch. Pour rendre plus propre mon paquet (qui exécute le bat dans la version actuelle) , je voudrai retranscrire ce code en python mais je me heurte au variable..
/@ECHO OFF/ /ECHO Oracle 10g R2 Client../ /SET OPTIONS=/ /SET OPTIONS=ORACLE_HOME=C:\oracle\ora1020/ /SET OPTIONS=%OPTIONS% ORACLE_HOME_NAME=ora1020/ /SET OPTIONS=%OPTIONS% TOPLEVEL_COMPONENT={"oracle.client","10.2.0.3.0"}/ /SET OPTIONS=%OPTIONS% SHOW_SPLASH_SCREEN=false/ /SET OPTIONS=%OPTIONS% SHOW_WELCOME_PAGE=false/ /SET OPTIONS=%OPTIONS% SHOW_CUSTOM_TREE_PAGE=false/ /SET OPTIONS=%OPTIONS% SHOW_SUMMARY_PAGE=false/ /SET OPTIONS=%OPTIONS% SHOW_INSTALL_PROGRESS_PAGE=true/ /SET OPTIONS=%OPTIONS% SHOW_CONFIG_TOOL_PAGE=false/ /SET OPTIONS=%OPTIONS% SHOW_XML_PREREQ_PAGE=false/ /SET OPTIONS=%OPTIONS% SHOW_ROOTSH_CONFIRMATION=false/ /SET OPTIONS=%OPTIONS% SHOW_END_SESSION_PAGE=false/ /SET OPTIONS=%OPTIONS% SHOW_EXIT_CONFIRMATION=false/ /SET OPTIONS=%OPTIONS% NEXT_SESSION=false/ /SET OPTIONS=%OPTIONS% NEXT_SESSION_ON_FAIL=false/ /SET OPTIONS=%OPTIONS% COMPONENT_LANGUAGES={"en"}/ /SET OPTIONS=%OPTIONS% INSTALL_TYPE="Custom"/ /SET OPTIONS=%OPTIONS% oracle.client:DEPENDENCY_LIST={"oracle.winprod:10.2.0.3.0","oracle.sqlplus:10.2.0.3.0","oracle.network.client:10.2.0.3.0"}/ /SET OPTIONS=%OPTIONS% oracle.winprod:DEPENDENCY_LIST={"oracle.odbc:10.2.0.3.0","oracle.ntoledb:10.2.0.3.0","oracle.ntoledb.odp_net:10.2.0.3.0"}/ /SET OPTIONS=%OPTIONS% oracle.has.common:OPTIONAL_CONFIG_TOOLS="{}"/ /SET OPTIONS=%OPTIONS% oracle.network.client:OPTIONAL_CONFIG_TOOLS="{}"/ /START /WAIT %client%\install\oui.exe -silent %OPTIONS% -nowelcome -noconfig -waitforcompletion -force -nowait -noconsole/
Les roi du Python, pouvez vous m'expliquer comment en faire un joli bout de code avec les variables.
Merci d'avance.
Cordialement.
WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/listinfo/wapt
une possibilité :
from setuphelpers import *
options = [] options.append(r'ORACLE_HOME_NAME=ora1020') options.append(r'TOPLEVEL_COMPONENT={"oracle.client","10.2.0.3.0"}') options.append(r'SHOW_SPLASH_SCREEN=false') options.append(r'SHOW_WELCOME_PAGE=false') options.append(r'SHOW_CUSTOM_TREE_PAGE=false') options.append(r'SHOW_SUMMARY_PAGE=false') options.append(r'SHOW_INSTALL_PROGRESS_PAGE=true') options.append(r'SHOW_CONFIG_TOOL_PAGE=false') options.append(r'SHOW_XML_PREREQ_PAGE=false') options.append(r'SHOW_ROOTSH_CONFIRMATION=false') options.append(r'SHOW_END_SESSION_PAGE=false') options.append(r'SHOW_EXIT_CONFIRMATION=false') options.append(r'NEXT_SESSION=false') options.append(r'NEXT_SESSION_ON_FAIL=false') options.append(r'COMPONENT_LANGUAGES={"en"}') options.append(r'INSTALL_TYPE="Custom"') options.append(r'oracle.client:DEPENDENCY_LIST={"oracle.winprod:10.2.0.3.0","oracle.sqlplus:10.2.0.3.0","oracle.network.client:10.2.0.3.0"}') options.append(r'oracle.winprod:DEPENDENCY_LIST={"oracle.odbc:10.2.0.3.0","oracle.ntoledb:10.2.0.3.0","oracle.ntoledb.odp_net:10.2.0.3.0"}') options.append(r'oracle.has.common:OPTIONAL_CONFIG_TOOLS="{}"') options.append(r'oracle.network.client:OPTIONAL_CONFIG_TOOLS="{}"') run('oui.exe -silent %s -nowelcome -noconfig -waitforcompletion -force -nowait -noconsole' % " ".join(options))
Le 04/09/2015 13:11, Didier Paulin a écrit :
Bonjour, nouveau défis : Packager une application métier nécessitant oracle 10g.
J'ai réussi avec des .bat à exécuter en silencieux l'install de oracle et des patch. Pour rendre plus propre mon paquet (qui exécute le bat dans la version actuelle) , je voudrai retranscrire ce code en python mais je me heurte au variable..
/@ECHO OFF/ /ECHO Oracle 10g R2 Client../ /SET OPTIONS=/ /SET OPTIONS=ORACLE_HOME=C:\oracle\ora1020/ /SET OPTIONS=%OPTIONS% ORACLE_HOME_NAME=ora1020/ /SET OPTIONS=%OPTIONS% TOPLEVEL_COMPONENT={"oracle.client","10.2.0.3.0"}/ /SET OPTIONS=%OPTIONS% SHOW_SPLASH_SCREEN=false/ /SET OPTIONS=%OPTIONS% SHOW_WELCOME_PAGE=false/ /SET OPTIONS=%OPTIONS% SHOW_CUSTOM_TREE_PAGE=false/ /SET OPTIONS=%OPTIONS% SHOW_SUMMARY_PAGE=false/ /SET OPTIONS=%OPTIONS% SHOW_INSTALL_PROGRESS_PAGE=true/ /SET OPTIONS=%OPTIONS% SHOW_CONFIG_TOOL_PAGE=false/ /SET OPTIONS=%OPTIONS% SHOW_XML_PREREQ_PAGE=false/ /SET OPTIONS=%OPTIONS% SHOW_ROOTSH_CONFIRMATION=false/ /SET OPTIONS=%OPTIONS% SHOW_END_SESSION_PAGE=false/ /SET OPTIONS=%OPTIONS% SHOW_EXIT_CONFIRMATION=false/ /SET OPTIONS=%OPTIONS% NEXT_SESSION=false/ /SET OPTIONS=%OPTIONS% NEXT_SESSION_ON_FAIL=false/ /SET OPTIONS=%OPTIONS% COMPONENT_LANGUAGES={"en"}/ /SET OPTIONS=%OPTIONS% INSTALL_TYPE="Custom"/ /SET OPTIONS=%OPTIONS% oracle.client:DEPENDENCY_LIST={"oracle.winprod:10.2.0.3.0","oracle.sqlplus:10.2.0.3.0","oracle.network.client:10.2.0.3.0"}/ /SET OPTIONS=%OPTIONS% oracle.winprod:DEPENDENCY_LIST={"oracle.odbc:10.2.0.3.0","oracle.ntoledb:10.2.0.3.0","oracle.ntoledb.odp_net:10.2.0.3.0"}/ /SET OPTIONS=%OPTIONS% oracle.has.common:OPTIONAL_CONFIG_TOOLS="{}"/ /SET OPTIONS=%OPTIONS% oracle.network.client:OPTIONAL_CONFIG_TOOLS="{}"/ /START /WAIT %client%\install\oui.exe -silent %OPTIONS% -nowelcome -noconfig -waitforcompletion -force -nowait -noconsole/
Les roi du Python, pouvez vous m'expliquer comment en faire un joli bout de code avec les variables.
Merci d'avance.
Cordialement.
WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/listinfo/wapt
Merci !
Cordialement.
De: "Hubert TOUVET" htouvet@tranquil.it À: wapt@lists.tranquil.it Envoyé: Lundi 7 Septembre 2015 14:28:50 Objet: Re: [Wapt] Oracle enjoy
une possibilité :
from setuphelpers import *
options = [] options.append(r'ORACLE_HOME_NAME=ora1020') options.append(r'TOPLEVEL_COMPONENT={"oracle.client","10.2.0.3.0"}') options.append(r'SHOW_SPLASH_SCREEN=false') options.append(r'SHOW_WELCOME_PAGE=false') options.append(r'SHOW_CUSTOM_TREE_PAGE=false') options.append(r'SHOW_SUMMARY_PAGE=false') options.append(r'SHOW_INSTALL_PROGRESS_PAGE=true') options.append(r'SHOW_CONFIG_TOOL_PAGE=false') options.append(r'SHOW_XML_PREREQ_PAGE=false') options.append(r'SHOW_ROOTSH_CONFIRMATION=false') options.append(r'SHOW_END_SESSION_PAGE=false') options.append(r'SHOW_EXIT_CONFIRMATION=false') options.append(r'NEXT_SESSION=false') options.append(r'NEXT_SESSION_ON_FAIL=false') options.append(r'COMPONENT_LANGUAGES={"en"}') options.append(r'INSTALL_TYPE="Custom"') options.append(r'oracle.client:DEPENDENCY_LIST={"oracle.winprod:10.2.0.3.0","oracle.sqlplus:10.2.0.3.0","oracle.network.client:10.2.0.3.0"}') options.append(r'oracle.winprod:DEPENDENCY_LIST={"oracle.odbc:10.2.0.3.0","oracle.ntoledb:10.2.0.3.0","oracle.ntoledb.odp_net:10.2.0.3.0"}') options.append(r'oracle.has.common:OPTIONAL_CONFIG_TOOLS="{}"') options.append(r'oracle.network.client:OPTIONAL_CONFIG_TOOLS="{}"') run('oui.exe -silent %s -nowelcome -noconfig -waitforcompletion -force -nowait -noconsole' % " ".join(options))
Le 04/09/2015 13:11, Didier Paulin a écrit :
Bonjour, nouveau défis : Packager une application métier nécessitant oracle 10g.
J'ai réussi avec des .bat à exécuter en silencieux l'install de oracle et des patch. Pour rendre plus propre mon paquet (qui exécute le bat dans la version actuelle) , je voudrai retranscrire ce code en python mais je me heurte au variable..
@ECHO OFF ECHO Oracle 10g R2 Client.. SET OPTIONS= SET OPTIONS=ORACLE_HOME=C:\oracle\ora1020 SET OPTIONS=%OPTIONS% ORACLE_HOME_NAME=ora1020 SET OPTIONS=%OPTIONS% TOPLEVEL_COMPONENT={"oracle.client","10.2.0.3.0"} SET OPTIONS=%OPTIONS% SHOW_SPLASH_SCREEN=false SET OPTIONS=%OPTIONS% SHOW_WELCOME_PAGE=false SET OPTIONS=%OPTIONS% SHOW_CUSTOM_TREE_PAGE=false SET OPTIONS=%OPTIONS% SHOW_SUMMARY_PAGE=false SET OPTIONS=%OPTIONS% SHOW_INSTALL_PROGRESS_PAGE=true SET OPTIONS=%OPTIONS% SHOW_CONFIG_TOOL_PAGE=false SET OPTIONS=%OPTIONS% SHOW_XML_PREREQ_PAGE=false SET OPTIONS=%OPTIONS% SHOW_ROOTSH_CONFIRMATION=false SET OPTIONS=%OPTIONS% SHOW_END_SESSION_PAGE=false SET OPTIONS=%OPTIONS% SHOW_EXIT_CONFIRMATION=false SET OPTIONS=%OPTIONS% NEXT_SESSION=false SET OPTIONS=%OPTIONS% NEXT_SESSION_ON_FAIL=false SET OPTIONS=%OPTIONS% COMPONENT_LANGUAGES={"en"} SET OPTIONS=%OPTIONS% INSTALL_TYPE="Custom" SET OPTIONS=%OPTIONS% oracle.client:DEPENDENCY_LIST={"oracle.winprod:10.2.0.3.0","oracle.sqlplus:10.2.0.3.0","oracle.network.client:10.2.0.3.0"} SET OPTIONS=%OPTIONS% oracle.winprod:DEPENDENCY_LIST={"oracle.odbc:10.2.0.3.0","oracle.ntoledb:10.2.0.3.0","oracle.ntoledb.odp_net:10.2.0.3.0"} SET OPTIONS=%OPTIONS% oracle.has.common:OPTIONAL_CONFIG_TOOLS="{}" SET OPTIONS=%OPTIONS% oracle.network.client:OPTIONAL_CONFIG_TOOLS="{}" START /WAIT %client%\install\oui.exe -silent %OPTIONS% -nowelcome -noconfig -waitforcompletion -force -nowait -noconsole
Les roi du Python, pouvez vous m'expliquer comment en faire un joli bout de code avec les variables.
Merci d'avance.
Cordialement.
_______________________________________________ WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/listinfo/wapt
_______________________________________________ WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/listinfo/wapt