« Python » : différence entre les versions

Aller à la navigation Aller à la recherche
Aucun résumé des modifications
(13 versions intermédiaires par le même utilisateur non affichées)
Ligne 2 : Ligne 2 :


== Python ==
== Python ==
La dernière version en août 2021 est Python 3.9.6 :
* https://www.python.org/
Documentation version 3.9 :
* https://docs.python.org/3/
L'outil IPython comme interpréteur de commande plus riche que IDLE :
* http://ipython.org/
Anaconda
*
=== Nouvelle notation ===
Ancienne notation :
<source lang="python">
age = 10
"Jean a {} ans".format(age)
</source>
Nouvelle notation :
<source lang="python">
age = 10
# un exemple de f-string
f"Jean a {age} ans"
</source>


== PyScripter ==
== PyScripter ==
Ligne 16 : Ligne 41 :
* http://www.pygame.org/news
* http://www.pygame.org/news


Cours :
== Cours ==
=== Site ===
Python 3 :
* http://fsincere.free.fr/isn/python/cours_python_tkinter.php
 
Tkinter :
* https://python.doctor/page-tkinter-interface-graphique-python-tutoriel
 
Python :
* http://www.maths-algo.fr/algo/cours/cours_pyhon_installer.htm
* http://www.maths-algo.fr/algo/cours/cours_pyhon_installer.htm
* https://www.youtube.com/channel/UCS2e0hEJMhwd6bNscS60xTg : FormationVidéo
* https://www.youtube.com/channel/UCW6TXMZ5Pq6yL6_k5NZ2e0Q : Socratica
=== Vidéo ===
Graven - Développement, chaîne YouTube :
* https://www.youtube.com/user/Gravenilvectuto
== Python et youtube-dl ==
Page du projet :
* https://github.com/ytdl-org/youtube-dl
Prérequis :
* Python
* bibliothèque pour Python :
** https://pypi.org/project/youtube_dl/
Exemple de script pour télécharger une vidéo :
<source lang="python">
# importing module
import youtube_dl
 
ydl_opts = {}
 
def dwl_vid():
    with youtube_dl.YoutubeDL(ydl_opts) as ydl:
        ydl.download([zxt])
 
channel = 1
while (channel == int(1)):
    link_of_the_video = input("Copy & paste the URL of the YouTube video you want to download:- ")
    zxt = link_of_the_video.strip()
 
    dwl_vid()
    channel = int(input("Enter 1 if you want to download more videos \nEnter 0 if you are done "))
</source>
<small>source : https://www.geeksforgeeks.org/python-download-youtube-videos-using-youtube_dl-module/</small>
Avec cet exemple de code, il est possible de télécharger :
* une vidéo en particulier ; utiliser l'adresse de la vidéo dont la forme est : <code><nowiki>https://www.youtube.com/watch?v=pMHuxDd_sAy</nowiki></code>
* toutes les vidéos d'une chaine ; utiliser l'adresse de chaine dont la forme est : <code><nowiki>https://www.youtube.com/user/jat84/videos</nowiki></code>
=== Autres codes ===
* https://www.programcreek.com/python/example/98358/youtube_dl.YoutubeDL
== Document ==
* [[:File:php-fichier ctrl date modif-01.zip]]
* [[:File:compresse et dimensionne image 1024-date modif-qualite toutes.zip]]


== Voir aussi ==
== Voir aussi ==
Ligne 23 : Ligne 103 :


[[Catégorie:Informatique]]
[[Catégorie:Informatique]]
[[Catégorie:test 1]]
[[Catégorie:Python]]
[[Catégorie:test 2]]
[[Catégorie:test 2]]

Version du 21 août 2021 à 20:29

Python est un langage de programmation.

Python

La dernière version en août 2021 est Python 3.9.6 :

Documentation version 3.9 :

L'outil IPython comme interpréteur de commande plus riche que IDLE :

Anaconda

Nouvelle notation

Ancienne notation :

age = 10
"Jean a {} ans".format(age)

Nouvelle notation :

age = 10
# un exemple de f-string
f"Jean a {age} ans"

PyScripter

PyScripter est un environnement de développement intégré (EDI) pour Python.

Téléchargement :

Pygame

Le livre de Pygame sur Wikilivre

Pygame

Cours

Site

Python 3 :

Tkinter :

Python :

Vidéo

Graven - Développement, chaîne YouTube :

Python et youtube-dl

Page du projet :

Prérequis :

Exemple de script pour télécharger une vidéo :

# importing module
import youtube_dl
  
ydl_opts = {}
  
def dwl_vid():
    with youtube_dl.YoutubeDL(ydl_opts) as ydl:
        ydl.download([zxt])
  
channel = 1
while (channel == int(1)):
    link_of_the_video = input("Copy & paste the URL of the YouTube video you want to download:- ")
    zxt = link_of_the_video.strip()
  
    dwl_vid()
    channel = int(input("Enter 1 if you want to download more videos \nEnter 0 if you are done "))

source : https://www.geeksforgeeks.org/python-download-youtube-videos-using-youtube_dl-module/

Avec cet exemple de code, il est possible de télécharger :

  • une vidéo en particulier ; utiliser l'adresse de la vidéo dont la forme est : https://www.youtube.com/watch?v=pMHuxDd_sAy
  • toutes les vidéos d'une chaine ; utiliser l'adresse de chaine dont la forme est : https://www.youtube.com/user/jat84/videos

Autres codes

Document

Voir aussi