Pour continuer, dans cet article, nous allons assembler quelques commandes de base dans un test simple, à l'intérieur d'un fichier Python, afin qu'ils puissent tous être gérés comme une seule entité.
Moving on, in this article we will assemble some basic commands into a simple test inside a Python file so they can all be run as a single entity.
Par exemple, si un formateur télécharge un fichier Python (.py) pour créer une session, le fichier ne sera pas disponible sur l'application.
For example, if an instructor uploads a Python file (.py) as a lecture, the file will not be available on the app.
Le fichier python qui génère l'interface utilisateur du rig est maintenant automatiquement importé lorsqu'on fait un link du rig
UI python file is now automatically imported when you link your rig
Dans la partie 3, nous allons compiler ce script dans un fichier Python que nous pourrons réutiliser à chaque fois que l'on voudra exécuter un test.
In Part 3, we'll compile this script into a Python file which we can reuse each time we want to run the test.
Le code s'exécute après que l'exécution du téléchargeur binaire soit réussie, ouvre son fichier Python, trouve ces marqueurs spécifiques et les supprime, ainsi que tout ce qui se trouve entre ceux-ci.
The code run after successful execution of the binary downloader opens this Python file, finds these special markers and deletes them, and everything between them. The cleaned Python file is then saved.
Sous Windows, quand on souhaite éditer un fichier Python, on ouvre le menu contexte du fichier (clic droit), puis on sélectionne Edit with IDLE.
On Windows, when you want to edit a Python file, you open the context menu of the file (right click), then select Edit with IDLE.
En mode debug, le serveur recharge aussi automatiquement tout fichier Python modifié. Défaut: False
In debug mode, the server also reload automatically any modified Python file; Default: False
Certaines sous-classes de File, incluant ContentFile et FieldFile, peuvent remplacer cet attribut par un objet autre qu'un objet fichier Python.
Some subclasses of File, including ContentFile and FieldFile, may replace this attribute with an object other than a Python file object.
Faut il l'importer dans un fichier python(.py) ou créer un.conf?
Should it import it into a python (.py) file or create a.conf?