Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| # http://python.web.id/angka-terbilang-pada-python/#.VQpS8s2sXQo | |
| satuan = ['', 'satu', 'dua', 'tiga', 'empat', 'lima', 'enam', 'tujuh', | |
| 'delapan', 'sembilan', 'sepuluh', 'sebelas'] | |
| def terbilang_(n): | |
| if n >= 0 and n <= 11: | |
| hasil = [satuan[n]] | |
| elif n >= 12 and n <= 19: | |
| hasil = terbilang_(n % 10) + ['belas'] |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| @echo off | |
| REM "ftype /?" explains all of this assoc and ftype and PATHEXT usage | |
| REM https://docs.python.org/2/using/windows.html for more info around the subject. | |
| REM set PythonDIR to your python 2 or 3 install path; e.g. the folder with python.exe in it. | |
| set PythonDIR=C:\Python27 | |
| set PATH=%PythonDIR%;%PythonDIR%\Scripts;%PATH% | |
| set PYTHONPATH=%PythonDIR%\Lib;%PythonDIR%\Lib\site-packages;%PythonDIR%\DLLs; | |
| set PATHEXT=%PATHEXT%;.PY;.PYW |