![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
脚本Python、Perl
perry_peng
***
展开
-
Python for S60安装
在http://sourceforge.net/projects/pys60/files/pys60/找一个最新版本,现在是1.45版。 根据S60版本安装 PythonForS60 PythonScriptShell我的手机安装的是:PythonScriptShell_1_4_5_2ndEd.SISPythonForS60_1_4_5_2ndEd.SIS原创 2011-10-26 16:03:45 · 823 阅读 · 0 评论 -
文件格式解析:mp1/mp2/mp3 解码(Python)
Python写的MP3解码器,效率太低仅作研究用。几种分层格式,从1到3,1是最简单,3最复杂。原创 2012-10-22 18:12:08 · 3322 阅读 · 0 评论 -
使用联合与结构实现64位整数除法
大整数移动16位或8位。// Authors: perry peng// Date: Octember 09, 2012#include typedef unsigned char uint8, *puint8;typedef unsigned short uint16,*puint16;typedef unsigned int uint32,*puint32;typed原创 2012-03-12 13:05:17 · 2164 阅读 · 1 评论 -
Python提取pps文件中的音乐或视频
使用PowerPoint打开pps文件然后另存为mht格式。用记事本打开mht查找你想要的文件格式名或文件名,比如我通过PowerPoint知道pps中使用了NEW1_01.WAV,然后使用查找功能看到它指向sound001.wav 继续查找sound001.wav看到下面有一大堆base64编码(从第六行起)------=_NextPart_01CD5072.78C0D原创 2012-06-22 12:51:01 · 1816 阅读 · 2 评论 -
利用代码扫描器实现简单的语法高亮显示(代码转为HTML)
上一篇讲过用Python实现的Basic脚扫描,这里可以利用它实现语法高亮,其它语言应该也没问题,改下关键字和符号表。#! /usr/bin/env python## Copyright (C) 2012 xxx(xx) Co., LTD.# All rights reserved.## Developed by RD BIOS Team.## Authors: per原创 2012-04-09 08:25:30 · 749 阅读 · 0 评论 -
Python写个Basic解析器(1)代码扫描。
# Copyright (C) 2012 xxx Technology (xx) Co., LTD.# All rights reserved.## Developed by RD BIOS Team.## Authors: perry class BasicReader(BaseReader): def read(self): while self._原创 2012-04-03 12:46:49 · 886 阅读 · 0 评论 -
Python写个Basic解析器(1)解析全局变量声明。
def _make_dim(self): while True: ''' 变量必须是一个标识符,但如使用了某个保留的关键字 将引起一个错误。 ''' if self._reader.type == BSCTK_KEYWORD: return 0x80000010 ''' 变原创 2012-04-09 08:56:45 · 862 阅读 · 0 评论 -
Python写个Basic解析器(1)词法分析。
''' 定义代码入口点,虚拟机运行时将从它指定的地方开始运行。 ''' print('start:') ''' 定义语句解析函数映射表,不同的语句指定到对应的函数来处理。 ''' self._blocks = { BSCSM_GOTO: self._make_goto, BSCSM_IF:原创 2012-04-03 12:52:06 · 845 阅读 · 0 评论 -
使用Python下载整个网站的连接,适合能目录浏览的网站。
# Copyright (C) 2012 xxx(xxx) Co., LTD.# All rights reserved.## Developed by RD BIOS Team.## Authors: perry ## Date: January 11, 2012## Project Name: WEBDOWN# Project Version: 1.0.原创 2012-04-05 09:51:36 · 2217 阅读 · 0 评论 -
查询一个Http服务器上的文件size.
class QuerySizeThread(threading.Thread): def __init__(self, wd): self.wd = wd threading.Thread.__init__(self) def run(self): http = HTTPConnection(wd.url) while T原创 2012-04-05 09:31:54 · 492 阅读 · 0 评论 -
Python写个Basic解析器(1)虚拟机。
Testing...原创 2012-04-03 12:54:17 · 580 阅读 · 0 评论 -
Python写个Basic解析器(1)表达式。
Testing...原创 2012-04-03 12:55:54 · 474 阅读 · 0 评论 -
PyS60 Urllib
# Portions Copyright (c) 2005 Nokia Corporation """Open an arbitrary URL."""import stringimport socketimport osimport statimport timeimport sysimport types__all__ = ["urlopen", "转载 2012-03-12 13:10:10 · 3724 阅读 · 0 评论 -
PyS60 StringIO
# Portions Copyright (c) 2005 Nokia Corporation """File-like objects that read from or write to a string buffer."""import typestry: from errno import EINVALexcept ImportError: EINVAL转载 2012-03-12 13:08:47 · 725 阅读 · 0 评论 -
PyS60 Socket
# Copyright (c) 2005 - 2007 Nokia Corporation## Licensed under the Apache License, Version 2.0 (the "License");# you may not use this file except in compliance with the License.# You may obtai转载 2012-03-12 13:08:08 · 1249 阅读 · 0 评论 -
PyS60 Camera
## camera.py## Copyright (c) 2005 - 2007 Nokia Corporation## Licensed under the Apache License, Version 2.0 (the "License");# you may not use this file except in compliance with the Licens转载 2012-03-12 13:06:22 · 505 阅读 · 0 评论 -
文件格式解析:ISO9660 (ISO文件) -- Python
while True: file.seek(block) buffer = file.read(ISO9660_BLKSZ) if len(buffer) < ISO9660_BLKSZ: break if buffer[1:6] == "CD001": type = ord(buffer[0]) pri原创 2012-06-28 11:01:16 · 5289 阅读 · 0 评论