So greifen Sie über die HQL-Datei (Bash-HQL-Python) zu einer Bash-Variablen im Python-Skript zu,Python

Python-Programme
Anonymous
 So greifen Sie über die HQL-Datei (Bash-HQL-Python) zu einer Bash-Variablen im Python-Skript zu,

Post by Anonymous »

Ziel: < /strong> BASH -Variable in Python -Skript. export var = "/abc/xyz/file.txt"

Diese Bash -Datei wird auf HQL -Datei (Hive) aufrufen. /> Ich möchte im Python -Skript auf die Bash -Variable (VAR) zugreifen. < /p>

import os

res = os.environ['var']
< /code>

Bitte schlagen Sie eine alternative Lösung vor, um dies zu erreichen. < /p>

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post