Quantcast
Channel: CodeSection,代码区,Python开发技术文章_教程 - CodeSec
Browsing all 9596 articles
Browse latest View live

Python内置函数(60)――classmethod

英文文档: staticmethod ( function ) Return a static method for function . A static method does not receive an implicit first argument. The @staticmethod form is a function see the description of function...

View Article


Image may be NSFW.
Clik here to view.

Python写地铁的到站的原理简易版

python地铁的到站流程及原理(个人理解) 今天坐地铁看着站牌就莫名的想如果用Python写其工作原理 是不是很简单就小试牛刀了下大佬们勿喷纯属小弟个人理解 首先来看看地铁上显示的站牌如下: 就想这首先站点固定的名称固定的站点名称长度可知道,这不是符合列表嘛[第一站,第二站,。。。,最后一站] 把这写站名放入列表中一个for循环自动帮你取每个站名...

View Article


Python 第三篇(上):python文件基础操作、json模块、lambda、map、filter、reduce和函 ...

python一切皆对象,linux一切皆文件,python操作文件是很常见的O/I操作,其内置来open()函数可以完成文件的基本操作: 一:使用内置open()函数操作文件,基本语法如下: with open("test.log","r") as f: #文件的打开模式为只读r a = f.readlines() #一次读取文件的所有行放入内存 print(a) #显示读取到的文件全部内容...

View Article

Image may be NSFW.
Clik here to view.

SQLcl as a library in existing programs

I got a question over the weekend if SQLcl could be leveraged as library from inside a Jython program. This may seem like it's the same thing as adding jython to SQLcl to use instead of javascript but...

View Article

Image may be NSFW.
Clik here to view.

The Saga of Concurrent DNS in Python, and the Defeat of the Wicked Mutex Troll

Tell us about the time you made DNS resolution concurrent in python on Mac and BSD. No, no, you do not want to hear that story, my friends. It is nothing but old lore and #ifdefs . But you made Python...

View Article


Use keyring to store yourcredentials

I write a lot of python scripts that interact with online services, which usually means requires my passwords and API keys. But how to storethem? The simplest approach would be to save my variable in...

View Article

selenium页面对象模型

Page Object Model:页面对象模型,是Selenium中的一种测试设计模式,一个页面对象代表用户界面交互测试的一个区域。 使用页面对象模式的好处: 创建可重用的代码,可以跨多个测试用例共享 减少重复代码的数量 如果用户界面更改,只需要修改一个地方 测试代码 importunittest fromseleniumimportwebdriver importpage...

View Article

Laser Cutting with Python

Wouldn’t it be cool that apart from making apps, you can also produce physical things with your coding skills? This basic tutorial will show you how you can use the python Turtle library to create...

View Article


Image may be NSFW.
Clik here to view.

python知识点记录(一):

1.如何使print输出不换行: 在print语句末尾加上一个英文逗号。 2.安装第三方模块时,用pip和easy_install是一样的。下载一个 setuptools.exe 安装好就有easy_install,目录在 python 目录下的Scripts里面。 3.在对文件读写的时候,对字符串有个方法 strip() 可以把读取的字符串删除空白符(包括’\n’,’\r’,’\t’,’ ‘)。...

View Article


Ironclad: allow IronPython to import and use compiled CPython extensions

Overview Ironclad’s purpose is to allow Ironpython to transparently import and use compiled CPython extensions. The original project https://code.google.com/p/ironclad is no longer active. The last...

View Article

浅谈网站web框架的本质

一、web框架的本质 众所周知,对于所有的Web应用,本质上其实就是一个socket服务端,用户的浏览器其实就是一个socket客户端。 import socket def handle_request(client): buf = client.recv(1024) client.send("HTTP/1.1 200 OK\r\n\r\n") client.send("Hello, Seven")...

View Article

Image may be NSFW.
Clik here to view.

Python 绘制图表之我见 ---一个java程序员的看法

---------------- 环境: win 10 . python3.5 ----------------- 前言: 在学些java的GUI编程过程中,给我印象最深的有三点: 1) 所有与‘绘制’相关的方法应该在show() 方法调用之前调用 2) java 语言中会继承/调用一个与绘图相关的对象(JFrame之类)来处理’绘制‘ 工作 3) java中的GUI程序都是一层一层的panel...

View Article

Image may be NSFW.
Clik here to view.

How to get superior text processing in Python with Pynini

Dish (source: olafpictures via Pixabay ). It's hard to beat regular expressions for basic string processing. But for many problems, including some deceptively simple ones, we can get better...

View Article


Ultimate E-Commerce Concept | Overview

First of all, this will be a series of "higher-level" thoughts / processes rather than actual code. The code will be closed source to start with and may be released upon completion. Main Goals...

View Article

Image may be NSFW.
Clik here to view.

Learn To Create A Keylogger Using Python

In this article, we will be learning how to create a Simple Keylogger model using python. A Keylogger is a program that is used to monitor keystrokes. The keystrokes will be stored in a log file. A...

View Article


3: A Literal Assignment

3: A LiteralAssignment November 16, 2016 Leave a comment Book ref: page 39ff In the previous post you learned about python’s print feature*. In that post you used print to display the text: hello...

View Article

Output of Python Program | Set 4

Difficulty level : Intermediate Predict the output of following python Programs. Program 1: nameList = ['Harsh', 'Pratik', 'Bob', 'Dhruv']print nameList[1][-1] Output: k Explanation: The index...

View Article


range() vs xrange() in Python

range() and xrange() are two functions that could be used to iterate a certain number of times infor loops in python. In Python 3, there is no xrange , but the range function behaves like xrange in...

View Article

flaskbb 配置与 AD 登录

本站文章除注明转载外,均为本站原创或者翻译。 本站文章欢迎各种形式的转载,但请18岁以上的转载者注明文章出处,尊重我的劳动,也尊重你的智商; 本站部分原创和翻译文章提供markdown格式源码,欢迎使用 文章源码 进行转载; 本博客采用WPCMD 维护; 本文标题:flaskbb 配置与 AD 登录 本文链接: http://zengrong.net/post/2605.htm...

View Article

Image may be NSFW.
Clik here to view.

Python部落又出新品,九尾从可视化文件管理切入,致力数据提升效率服务

这是《猎云网》筛选报道的第 14623 家早期创业公司 【猎云网(微信:)武汉】11月16日报道(文/简爽)...

View Article
Browsing all 9596 articles
Browse latest View live