Daemon Skeleton introduction

Posted by 4Aiur on 2013/02/24 in Python |

Daemon Skeleton introduction Past couple of days, i’ve builded some daemon tools, tired to do the same thing again and again, i think i need a template, to create python project with daemon easy and fast. So created this template Daemon Skeleton. In this template i used python-daemon as the daemonizer, and did some tweak, […]

Tags: ,

Ship access log to ElasticSearch

Posted by 4Aiur on 2012/08/13 in Python |

Ship access log to ElasticSearch This article introduce how to use a custom python script to parse Apache access log and shipping it to ElasticSearch. If you wan’t store the huge log to ElasticSearch, you should read Using Elasticsearch for logs, Using some popular OpenSource software, like Graylog2, Logstash, Apache Flume. System basic setup

[…]

Tags:

OpenShift Command Line Interface

Posted by 4Aiur on 2012/05/25 in Python |

OpenShift Command Line Interface Working With Domains Creating a Domain rhc domain create -n DomainName -l rhlogin -p password [OptionalParameters] Deleting a Domain rhc domain show -l rhlogin rhc app destroy -a <applicationName> -l rhlogin rhc domain destroy -n <domainName> -l rhlogin Viewing User Information rhc domain show -l rhloging Creating Applications Supported app types: […]

Tags:

Deploy web.py application on OpenShift

Posted by 4Aiur on 2012/04/03 in Python |

Deploy web.py application on OpenShift Prepare environment Install OpenShift client command line tool

Generate a new SSH key

edit ~/.ssh/config

Create a Namespace

Create a application, and clone the git reposity

Write your application edit setup.py

edit wsgi/application

Commit and push your code

Bind your Domain

[…]

Tags: ,

Suppressing paramiko log

Posted by 4Aiur on 2011/12/26 in Python |

Suppressing paramiko log Backup paramiko source file.

Modify paramiko/util.py.

Set logger name “suppress” in your code.

Tags: , ,

使用python实现简易的文件共享

Posted by 4Aiur on 2011/01/21 in Python |

使用python实现简易的文件共享 可以利用python的SimpleHTTPServer共享自己的文件给其他人

需要从其他人那拷贝东西到自己机器上时可以用python的CGIHTTPServer这个模块,写一个CGI程序来接收文件。

其他人通过访问http://uripaddress:8000/upload.html来上传文件。

Tags: ,

使用python获取mp3中的歌词

Posted by 4Aiur on 2010/12/09 in Python |

使用python获取mp3中的歌词 安装依赖库eyeD3

Tags:

使用python下载存放在Index中的资源

Posted by 4Aiur on 2010/12/06 in Python |

使用python下载存放在Index中的资源 Useing python threading download example. like this:

Tags:

Python 三元表达式

Posted by 4Aiur on 2010/12/06 in Python |

Python 三元表达式

Tags:

python的ftp应用举例

Posted by 4Aiur on 2010/05/04 in Python |

python的ftp应用举例 使用python可以很方便的进行ftp操作,下面这个小程序的作用是成功下载远程服务器文件后,删除远程服务器上面的文件。

Tags:

Copyright © 2010-2017 4Aiur All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.

.