- 浏览: 109497 次
- 性别:
- 来自: 北京
-
最新评论
-
hzpfly:
...
Amusing Python 2: range/xrange -
bcw104:
不支持中文路径
Python 中怎么 copy 文件和目录 -
snageyang:
10000的结果xrange 0.65599989891 0 ...
Amusing Python 2: range/xrange -
caesarok:
有的没那么简单,呵呵
Python 中使用 FTP -
cloudhe:
qubic 写道
引用
Ruby 没有类似 Jython 的东 ...
Python and Ruby
文章列表
See more in book "Linux C Function".
1. accept(接受socket连线)
相关函数 socket,bind,listen,connect
表头文件 #include<sys/types.h>
#include<sys/socket.h>
定义函数 int accept(int s,struct sockaddr * addr,int * addrlen);
函数说明 acce ...
- 2007-12-11 09:49
- 浏览 3755
- 评论(0)
This article takes Maemo2.2 and Ubuntu6.10 for example. However, what we need to install another edition of Maemo platform is just to change the rootstrap gived below. As for Ubuntu, I think those above 6.06 will be allright.
1. All packages we need:
scratchbox-core-1.0.7-i386.tar.gz
...
- 2007-12-10 09:22
- 浏览 1933
- 评论(0)
In a new installed scratchbox, on which Maemo SDK is based on, there is a DNS problem.
While:[sbox-SDK_PC: ~] fakeroot apt-get update
We see:
引用Temporary failure resolving 'repository.maemo.org'
The reason is we have three resolv.conf files in system:
a) /etc/resolv.conf[*]b) /scratchbox/etc/re ...
- 2007-12-07 18:19
- 浏览 2195
- 评论(0)
[sbox-SDK_PC: ~] export http_proxy=http://username:password@proxyaddr:port
Remember to run it everytime you start a scratchbox.
"ftp_proxy" is in the same way.
Looks easy, huh? I'm not gonna say it cost me 1 hour ..
- 2007-12-07 18:10
- 浏览 1136
- 评论(0)
For example, get a package called "gst-plugins-good0.10":
Terminal 代码
[sbox-SDK_ARMEL: ~] fakeroot apt-get update
[sbox-SDK_ARMEL: ~] fakeroot apt-get build-dep gst-plugins-good0.10
[sbox-SDK_ARMEL: ~] fakeroot apt-get source gst-plugins-good0.10
[sbox-SDK_A ...
- 2007-12-07 17:47
- 浏览 1552
- 评论(0)
The installation stops at:
引用What is the location of the directory of C header files that match your running
kernel? [/usr/src/linux/include]
Whatever path I give it here will be in vain, since I don't have any headers actually.
How this problem came to me is after:
$ sudo apt-get dist- ...
- 2007-12-07 16:37
- 浏览 1147
- 评论(0)
A simple file structure of python applications on maemo/n800:
helloword
helloword.desktop
helloword.service
helloword.png
setup.py
Note:
1. Main source file helloworld is written in python, but it must be named without ".py".
2. helloworld.desktop and helloworld.service are used for addi ...
- 2007-12-07 15:51
- 浏览 1163
- 评论(0)
Python2.5 is needed when using pygtk on maemo, otherwise the default python2.3 may be enough.
Add "deb http://repository.maemo.org/extras bora free non-free" to /scratchbox/users/maemo/target/SDK_ARMEL/etc/apt/sources.list
Terminal code
[sbox-SDK_ARMEL: ~] > fakeroot apt-get updat ...
- 2007-12-07 15:07
- 浏览 2128
- 评论(0)
If a string to be packed is shorter than its format, it'll be followed by '\x00's when unpacked.
One example, in which every length of the string fits the format:
python 代码
>>> import struct
>>> fmt = 'c4si5s'
>>>
>>> verb = 'have' ...
- 2007-12-07 11:11
- 浏览 651
- 评论(0)