MySQL-python-1.2.3.win-amd64-py2.7.exepython已停止工作作

python27 mysql win7扩展安装 使用 - CSDN博客
MySQL-python-1.2.3.win-amd64-py2.7.exe 下载地址
/downloads
/archives/129
以下转自:/rollenholt/archive//2524327.html
坚持每天学一点,每天积累一点点,作为自己每天的业余收获,这个文章是我在吃饭的期间写的,利用自己零散的时间学了一下python操作MYSQL,所以整理一下。
我采用的是MySQLdb操作的MYSQL数据库。先来一个简单的例子吧:
&&&&conn=MySQLdb.connect(host='localhost',user='root',passwd='root',db='test',port=3306)
&&&&cur=conn.cursor()
&&&&cur.execute('select * from user')
&&&&cur.close()
&&&&conn.close()
MySQLdb.Error,e:
&&&&&print
&Mysql Error %d: %s&
% (e.args[0], e.args[1])
  请注意修改你的数据库,主机名,用户名,密码。
下面来大致演示一下插入数据,批量插入数据,更新数据的例子吧:
&&&&conn=MySQLdb.connect(host='localhost',user='root',passwd='root',port=3306)
&&&&cur=conn.cursor()
&&&&cur.execute('create database if not exists python')
&&&&conn.select_db('python')
&&&&cur.execute('create table test(id int,info varchar(20))')
&&&&value=[1,'hi
&&&&cur.execute('insert into test values(%s,%s)',value)
&&&&values=[]
range(20):
&&&&&&&&values.append((i,'hi rollen'+str(i)))
&&&&cur.executemany('insert into test values(%s,%s)',values)
&&&&cur.execute('update test set info=&I am rollen& where id=3')
&&&&cur.close()
&&&&conn.close()
MySQLdb.Error,e:
&&&&&print
&Mysql Error %d: %s&
% (e.args[0], e.args[1])
  请注意一定要有<mit()这句来提交事务,要不然不能真正的插入数据。
运行之后我的MySQL数据库的结果就不上图了。
&&&&conn=MySQLdb.connect(host='localhost',user='root',passwd='root',port=3306)
&&&&cur=conn.cursor()
&&&&conn.select_db('python')
&&&&count=cur.execute('select * from test')
'there has %s rows record'
&&&&result=cur.fetchone()
'ID: %s info %s'
&&&&results=cur.fetchmany(5)
&&&&&&&&print
&&&&cur.scroll(0,mode='absolute')
&&&&results=cur.fetchall()
&&&&&&&&print
&&&&cur.close()
&&&&conn.close()
MySQLdb.Error,e:
&&&&&print
&Mysql Error %d: %s&
% (e.args[0], e.args[1])
  运行结果就不贴了,太长了。
查询后中文会正确显示,但在数据库中却是乱码的。经过我从网上查找,发现用一个属性有可搞定:
在Python代码&
conn = MySQLdb.Connect(host='localhost', user='root', passwd='root', db='python')&中加一个属性:
conn = MySQLdb.Connect(host='localhost', user='root', passwd='root', db='python',charset='utf8')&
charset是要跟你数据库的编码一样,如果是数据库是gb2312 ,则写charset='gb2312'。
下面贴一下常用的函数:
然后,这个连接对象也提供了对事务操作的支持,标准的方法
commit() 提交
rollback() 回滚
cursor用来执行命令的方法:
callproc(self, procname, args):用来执行存储过程,接收的参数为存储过程名和参数列表,返回&#20540;为受影响的行数
execute(self, query, args):执行单条sql语句,接收的参数为sql语句本身和使用的参数列表,返回&#20540;为受影响的行数
executemany(self, query, args):执行单挑sql语句,但是重复执行参数列表里的参数,返回&#20540;为受影响的行数
nextset(self):移动到下一个结果集
cursor用来接收返回&#20540;的方法:
fetchall(self):接收全部的返回结果行.
fetchmany(self, size=None):接收size条返回结果行.如果size的&#20540;大于返回的结果行的数量,则会返回cursor.arraysize条数据.
fetchone(self):返回一条结果行.
scroll(self, value, mode='relative'):移动指针到某一行.如果mode='relative',则表示从当前所在行移动value条,如果 mode='absolute',则表示从结果集的第一行移动value条.
参考资料:本页面下载链接暂时失效,可到下载
is another Python
bindings for
is a core package for astronomy.
, memory efficient Python objects.
is a GUI automation toolkit.
, tools for internationalizing Python applications.
provide newer Python features and bug fixes to older versions of Python.
is a matplotlib toolkit for plotting 2D data on maps based on .
is a version control system.
(experimental) is a JCC generated wrapper for the
Java libraries.
and JVM.DLL in the PATH.
is a set of tools for biological computation.
provides an object type which efficiently represents an array of booleans.
is the next generation of NumPy.
provide access to matrices, Eulers, quaternions and vectors.
is a list-like type with better performance for large lists.
is a high performance compressor optimized for binary data.
is an implementation of the Grammar of Graphics for output to the HTML5 Canvas.
enables seamless interoperability between C++ and Python.
provides fast NumPy array functions written in Cython.
, binary diff and patch using the BSDIFF4-format.
, a chunked data container that can be compressed in-memory.
is a library providing cartographic tools.
, bindings for the
constraint solving toolkit.
is a package for correctly-rounded arbitrary precision decimal floating point arithmetic.
is an image analysis framework for fluorescence time-lapse microscopy.Requires , , , , , , ,
is software for quantitative analysis of biological images.
Requires , , , , , , ,
Run CellProfiler.py from the Python scripts directory.
enables access to databases using the ODBC API.
is a Foreign Function Interface for calling C code. Requires .
are bindings for the .
, the Computer Graphics Kit, is useful for dealing with 3D data of any kind.
is a template engine and code generation tool.
wraps Chromium's Compact Language Detector library.
provides a simple console interface.
measures code coverage of programs during test execution.
is an extension based on the
library. Unicode characters are not supported.
is a set of scripts and modules for freezing Python scripts into executable.
is a language for writing Python C extensions.
creates N-dimensional Delaunay triangulations using .
is a toolbox for analysis of MR diffusion imaging.
processes plaintext documentation into HTML, LaTeX, man-pages, open-document or XML.
is a library for fitting massive mixture models.
(experimental), bidings to the
C++ dynamic ndarray library.
is a programming language and framework for creating user interfaces with minimal effort.
Requires , , , and PLY.
is a tool for generating module API documentation.
, the Enthought Tool Suite, is a collection of components for building scientific applications.
Includes Traits, Chaco, etc. and , which requires .
provides fast hierarchical clustering routines.
displays the Python traceback on a crash.
is OGR's neater API. Requires .
is a finite volume PDE solver. Requires .
is a library for manipulating fonts ().
, the Geospatial Data Abstraction Library, is a translator library for raster geospatial data formats.Note: This distribution includes all required files. Do not use together with OSGeo4W or gdalwin32.
is a coroutine-based networking library based on greenlet and .
supports fast multiple-precision arithmetic. Wraps the , , and
libraries.
allows lightweight in-process concurrent programming.
is an efficient 2D plotting library. Requires .
is a general-purpose interface to the
is a tool for working with digital holograms and light scattering.
provides infrastructure to process data from high-throughput sequencing assays.
is an interactive learning and segmentation toolkit.
is an interactive mimizer based on .
reads images into numpy arrays.
, open-source software from the . Requires .
is an interactive computing environment.
Some functions require , , , , , , , , , ,
or , and pandoc.
is a wrapper for the Java Native Interface.
is a C++ code generator that produces a C++ object interface wrapping a Java library via Java's Native Interface (JNI).
Note: Adjust "jcc\config.py" for the target system.
is a text templating engine.
allows full access to Java class libraries.
serializer/deserializer.
is a library for developing multi-touch applications. Requires .
is an efficient implementation of the
constraint solving algorithm.
, quantum transport simulations made easy. Requires
aka larry, the labeled numpy array.
reads and writes the LiDAR (Light Detection And Ranging) format.
is a library for large linear classification. Requires .
installs the libpython??.a and libmsvcr??.a libraries to Python\libs. For use with MinGW64/Rtools.
reads, writes, manipulates, translates, and validates SBML (Systems Biology Markup Language) files and data streams.
is a library for Support Vector Machines.
are bindings for the
libraries.
is a line-by-line profiler.
provides linked list data structures.
provides portable math functions.
is a wrapper around the
compiler library.
is a least-squares minimization with constraints.
is a Mixed Integer Linear Programming (MILP) solver.
, utilities for nonlinear least-squares fits.
is a binding for the
libraries.
is a set of functions for image processing.
is a fast templating language.
provides static memory-efficient Trie-like structures.
implements a XML/HTML/XHTML Markup safe string.
is a 2D plotting library
Requires , , , , , and optionally , , , , , , ghostscript, miktex, ffmpeg, mencoder, avconv, or imagemagick.
, the Modular toolkit for Data Processing.
is a fast scalable distributed SCM (revision control, version control) system.
offers quality triangular and tetrahedral mesh generation.
is a framework to manipulate and analyze python ast's and bytecode.
is a machine learning toolkit.
, the Python Macromolecular Library.
, Chinese word segmentation.
, the Molecular Modelling Toolkit, is a library for molecular simulation applications.
adapter module for the . Linked against the VS10 (ap22) and VC11 (ap24) binaries from .
provides bindings of the Message Passing Interface (MPI) standard. Includes .
, MessagePack, is an efficient binary serialization format.
contains packages such as mxDateTime, mxTextTools, mxTools, etc.
is a Python database API 2.0 interface for the
is an interface to the natgrid C library for gridding irregularly spaced data.
reads and writes
is a package for complex networks.
, access a cacophony of neuro-imaging file formats.
is for analysis of structural and functional neuroimaging data. Requires .
, workflows and interfaces for neuroimaging packages.
is a library for time-series analysis of data from neuroscience experiments.
is a library for nonlinear optimization.
, the Natural Language Toolkit. Requires .
is an interactive analysis program for Molecular Dynamics simulations.
generates Perlin noise.
extends unittest to make testing easier.
is a NumPy aware dynamic compiler. Requires , ,
is deprecated, superseded by .
is a fast numerical array expression evaluator. Requires .
is a fundamental package needed for scientific computing with Python.
Note: these builds are not completely compatible with the official SciPy binaries.
Note: the MKL builds are linked statically to Intel's high performance
Note: the unoptimized builds are less tested and not recommended for general use.
(obsolete) provides an alternative build system for numpy.
, the Open Dynamics Engine, is a high performance library for simulating rigid body dynamics.
, the open source chemistry toolbox.
is a real time computer vision library. Built with IPP, TBB, and OpenCL.
are bindings for ILM's
image file format.
is a library for reading and writing images with emphasis on animation and visual effects. Includes .
is a machine learning and interactive data mining toolbox.
Requires , , and .
is a set of bindings for the
is a cross-section and time series data analysis toolkit.
Requires , , , and optionally , , ,
and other .
is a package for describing statistical models and for building design matrices.
is yet another wrapper for .
is a replacement for , the Python Image Library, which provides image processing functionality and supports many file formats.Note: use `from PIL import Image` instead of `import Image`.
installs packages. An easy_install replacement.
is a 2D planar geometry library.
handles polygonal shapes in 2D.Note: This library is .
provides information on running processes and system utilization.
database adapter. Built against PostgreSQL 9.3.2.
is an LP modeler using the
is a library for flow cytometry.
driver and tools library.
converts Python scripts into executable Windows programs.
provides bindings for the
computer graphics interchange framework. Includes .
provides Action Message Format (AMF) support.
is a library of Algebraic Multigrid (AMG) solvers.
provides bindings for the
library. Includes ASIO, DS, WMME, WASAPI, WDMKS support.
is a wrapper around system Bluetooth resources.
is a 2D physics library based on .
is a set of bindings for the
graphics library. These builds are not compatible with .
provides support for reading and writing
implements clustering methods for gene expression data analysis.
is a software library for genomic biology.
, bindings to the
SAT solver.
is a complete parser for the C language.
gives access to Nvidia's parallel computing API. Requires , the
and compatible drivers.
is a interface to the
is a Win32 debugger interface. Includes the
disassembly library.
is a numerical solver for systems of delay differential equations (DDEs).
is a library for electronic design automation.
provides scientific-grade astronomical computations.
provides bindings to the
library for image metadata.
is a wrapper around the
C library. Includes precompiled .
are bindings to the
C library.
provides an interface to
formatted files.Note: this package is now part of .
is a wrapper for the
cross-platform graphical user-interface library.
is a library for writing games based on the
is a set of bindings to the
shared library.
is a cross-platform windowing and multimedia library using .
is a generic syntax highlighter.
is an interface to the
graph layout and visualization package.
Requires .
is a wrapper for the
Requires the
is an interface to the NCSA
is a wrapper for global input hooks in Windows.
(International Components for Unicode) library.
is an ISAPI extension for IIS.
is a wrapper for the
library. Requires .
is a package for reading and writing TIFF and LSM files.
, bindings for the
compression library.
provides an interface to MATLAB(tm) 2011b.
is a Markov chain Monte Carlo. Requires .
is a toolkit for X-ray fluorescence data analysis.
is a module for media files manipulations.
embeds Python in a MATLAB(tm) 2011b extension module.
provides an interface to Minuit for minimizing general N-dimensional functions.
implements algorithms and data structures for data mining applications. Using
sources from .Note: All modules are in the pymix namespace, e.g. use `from pymix import mixture`.
(tm) is a molecular visualization product for rendering and animating 3D molecular structures.PyMOL is a trademark of Schrodinger, LLC.
is a driver for the
is a simple MS SQL Python extension module based on .
implements a multi-taper Fourier spectral estimator. Requires .
performs multivariate pattern analysis.
provides access to NIfTI and ANALYZE files.
is an Open Database Connectivity (ODBC) adapter.
gives access to the OpenCL parallel computing API. Requires ,
and an OpenCL 1.2 compatible driver (e.g. from ).
provides bindings to OpenGL, GLUT, and GLE.
provides acceleration of common operations for slow points in PyOpenGL.
creates and executes simple grammars.
is an interface to the
is a set of bindings for the
application framework.
plots data with Numpy and PyQt. Requires .
is a ctypes-based readline for Windows.
, a scalable and efficient string implementation.
is a fast, validating XML Parser.
encapsulates the access for the serial port.
provides bindings for , the Simple and Fast Multimedia Library.
reads and writes ESRI Shapefiles.
provides bindings for the
cross-platform application and UI framework.
is a fast sparse matrix library. Requires .
is a spherical harmonic transform module based on . Requires .
is a DB-API 2.0 interface for
databases.
calculates stemmed forms of words.
is a package for managing hierarchical datasets based on the
Requires .
implements a very fast
encoder/decoder. Using sources from .
extends the standard datetime module. Requires .
is an interface to the
high performance graph library. Requires .
provides an object-oriented API to access LDAP directory servers via .
computes string distances and similarities.
, bindings for the
data compression library.
compression library.
is a Cython wrapper for the
solver suite.
provides an object-oriented interface to .
provides integration with the .NET Common Language Runtime (CLR) and an application scripting tool for .NET. Requires the .
is a collection of tools. Includes .
is an implementation of a Ternary Search Tree.
provides world timezone definitions, modern and historical.
provides an interface to the . Linked against version 2.08.28.
, bindings to the "Virtual Instrument Software Architecture" .
is a package for discrete wavelet transforms. Using the fork by
is a wrapper for the FITS
library.Note: this package is now part of .
provides extensions for Windows.
parser and emitter.
is a binding to the
messaging library. Built with OpenPGM and Sodium.
converts quickly between QImages and numpy.ndarrays. Requires .
is a library for quantitative finance.
is a Financial Information eXchange (FIX) protocol engine.
provides clean and fast and geospatial raster I/O. Requires .
is a wrapper for the .
is an alternative regular expression module, to replace re.
is a PDF generation toolkit.
is a HTTP library for human beings.
provides access to the
for statistical computing and graphics. Requires . Experimental!.
is a wrapper for the
provides advanced spatial indexing features based on .
is a collection of modules for scientific computing.
provides image processing routines for SciPy.
integrates classic machine learning algorithms. Requires .
is a wrapper for the Approximate Nearest Neighbor
library. Deprecated in favor of scipy.spatial.
is a package for audio file IO using numpy arrays. Linked against .
is a triangulation and interpolation tool.
manipulates hydro-climatologic data. Requires .
adds ordinary differential equation (ODE) solvers to . Requires .
is a module for high quality audio resampling.
performs light scattering simulations. Requires .
provides classes and functions for manipulating, reporting, and plotting time series of various frequencies.
is an interface to the
unsymmetric sparse linear system solver. Requires .
implements the line integral convolution algorithm to plot vector fields.
is software for mathematics, science, and engineering. Requires .Scipy_umfpack adds the scipy.sparse.linalg.dsolve.umfpack._umfpack extension, which is linked to GPL licensed UMFPACK and AMD libraries.
provides functions for agglomerative clustering.
(experimental) is a meta package that contains , , , , , ,
and many of their dependencies (setuptools, dateutil, pytz, six, pillow, pygments, jinja2, markupsafe, statsmodels, pytables, numexpr, bottleneck, tornado, pyzmq, gmpy2, pyside, etc).
Notes: use with a fresh CPython installation only. Created with .
are useful tools for scientific computing.
, a software construction tool.
can be used to send keystrokes to the active window.
downloads, builds, installs, upgrades, and uninstalls Python packages.
, simple finite elements in Python.
is a package for creation, manipulation, and analysis of planar geometry objects based on .
is a lexing package based on .
provides an easy-access layer to the .
is a simple, fast, extensible
encoder/decoder.
is a Python 2 and 3 compatibility library.
is a wrapper for the
wraps , a library for computing Singular Value Decompositions.
is a documentation generator.
is a scientific Python development environment. Requires
is a SQL toolkit and Object Relational Mapper.
provides classes and functions for the estimation of statistical models. Requires
is a stochastic engine for pathway simulation.
is a library for symbolic mathematics.
is a wrapper for the
Technical Analysis Library.
is an optimizing compiler for evaluating mathematical expressions.
is a software framework for scalable cross-language services development.
, arrays of numbers optimized for small sizes.
is a scalable, non-blocking web server. Requires .
fits time-resolved fluorescence decays.
provides an interface to
image acquisition devices.
is an event-driven networking engine.
is an ultra-fast
encoder and decoder.
is a ultra fast MySQL driver.
is a GUI scientific plotting and graphing package. Requires .
is an extension for accessing video devices.
, Vision with Generic Algorithms, is a computer vision library. Requires .
is a virtual Python environment builder.
produces stimuli for vision research experiments.
, OpenGL-based interactive visualization.
is a library for visualization of 1D to 4D data in an object oriented way.
is a GUI for browsing and editing files in PyTables and HDF5 formats.
contains modules developed at the Laboratory for Fluorescence Dynamics.
, 3D programming for ordinary mortals. Includes the , , and
, the Visualization Toolkit, is a software system for 3D computer graphics, image processing, and visualization.Note: VTK-Qt requires .
provides bindings to the
cross-platform toolkit. The wxPython-common package is required.
, the Zope Object Database, provides an object-oriented database.
provides an implementation of object interfaces for Python.
Uncategorized Files
Other useful packages and applications not currently available on this page
implements the Adaptive Image Deconvolution Algorithm.
is a cross-platform numerical analysis and data processing library.
is a package for solving ordinary differential equations. Binaries cannot be distributed due to GPL restrictions.
is a molecular modeling and visualization application.
is a pythonic packaging solution for Python software.
, arbitrary precision correctly-rounded floating point arithmetic, via MPFR.
performs estimation of discrete choice models.
is software for analysis and visualization of multidimensional biomedical images.
implements automatic differentiation in forward and adjoint modes.
is an HDF5 data format for cell-based assays in high-throughput microscopy.
are bindings for the .
computes colocalization coefficients from confocal images.
is a package for convex optimization. Binaries cannot be distributed due to GPL restrictions.
is a dataflow application builder for the rapid prototyping of medical visualization and image processing techniques.
is a high-level Web framework.
is a greyscale scientific image processing suite with a focus on transmission electron microscopy. Supports many .
is a toolkit for microscopy image analysis based using .
is a feed-forward neural network. Binaries cannot be distributed due to GPL restrictions.
is a GObject-based wrapper around the
library for image metadata.
, the General Hidden Markov Model library.
, fast OpenGL numpy visualization.
is an efficient module for manipulation and statistical analysis of graphs.
is a library for analysing and visualising meteorological and oceanographic data sets.
, the Insight Segmentation and Registration Toolkit, is a software system for image analysis.
calculates multi-taper windowed and time-frequency reassignment spectrograms. Binaries cannot be distributed due to GPL restrictions.
is a complete wrapper for . Requires .
is a framework that supports high-performance computing and visualization of scientific data.
is a library for scientific data visualization.
is an mass spectrometry tool.
allows to control microscope hardware via .
, superresolution fluorescence microscopy of multicellular organisms.
is yet another OpenSSL wrapper.
is a library for generating 2D animations.
is a testing and learning environment for PyOpenGL.
provides access to the Xbox Kinect device. Requires .
is a Multidisciplinary Design Analysis and Optimization (MDAO) framework.
is a package for Particle Image Velocimetry (PIV).
reads whole-slide images, high resolution images exceeding RAM sizes.
is a framework for 3D rendering and game development.
performs analysis of intracellular particle motility and cytoskeletal polarity.
implements the Gaussian peak detection described in Segr?? et al.
performs modal analysis of microstructured optical fibers. Binaries cannot be distributed due to GPL restrictions.
is a library for the storage and processing of volumetric environments.
is a platform for image analysis and algorithm development. Includes HIS, SDT, SIF, and SPE file readers.
, software for psychology and neuroscience.
is a wrapper of OpenBSD's Blowfish password hashing code.
is a high-level audio interface using the
sound library.
provides an interface to the CGNS/SIDS data model.
is a versatile tool for FCS data analysis.
provides cryptographic modules.
is a dynamical systems modeling, simulation and analysis environment.
is a wrapper for , a solution to record, convert and stream audio and video.
interfaces to a
is a module for reading
meteorological files.
provides an interface for the .
, bindings for the
multimedia framework.
is a backend compiler for high-level typed code.
, the Python Microscopy Environment, provides image acquisition and data analysis functionality for widefield microscopy applications.
is a digital signal processing module.
is a set of bindings for the .
is an interface to the
library. Requires .
is a module for reading and manipulating
nucleotide sequence alignment files.
reads Andor SIF multi-channel image files.
provides bindings for the
suite of solvers.
interfaces the
version control system.
is an interface to the
3D graphics library.
, a marching cubes iso-surface implementation.
is a 3D CAD/CAE/PLM development framework.
simulates the dynamics of open quantum systems. Binaries cannot be distributed due to GPL restrictions.
provides an interface with the
data analysis framework on top of .
is a modeling and fitting application.
is a framework for building computer vision applications.
tracks stick-like objects with high resolution. Includes a Nikon ND2 reader.
is a wrapper for selected
routines. Binaries cannot be distributed due to GPL restrictions.
tools for the space science community.
computes a deformation function between images (image registration).
provides a general astronomical data analysis infrastructure.
is an image processing library with no image size limits.
, astrophysical simulation analysis and visualization.}

我要回帖

更多关于 python amd64 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信