Python 2.7
Khi viết script python có pass các argument, cách đơn giản nhất là dùng sys.argv nhưng chỉ cần việc xử lý phức tạp hơn 1 chút, xuất hiện khoảng 3,4 argument, hay đang trong giai đoạn thiết kế thì cách tốt nhất là dùng thư viện argparse. Mất công học một tí nhưng với vài dòng là đã có 1 argparser xịn, dễ dùng.
Friday, May 31, 2013
Wednesday, May 29, 2013
Start reading Dive Python 3
This famous book http://getpython3.com/diveintopython3/
Why?
Why?
- My Python knowledge is collected from anywhere but a book. Most of them from StackOverFlow. So I'm not sure what I've missed. Maybe I need a reference book but this book is good enough, and it was written in practical manner
- Re-learn python means I'm sharping my skill/ knowledge
- Learn python 3, which is the future of python
- Daily read this book, from-cover-to-cover
- Try to use python commandline debugger as much as possible
- Try emacs
- Conclude what I learned on this blog. But wrote them in Vietnamese
Monday, May 6, 2013
Remove package when lack of its config file
This is very bad situation.
Try below solutions:
- Reinstall that package
- Reinstall packages that your package depends on. (Eg: some xxx-common package)
- Copy config from other machine
Try below solutions:
- Reinstall that package
- Reinstall packages that your package depends on. (Eg: some xxx-common package)
- Copy config from other machine
Subscribe to:
Posts (Atom)