Skip to content

kooksee/tobari

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

账目管理系统

「とばり」とは『帳』です、即『账』。

virtualenv venv --python=python2.7
venv/bin/pip install Flask
venv/bin/pip freeze > Gemfile && cat Gemfile

venv/bin/pip install -r Gemfile
sudo apt-get install postgresql libpq-dev python-dev


安装freetype2
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.3.5.tar.gz
tar -zxvf freetype-2.3.5.tar.gz
./configure
make
make install

这两天用python写一个程序,需要对各种格式的图片进行一些简单的处理,采用了Python Imaging Library (PIL)库,这个库可用于图片的一些常用操作,比如改变图片格式、尺寸、色彩、旋转等。 
  pil站点: http://www.pythonware.com/products/pil/index.htm 
  pil下载: http://effbot.org/downloads/Imaging-1.1.6.tar.gz 
  pil文档: http://www.pythonware.com/library/pil/handbook/index.htm 
   
  [安装] 
  $ gunzip Imaging-1.1.6.tar.gz 
  $ tar xvf Imaging-1.1.6.tar 
  $ cd Imaging-1.1.6 
# 设置JPEG库的路径
vim setup.py :
    #JPEG_ROOT = libinclude("/usr/local")
    python2.5 setup.py build
    python2.5 setup.py install
  安装完毕后,可在python安装目录下的site-packages找到PIL安装目录。 

postgresql使用:
postgres=# CREATE USER tobari WITH PASSWORD 'tobari';
CREATE ROLE
postgres=# CREATE DATABASE tobari; 
CREATE DATABASE
postgres=# GRANT ALL PRIVILEGES ON DATABASE tobari TO tobari;
GRANT

登录数据库:
psql -U tobari -d tobari -h localhost
查看数据表:\dt

数据库迁移:
venv/bin/python manage.py db init
venv/bin/python manage.py db migrate
venv/bin/python manage.py db upgrade

安装psycopg2:
sudo apt-get build-dep python-psycopg2
venv/bin/pip install psycopg2

About

办公室组票系统

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 63.9%
  • HTML 35.8%
  • Ruby 0.3%