albert's blog
Showing posts with label
Python
.
Show all posts
Showing posts with label
Python
.
Show all posts
2018/04/06
[Python] namedtuple
›
Assume I create a Dog class as bellows: class Dog (): def __init__ ( self , size, name): self . size = size self ....
2018/04/05
[Python] How to parse JSON string?
›
Problem I plan to connect to a url, http://od.moi.gov.tw/api/v1/rest/datastore/A01010000C-000628-023 , to get data with JSON format. How t...
2018/03/10
[Python] How to open a url with urllib via proxy ?
›
Problem When I try to open a URL via urllib, but I get this error message: File "C:\Users \a lbert\AppData\Local\Programs\Python\...
2018/03/09
[Python] UnicodeDecodeError: 'cp950' codec can't decode byte 0x99 in position 241: illegal multibyte sequence
›
Problem When I try to read a file via Python, I get an error message as following: 1 2 3 4 Traceback (most recent call last): File ...
2016/04/05
[Python] How to do sorting in Python
›
Assume I have a Player Class as bellows: 1 2 3 4 5 6 7 8 9 10 11 12 13 ''' Created on 2016/2/3 @author: albert ...
2016/04/04
[Python] Using Pickle to read/write file
›
Using pickle is straightforward: import the required module, then use dump() to save your data and, some time later, load() to restore it. ...
2016/04/03
[Python] Install Python IDE for Eclipse
›
PyDev is a plugin that enables Eclipse to be used as a Python IDE (supporting also Jython and IronPython). It uses advanced type inferenc...
2016/03/09
[Python] File I/O example
›
Example 1: Read file and print its content 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 import os "...
2016/03/08
[Python] IF...ELIF...ELSE Statements
›
Example Assume I have four exam type, each type has its passing scores. I will provide a method, as people fill in exam type and scores, ...
›
Home
View web version