Home » digwtx
  • 30
  • 12月

After almost 6 months of development time (with breaks, obviously), I'm happy to announce new version of the Flask-Admin package.

So, what's new?

Table of Contents:

[TOC]

Python 3 Support

Flask-Admin (and Flask-BabelEx) are now Python 3 compatible. I only tested them with Python 3.3, so can't guarantee that …

Read More...

  • 28
  • 12月

This is the third article in the series in which I document my experience writing web applications in Python using the Flask microframework.

The goal of the tutorial series is to develop a decently featured microblogging application that demonstrating total lack of originality I have decided to call microblog.

Here …

Read More...

  • 27
  • 12月

为知笔记Linux客户端2.1.7版本Slackware 64位安装包下载地址:

WizQTClient-2.1.7-x86_64-1_14.1.txz

为知笔记Linux客户端2.0.64版本Slackware 64位安装包下载地址:

WizQTClient-2.0.64-x86_64-1.txz

Read More...

  • 26
  • 12月

This is the second article in the series where I document my experience writing web applications in Python using the Flask microframework.

The goal of the tutorial series is to develop a decently featured microblogging application that demonstrating total lack of originality I have decided to call microblog.

Here is …

Read More...

  • 24
  • 12月

This is the first article in a series where I will be documenting my experience writing web applications in Python using the Flask microframework.

Here is an index of all the articles in the series that have been published to date:

Read More...

  • 23
  • 12月

[转]Python高效编程技巧

[TOC]

我已经使用Python编程有多年了,即使今天我仍然惊奇于这种语言所能让代码表现出的整洁和对DRY编程原则的适用。这些年来的经历让我学到了很多的小技巧和知识,大多数是通过阅读很流行的开源软件,如Django, Flask, Requests中获得的。 下面我挑选出的这几个技巧常常会被人们忽略,但它们在日常编程中能真正的给我们带来不少帮助。

下面我挑选出的这几个技巧常常会被人们忽略,但它们在日常编程中能真正的给我们带来不少帮助。

字典推导(Dictionary comprehensions)和集合推导(Set comprehensions)

大多数的Python程序员都知道且使用过列表推导(list comprehensions)。如果你对list comprehensions概念不是很熟悉——一个list comprehension就是一个更简短、简洁的创建一个list的方法。

>>> some_list = [1, 2, 3, 4, 5]

>>> another_list = [ x + 1 for x in some_list ]

>>> another_list
[2, 3, 4, 5, 6]

自从python 3.1 (甚至是Python 2 …

Read More...

  • 30
  • 11月

很早之前看到有道云笔记的OpenAPI,之后就申请了,但是很久没有看到有回复。今天打开邮件一看,竟然审批通过了。

有道云笔记个人应用审核通过

所以今天心血来潮,花了一天时间,写了个Python版的OpenAPI,主要接口都实现了,分享、附件、图片这些暂且就懒得弄了。

OpenAPI文档参考:http://notesandbox.youdao.com/open/apidoc.html

论坛里的相关帖子真是太少了,有关OpenAPI才11个主题,不得不吐槽一下~

下面贴代码吧,学Python的应该都看得懂滴~~

# -*- encoding: utf-8 -*-

"""
    Youdao Note OpenAPI
    ~~~~~~~~~~~~~~~~~~~

    Youdao Note OpenAPI
    see <http://notesandbox.youdao.com/open/apidoc.html> for more details.

    :copyright: (c) 2013 by digwtx <wtx358 …

Read More...

  • 12
  • 11月

经过一年多的策划、开发和测试,最古老Linux发行版之一Slackware发布了Slackware 14.1。

主要新特性是:

轻量级易用的桌面环境 Xfce 4.10.1,KDE 4.10.5,3.10.17 LTS内核。Slackware提供了两种内核,一种包含所有驱动,另一种是 generic kernel,所有驱动以模块构建。

其它特性包括:

GNU C Library v2.17,X11R7.7,默认编译器gcc-4.7.1,可选LLVM和Clang,网络连接管理器NetworkManager,Apache (httpd) 2.4.6 web server,开发工具如Perl 5.18.1、Python …

Read More...

  • 12
  • 11月

介绍如何制作Slackware 14.1的安装DVD,包括32位和64位,在一张4.37GB的DVD是可以包含的。

制作g2ldr,用于引导32位和64位安装程序

$ grub-mkimage -o core.img --format i386-pc biosdisk ext2 fat iso9660 halt reboot \
    normal minicmd ntfs chain configfile ntldr search search_fs_file \
    search_fs_uuid search_label usb usb_keyboard extcmd echo linux vga \
    gfxmenu gfxterm vbe

生成一个core.img,包含GRUB2启动所需要的基础模块。

$ cat cdboot.img core.img > g2ldr

生成可用于引导CD …

Read More...

  • 05
  • 11月

[TOC]

参考文档:

  • http://xhc.me/wp-content/uploads/mutt/manual_1.5.19_zh.html
  • http://docs.huihoo.com/homepage/shredderyin/mutt_frame.html
  • http://home.ustc.edu.cn/~lixuebai/GNU/MuttConfig.html
  • http://newnuy.com/?p=24

fetchmail配置

~/.fetchmailrc:

set deamon 600 # second
poll pop.xxx.xxx protocol pop3 uidl user "xxx" password …

Read More...