generated at
Python:HelloWorld
スクリプト
hello.py
print('Hello Python World')

実行方法
$ curl -s https://scrapbox.io/api/code/suto3/Python:HelloWorld/hello.py | python

$ wget -q -O - https://scrapbox.io/api/code/suto3/Python:HelloWorld/hello.py | python

env.py
import os for key, val in os.environ.items(): print('{}: {}'.format(key, val))

$ curl -s https://scrapbox.io/api/code/suto3/Python:HelloWorld/env.py | python

tk.py
from tkinter import * from math import * root = Tk() canvas = Canvas(root, width = 360, height=360) canvas.create_oval(50, 50, 310, 310) t = 0 while(t < 2*pi): #canvas.create_line(180+130*cos(t), 180-130*sin(t),180+130*cos(2*t), 180-130*sin(2*t)) #canvas.create_line(180+130*cos(t), 180-130*sin(t),180+130*cos(3*t), 180-130*sin(3*t)) canvas.create_line(180+130*cos(2*t), 180-130*sin(2*t),180+130*cos(5*t), 180-130*sin(5*t)) t = t + pi/80 canvas.pack() root.mainloop()

$ curl -s https://scrapbox.io/api/code/suto3/Python:HelloWorld/tk.py | python

Python-script