`
cloudhe
  • 浏览: 107175 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
from urllib import urlopen webdata = urlopen("").read() print webdata   From http://www.pythonid.com/html/fenleiwenzhang/network/20070910/173.html   See more in "Dive Into Python"
Take a look at the three different "lists" below, guess the outputs: (a) >>> lists = [ [], [], [] ] >>> lists [[], [], []] >>> lists[1].append("Hi there!") >>> lists ? (b) >>> lists = [ [] for i in range(3) ] >>> lists [[], ...
1. exec:       Executing command from string. class PlayerBase(): player_name = None def talk(self): print self.player_name, ": It takes five." class Kobe(PlayerBase): def __init__(self): self.player_name = "Kobe." cl ...
"yield" is used for Generater (below 2.2) or seperately (2.2 or above) in Python. "yield" mainly works as "return", but it makes a function able to have multiple return values step by step . All return values will comprise a sequence which can be used in " ...
Download 飞鸽传书 (IP Messager) from here: http://www.ipmsg.org/archive/g2ipmsg-0.9.5.tar.gz Open a terminal: $ tar zxf g2ipmsg-0.9.5.tar.gz $ cd g2ipmsg-0.9.5/ $ sudo apt-get install build-essential autoconf intltool libgnomeui-dev libpanelappletmm-2.6-dev $ ./autogen.sh $ make $ sudo make inst ...
Wanna develop Maemo programs in Linux without Maemo SDK? Or even in Windows?   Nothing is impossible if you know Python! Working on PyMaemo, all we need are: 1. N800 with python2.5-runtime. 2. A pc with wireless card (laptop), running Ubuntu or Windows. (Using a desktop PC without wireless card will ...
Socket Server: # -*- coding: cp936 -*- """ 广播服务器,接收来自广播的消息,并进行应答 设置socket选项:SO_BROADCAST """ import socket host = "" port = 50000 s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) s.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1) s.setsockopt(socket.SOL ...
Basically, just use "os.system(str)". For example: import os cmd = 'ls' os.system(cmd)   However, when we need to be root, e.g., running "sudo apt-get update", troubles come out, since a UI application started in N800 menu gives you no chance to input a password for background com ...
Open \UEStudio 06\wordfile.txt (or find in UE menu: 高级->配置->编辑器显示->语法加亮->打开).   Append following to the file: (the "/L14" in line one must be changed to the existing last number in your own file plus one)   /L14"Python" Line Comment = # Escape Char = \ File Extensions ...
1、Java, JavaScript, JScript, JSP 语言开发者类型                编译位置    动/静其它JavaSun面向对象编程语言需要客户端静态前身Oak语言JavaScriptSun, Netscape基于对象,事件驱动,脚本语言不需要客户端静态简称JS, 介于Java与HTML之间JScriptMicrosoft基于对象,事件驱动,脚本语言不需要客户端静态包含JavaScript, (仅?)用于IEJSP
It is the line in the source list:引用deb cdrom: ...that makes apt-get ask users to insert the Ubuntu disc during installation. Edit file "/etc/apt/sources.list", and just comment out all the "deb cdrom" lines: 引用#deb cdrom: ...
Find the latest VLC from:http://download.videolan.org/pub/videolan/vlc/0.8.6d/win32/ Both server and client are using vlc-0.8.6d here. Server: 1. "Open file" 2. Browse and select a local file to share with the client 3. Enable "Stream/Save" to set VLC as a server 4. Click " ...
Sometimes, a quite simple concept comes out with lots of related theories that make beginners have to spend an exausting time before figure out the basic one. Watching something through such thick fog, we'll never make it without a powerful straight light which directly reach the key point. The li ...
简介 Netlink 是一种特殊的 socket,它是 Linux 所特有的,类似于 BSD 中的AF_ROUTE 但又远比它的功能强大,目前在最新的 Linux 内核(2.6.14)中使用netlink 进行应用与内核通信的应用很多,包括:路由 daemon(NETLINK_ROUTE),1-wire 子系统( ...
作者:Kevin He,2005-01-05 原文地址:http://www.linuxjournal.com/article/7356 译者:Love. Katherine,2007-03-23 译文地址:http://blog.csdn.net/lovekatherine/archive/2007/03/23/1539267.aspx 转载时务必以超链接形式标明文章原始出处及作者、译者信息。                                                                                  Netlink Socke ...
Global site tag (gtag.js) - Google Analytics