Re: Moving to an OOP model from an classically imperitive one
> [snip] > > Could you make the program name unique just by combining it with the > > repository name in a single string? In my case I cannot. But there is a larger reason why I wouldn't do this: It would mean adding a special character that could not be included in the repository name, that is, if I were to create a "unique-program-name" string which was of the format repo+"-"+programName then the repo name could not have the "-" symbol in it. Tim -- https://mail.python.org/mailman/listinfo/python-list
Re: Moving to an OOP model from an classically imperitive one
> I'm curious what these practical reasons are. One my smallest source files > has 870 lines in it, my largest nearly 9000. > > > > If the problem is your editor, you should seriously consider switching. > I think that the main reasons for doing so are as follows: git status provides much more usefull output when the source files are separate. If all your code is in one file, than git status tells you nothing about what has changed, yet git diff will provide you with overly verbose output. The seccond reason is that when refactoring code, it is much easier to manage a todo list when one knows which files have been processed already/what needs to be processed. This is especially true if the refactor will take several days or be done by several people. Tim -- https://mail.python.org/mailman/listinfo/python-list
Re: Moving to an OOP model from an classically imperitive one
On Thu, Apr 24, 2014 at 5:21 PM, wrote: >> [snip] >> >> Could you make the program name unique just by combining it with the >> >> repository name in a single string? > > In my case I cannot. But there is a larger reason why I wouldn't do this: > It would mean adding a special character that could not be included in the > repository name, that is, if I were to create a "unique-program-name" string > which was of the format repo+"-"+programName then the repo name could not > have the "-" symbol in it. > Can you, then, simply substitute a tuple for the string? Instead of comparing program name strings, compare tuples of (repo, program_name) - it should work just fine. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
ANN: eGenix mxODBC Connect 2.0.5 - Python ODBC Database Interface
ANNOUNCING
eGenix.com mxODBC Connect
Python ODBC Database Interface
Version 2.0.5
mxODBC Connect is our commercially supported client-server product for
connecting Python applications to relational databases
in a truly platform independent way.
This announcement is also available on our web-site for online reading:
http://www.egenix.com/company/news/eGenix-mxODBC-Connect-2.0.5-GA.html
INTRODUCTION
The mxODBC Connect Database Interface for Python allows users to
easily connect Python applications to all major databases on the
market today in a highly portable, convenient and secure way.
Python Database Connectivity the Easy Way
-
Unlike our mxODBC Python extension, mxODBC Connect is designed as
client-server application, so you no longer need to find production
quality ODBC drivers for all the platforms you target with your Python
application.
Instead you use an easy to install royalty-free Python client library
which connects directly to the mxODBC Connect database server over the
network.
This makes mxODBC Connect a great basis for writing cross-platform
multi-tier database applications and utilities in Python, especially
if you run applications that need to communicate with databases such
as MS SQL Server and MS Access, Oracle Database, IBM DB2 and Informix,
Sybase ASE and Sybase Anywhere, MySQL, PostgreSQL, SAP MaxDB and many
more, that run on Windows or Linux machines.
Ideal for Database Driven Client Applications
-
By removing the need to install and configure ODBC drivers on the
client side and dealing with complicated network setups for each set
of drivers, mxODBC Connect greatly simplifies deployment of database
driven client applications, while at the same time making the network
communication between client and database server more efficient and
more secure.
For more information, please have a look at the mxODBC Connect product
page, in particular, the full list of available features.
For more information, please see the product page:
http://www.egenix.com/products/python/mxODBCConnect/
NEWS
The 2.0.5 release of mxODBC Connect includes the following
enhancements and fixes:
Security Enhancements
-
* Upgraded client and server to the most recent eGenix pyOpenSSL
Distribution 0.13.3.1.0.1.7 (see http://egenix.com/go54 for
details) to address the recently found Heartbleed Bug in
OpenSSL 1.0.1 - 1.0.1f:
- CVE-2014-0160 ("Heartbleed Bug"): A missing bounds check in the
handling of the TLS heartbeat extension can be used to reveal
up to 64kB of memory to a connected client or server. This issue
did not affect versions of OpenSSL prior to 1.0.1. For information,
also have a look at the Heartbleed Bug website:
http://heartbleed.com/
For the full set of changes, please check the mxODBC Connect
change log:
http://www.egenix.com/products/python/mxODBCConnect/changelog.html
mxODBC Connect 2.0 Highlights
-
mxODBC Connect 2.0 was released on 2012-08-20. These are the most
important highlights:
* mxODBC Connect Server now uses mxODBC 3.2 internally and makes its
API available in the mxODBC Connect Client. This is a major step
forward from the mxODBC 3.0 version used in mxODBC Connect Server
1.0.
* We've added native Windows x64 builds.
* mxODBC Connect Client now integrates directly with gevent, allowing
client applications to run asynchronous tasks while performing
remote database queries.
Please see the release announcement for full details:
http://www.egenix.com/company/news/eGenix-mxODBC-Connect-2.0.0-GA.html
UPGRADING
You are encouraged to upgrade to this latest mxODBC Connect release.
When upgrading, please always upgrade both the server and the client
installations to the same version - even for patch level releases.
Customers who have purchased mxODBC Connect 2.0 licenses can continue
to use their licenses with this patch level release.
Customers who have purchased mxODBC Connect 1.x licenses can request
20% discount coupons for upgrade purchases. Please contact the
eGenix.com Sales Team ([email protected]) with your existing license
serials for details.
Users of our stand-alone mxODBC product will have to purchase new
licenses from our online shop in order to use mxODBC Connect.
You can request 30-day evaluation licenses by visiting our web-site
or writing to [email protected], stating your name (or the name of the
company) and the number of eval licenses that you need.
http://www.egenix.com/
Re: Moving to an OOP model from an classically imperitive one
On Thu, 24 Apr 2014 00:21:18 -0700, tim.thelion wrote: >> [snip] >> >> Could you make the program name unique just by combining it with the >> >> repository name in a single string? > > In my case I cannot. But there is a larger reason why I wouldn't do > this: It would mean adding a special character that could not be > included in the repository name, Do you support \n or \r or \0 in repo names? If not, then there you go, three special characters to choose from. But I suspect that a tuple of (repo_name, program_name) will be better. -- Steven -- https://mail.python.org/mailman/listinfo/python-list
ANN: Python Meeting Düsseldorf - 29.04.2014
[This announcement is in German since it targets a local user group meeting in Düsseldorf, Germany] ANKÜNDIGUNG Python Meeting Düsseldorf http://pyddf.de/ Ein Treffen von Python Enthusiasten und Interessierten in ungezwungener Atmosphäre. Dienstag, 29.04.2014, 19:00 Uhr Raum 1, 2.OG im Bürgerhaus Stadtteilzentrum Bilk Düsseldorfer Arcaden, Bachstr. 145, 40217 Düsseldorf Diese Nachricht ist auch online verfügbar: http://www.egenix.com/company/news/Python-Meeting-Duesseldorf-2014-04-29 NEUIGKEITEN * Bereits angemeldete Vorträge: Charlie Clark "Status openpyxl, bzw. Lösung neuer Probleme" "IndexedList - eine Liste optimiert für "in" Abfragen" "Bericht von der PyCon 2014 in Montreal" Marc-Andre Lemburg "Python Code mit lib2to3 modernisieren" "DDOS Attacken mit Python bekämpfen" "Bericht von der FOSDEM 2014" Wir suchen noch weitere Vorträge. Bei Interesse, bitte unter [email protected] melden. * Geänderte Startzeit: Dieses Mal treffen wir uns erst um 19:00 Uhr im Bürgerhaus in den Düsseldorfer Arcaden, da wir keinen Termin für 18 Uhr bekommen haben. Hier eine kurze Beschreibung: Das Bürgerhaus teilt sich den Eingang mit dem Schwimmbad und befindet sich an der Seite der Tiefgarageneinfahrt der Düsseldorfer Arcaden. Über dem Eingang steht ein großes Schwimm'in Bilk Logo. Hinter der Tür direkt links zu den zwei Aufzügen, dann in den 2. Stock hochfahren. Der Eingang zum Raum 1 liegt direkt links, wenn man aus dem Aufzug kommt. Google Street View: http://bit.ly/11sCfiw EINLEITUNG Das Python Meeting Düsseldorf ist eine regelmäßige Veranstaltung in Düsseldorf, die sich an Python Begeisterte aus der Region wendet: * http://pyddf.de/ Einen guten Überblick über die Vorträge bietet unser YouTube-Kanal, auf dem wir die Vorträge nach den Meetings veröffentlichen: * http://www.youtube.com/pyddf/ Veranstaltet wird das Meeting von der eGenix.com GmbH, Langenfeld, in Zusammenarbeit mit Clark Consulting & Research, Düsseldorf: * http://www.egenix.com/ * http://www.clark-consulting.eu/ PROGRAMM Das Python Meeting Düsseldorf nutzt eine Mischung aus Open Space und Lightning Talks, wobei die Gewitter bei uns auch schon mal 20 Minuten dauern können ;-). Lightning Talks können vorher angemeldet werden, oder auch spontan während des Treffens eingebracht werden. Ein Beamer mit XGA Auflösung steht zur Verfügung. Folien bitte als PDF auf USB Stick mitbringen. Lightning Talk Anmeldung bitte formlos per EMail an [email protected] KOSTENBETEILIGUNG Das Python Meeting Düsseldorf wird von Python Nutzern für Python Nutzer veranstaltet. Um die Kosten zumindest teilweise zu refinanzieren, bitten wir die Teilnehmer um einen Beitrag in Höhe von EUR 10,00 inkl. 19% Mwst, Schüler und Studenten zahlen EUR 5,00 inkl. 19% Mwst. Wir möchten alle Teilnehmer bitten, den Betrag in bar mitzubringen. ANMELDUNG Da wir nur für ca. 20 Personen Sitzplätze haben, möchten wir bitten, sich per EMail anzumelden. Damit wird keine Verpflichtung eingegangen. Es erleichtert uns allerdings die Planung. Meeting Anmeldung bitte formlos per EMail an [email protected] WEITERE INFORMATIONEN Weitere Informationen finden Sie auf der Webseite des Meetings: http://pyddf.de/ Mit freundlichen Grüßen, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ...http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/ ::: Try our new mxODBC.Connect Python Database Interface for free ! eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ -- https://mail.python.org/mailman/listinfo/python-list
ANN: Wing IDE 5.0.6 released
Hi, Wingware has released version 5.0.6 of Wing IDE, our cross-platform integrated development environment for the Python programming language. Wing IDE includes a professional quality code editor with vi, emacs, visual studio, and other key bindings, auto-completion, call tips, goto-definition, find uses, refactoring, context-aware auto-editing, a powerful graphical debugger, version control, unit testing, search, and many other features. For details see http://wingware.com/ Changes in this minor release include: * New auto-editing operation for starting a new block when ':' is pressed while a range of lines is selected. This also auto-enters 'except:' if 'try' is then entered. * Offer completion on argument names in a def * New Editor > Block Comment Style preference option to use PEP8 style indented '# ' for commenting out code * On OS X, Wing no longer quits when the last window is closed, to match the standard for Mac applications * Restart correctly after downloading patches * Pick up changes made in the debug dialog when debugging a named entry point * Avoid hiding file selection auto-completer popup too soon * Set sys.path[0] correctly in Python Shell on OS X and Linux * Fix cleanup after auto-invocation that spans multiple lines * About 15 other bug fixes For details see http://wingware.com/pub/wingide/5.0.6/CHANGELOG.txt A summary of new features in Wing 5: * Redesigned GUI based on Qt and PySide * Native GUI on OS X (and better overall OS-native look and feel) * Tools and editors can be dragged around * Toolbar and editor and Project context menus are configurable * Optional mode that opens different sets of files in each editor split * Sharable color palettes and syntax highlighting configurations * Auto-editing is on by default (except some operations that have a learning curve) * Named file sets * Sharable launch configurations * Named entry points * More control over unit testing environment * Lockable editor splits * Initial preferences dialog for new users * Support for Python 3.4 * Support for Django 1.6 * Support for matplotlib on Anaconda and with MacOSX backend * Improved Source Assistant with PEP 287 docstring rendering and return types * Improved integrated and PDF documentation For more information on what's new in Wing 5, see http://wingware.com/wingide/whatsnew Free trial: http://wingware.com/wingide/trial Downloads: http://wingware.com/downloads Feature list: http://wingware.com/wingide/features Sales: http://wingware.com/store/purchase Upgrades: https://wingware.com/store/upgrade Questions? Don't hesitate to email us at [email protected]. Thanks, -- Stephan Deibel Wingware | Python IDE The Intelligent Development Environment for Python Programmers wingware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: why my cur.executescript can not run?
length power wrote:
> When cur.execute be used, i get right output.
>
> import sqlite3
> con=sqlite3.connect(":memory:")
> cur=con.cursor()
> sql1="attach database 'g:\\workspace\\data\\Cinfo.sqlite' as Cinfo;"
> sql2="select * from Cinfo.ipo;"
> cur.execute(sql1)
> cur.execute(sql2)
> con.commit()
> x=cur.fetchall()print(x)
>
> When i change it into cur.executescript, nothing can get.
>
> import sqlite3
> con=sqlite3.connect(":memory:")
> cur=con.cursor()
> sql_script="""
> attach database 'g:\\workspace\\data\\Cinfo.sqlite' as Cinfo;
> select * from Cinfo.ipo;"""
> cur.executescript(sql_script)
> con.commit()
> x=cur.fetchall()print(x)
>
> I want to know why?
The difference has nothing to do with your specific code, as the following
minimal example shows:
>>> import sqlite3
>>> cs = sqlite3.connect(":memory:").cursor()
>>> cs.execute("select 42;").fetchall()
[(42,)]
>>> cs.executescript("select 42;").fetchall()
[]
The docs don't say so explicitly, but my guess is that executescript() is
meant to execute sql statements for their side effect (like populating a
database) only, not to return a result. Please file a bug report if you want
a clarification in the docs.
--
https://mail.python.org/mailman/listinfo/python-list
Re: Installing PyGame?
On Saturday, June 8, 2013 9:37:44 PM UTC+5:30, Eam onn wrote: > Perhaps this isn't the right place to post this, but it's the only place I > could find. > > > > I asked yesterday or the day before about Python Game Development, and have > found a few tutorials on PyGame. Now I have a bigger problem: HOW THE HECK DO > I INSTALL PYGAME!?!?! System Details: > > > > * Mac OS X 10.8.4 Mountain Lion > > * 4GB DDR3 RAM > > > > I do have Window's installed, as well as Ubuntu 11.04 but I would like to use > Mac OS X if possible. I've tried using MacPorts, Fink, the Mac DMG, source > installing, installing NumPY, just about every way possible. I can't seem to > get it working, I keep getting an error in all my versions of IDLE. I've > tried: > > > > * IDLE 2.5 > > * IDLE 2.7.2 > > * IDLE 2.7.3 > > * IDLE 3.1 > > * IDLE 3.3.1 > > > > None of the versions work. I'm using PyGame 1.9.1. > > > > Thanks! Any help is appreciated! -- https://mail.python.org/mailman/listinfo/python-list
Re: Moving to an OOP model from an classically imperitive one
> A reasonable compromise might be to keep the *data* assocated > > with a SubuserProgram in a class, maybe together with a few > > methods that are tightly coupled to it, but have the major > > pieces of functionality such as install() implemented by > > separate functions that operate *on* the class, rather than > > being inside it. > I think this is sound advice. I'm still not sure what I'll come up with. One of the other reasons why an OOP model might be right for me is that of caching. I currently load a lot of attributes regarding programs from disk, and I do so multiple times, I could either pass those attributes around, OR, using a class, I could store those attributes in the object after loading them just once. I have no experience with OOP except in the domain of GUIs(where it seems inescapable, all major toolkits use OOP), so I'm not yet sure how this will turn out. Tim -- https://mail.python.org/mailman/listinfo/python-list
Re: Installing PyGame?
On 4/24/2014 11:32 AM, [email protected] wrote: When you post, please do more than just quote. If you are relaying a private email, please say so. On Saturday, June 8, 2013 9:37:44 PM UTC+5:30, Eam onn wrote: I did not see the original post, if indeed there was a public one. [snip pygame/numpy problems] ... I do have Window's installed, as well as Ubuntu 11.04 but I would like to use Mac OS X if possible. I've tried using MacPorts, Fink, the Mac DMG, source installing, installing NumPY, just about every way possible. I can't seem to get it working, I keep getting an error in all my versions of IDLE. I've tried: * IDLE 2.5 * IDLE 2.7.2 * IDLE 2.7.3 * IDLE 3.1 * IDLE 3.3.1 Idle depends on tkinter. Tkinter depends on having a tcl/tk that works, at least for tkinter. The following page has essential info about getting the right tcl/tk installed. https://www.python.org/download/mac/tcltk -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list
Re: Installing PyGame?
On Thu, 24 Apr 2014 15:15:09 -0400, Terry Reedy wrote: > On 4/24/2014 11:32 AM, [email protected] wrote: > > When you post, please do more than just quote. If you are relaying a > private email, please say so. > >> On Saturday, June 8, 2013 9:37:44 PM UTC+5:30, Eam onn wrote: > > I did not see the original post, if indeed there was a public one. Check out the date. It was over ten months ago. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list
Re: Installing PyGame?
[email protected] wrote: On Saturday, June 8, 2013 9:37:44 PM UTC+5:30, Eam onn wrote: Now I have a bigger problem: HOW THE HECK DO I INSTALL PYGAME!?!?! System Details: I've tried using MacPorts, Fink, the Mac DMG, source installing, installing NumPY, just about every way possible. My advice would be to steer clear of things like Fink and MacPorts and do things the native MacOSX way wherever possible. That means using a framework installation of Python and framework versions of the various libraries that PyGame uses. There are a number of steps to getting pygame working: 1) Make sure you have a working framework installation of an appropriate version of Python. I installed mine from source, but a binary installation should work too. Depending on your MacOSX version, the system python might be sufficient. 2) Install framework versions of the SDL library and other libraries that pygame uses. You may need to hunt around a bit, but you should be able to find DMG installers for all of these. In my /Library/Frameworks I have: SDL.framework SDL-QD.framework SDL_image.framework SDL_mixer.framework SDL_net.framework SDL_ttf.framework 3) Install pygame itself with the usual 'python setup.py install'. If you have all the relevant libraries, the installer will auto detect them and use them. At the end, it will tell you which ones it couldn't find. Pygame will work without some of them, but those features won't be available. You can add more libraries and run setup.py again if you need to. 4) Specific games may require other Python libraries such as Numpy etc. -- Greg -- https://mail.python.org/mailman/listinfo/python-list
Re: Installing PyGame?
Terry Reedy wrote: Idle depends on tkinter. Tkinter depends on having a tcl/tk that works, at least for tkinter. The following page has essential info about getting the right tcl/tk installed. https://www.python.org/download/mac/tcltk Also keep in mind that you don't *have* to use IDLE at all. I do all my Python development on MacOSX using BBEdit Lite and the Terminal. If nothing else, you can try out pygame that way to see whether your problem is a pygame-related one or something else. -- Greg -- https://mail.python.org/mailman/listinfo/python-list
Re: Installing PyGame?
In article , Gregory Ewing wrote: > My advice would be to steer clear of things like Fink and MacPorts > and do things the native MacOSX way wherever possible. That means > using a framework installation of Python and framework versions of > the various libraries that PyGame uses. FYI, MacPorts Pythons are framework installations. And I disagree that installing a bunch of disparate software from various sources via binary installers and/or source is to be preferred to a modern third-party package manager on OS X like MacPorts or Homebrew. That's just setting yourself up for a long-term maintenance headache. What could be easier than: sudo port install py27-game -- Ned Deily, [email protected] -- https://mail.python.org/mailman/listinfo/python-list
Re: retrieve source code from code object as returned by compile()
On Thursday, April 24, 2014 1:53:38 PM UTC+8, Gregory Ewing wrote: > Alternatively you could create a .pyc file out of the code > object and then use Easy Python Decompiler on that. The > following snippet of code should do that: > > (Taken from: > > http://stackoverflow.com/questions/8627835/generate-pyc-from-python-ast) Woohoo! Success! Thank you Greg! -- https://mail.python.org/mailman/listinfo/python-list
Re: Installing PyGame?
On Thu, Apr 24, 2014 at 9:38 PM, Ned Deily wrote: > In article , > Gregory Ewing wrote: > > My advice would be to steer clear of things like Fink and MacPorts > > and do things the native MacOSX way wherever possible. That means > > using a framework installation of Python and framework versions of > > the various libraries that PyGame uses. > > FYI, MacPorts Pythons are framework installations. And I disagree that > installing a bunch of disparate software from various sources via binary > installers and/or source is to be preferred to a modern third-party > package manager on OS X like MacPorts or Homebrew. That's just setting > yourself up for a long-term maintenance headache. What could be easier > than: > > sudo port install py27-game > > I'd love to hear more about Greg's take on MacPorts. I've chosen to use MacPorts because it keeps things separate, because when things get hosed using the system libraries, I don't have to erase my whole system to get back to a "vanilla" OS X install. Unfortunately, it seems like the differences in which libraries are used, what options are enabled at library build time, etc, make it difficult to ensure that things always work when you try to use the stuff built-in to the system, and untangling the Homebrew mess can be painful. -- https://mail.python.org/mailman/listinfo/python-list
The PTVS gang (from microsoft) would like to hear from python-list users!
? Hi - we're a few engineers (not marketers!) that work on Python Tools for Visual Studio (http://pytools.codeplex.com). It's a free & OSS plug-in that turns VS into a decent Python IDE. It has some nice features like mixed-mode Python/C++ debugging, debugging on Linux from Visual Studio and IPython integration. Some of our users have been encouraging us to enhance PTVS and add support for some "Data Science" focused features & scenarios. As such we'd *love* to get your input regarding your current stack, workflow and pain points before taking the next steps. It does not matter if you use Windows, Visual Studio, love/hate Microsoft - we'd just love to understand your environment a bit better especially if you use tools like Excel, R, Matlab, Mathematica, numpy, scipy, Pandas, ... As a thank you, 50 people will be randomly selected to receive a $5 Starbucks Coffee card! Here is a link to the survey which should take about 2 minutes to complete. https://www.surveymonkey.com/s/VSForDataScience If you know others that might be interested in taking this survey, *please* forward it to them - much appreciated. Thanks for your participation! -- https://mail.python.org/mailman/listinfo/python-list
Executing pl/sql script File in python without sqlclient
Is there a way to execute pl/sql Script files through Python without sqlclient. i have checked cx_oracle and i guess it requires oracle client, so is there a way to execute without oracle client. -- https://mail.python.org/mailman/listinfo/python-list
