How to install googleapp engine on ubuntu 12.04 already downloads google_appengine_1.8.2.zip

2013-08-01 Thread Jaiky
How to install googleapp engine on ubuntu 12.04 already did: downloaded google_appengine_1.8.2.zip unziped it now?/ please help -- http://mail.python.org/mailman/listinfo/python-list

Re: Script that converts between indentation and curly braces in Python code

2013-08-01 Thread IshIsh
from __future__ import braces is just an easter egg... ...and shouldn't it better state from __past__ import braces ;-) Anyway, as far as I know the IPython interpreter can recognize lines ending in ‘:’ and indent the next line, while also un-indenting automatically after ‘raise’ or ‘return’.

Re: Using system python vs. updated/current version

2013-08-01 Thread Ben Last
> From: memilanuk > How much of a pain are virtualenvs when working from an IDE? > That depends on the IDE. I use PyCharm, and it has support for setting up multiple Python virtualenvs, and associated different projects with different virtualenvs, as well as tracking the packages installed per vi

Re: Problem with psycopg2, bytea, and memoryview

2013-08-01 Thread Frank Millman
"Neil Cerutti" wrote in message news:b5sk3cfkiq...@mid.individual.net... > On 2013-07-31, Frank Millman wrote: >> >> >> Can anyone explain *why* the results do not compare equal? If I >> understood the problem, I might be able to find a workaround. > > A memoryview will compare equal to another

Re: Unexpected results comparing float to Fraction

2013-08-01 Thread Oscar Benjamin
On 1 August 2013 07:32, Chris Angelico wrote: > On Thu, Aug 1, 2013 at 7:20 AM, Steven D'Aprano > wrote: >> I know this, and that's not what surprised me. What surprised me was that >> Fraction converts the float to a fraction, then compares. It surprises me >> because in other operations, Fracti

Re: Unexpected results comparing float to Fraction

2013-08-01 Thread Chris Angelico
On Thu, Aug 1, 2013 at 10:44 AM, Oscar Benjamin wrote: > The real dividing line between {int, Fraction} and {float, Decimal, > complex} is about (in)exactness. The numeric tower ensures the > property that inexactness is contagious which I think is a good thing. *nods slowly* That does make sens

Python and PyQt (Windows) - AttributeError: 'module' object has not attribute run

2013-08-01 Thread alesssia
I developed a python3-PyQt4 application (I’m a newbie!) on a 32-bit Linux platform, and I’m experiencing some problems when testing it on Windows platforms (Windows 7 and 8, both 64-bit). I have a module called Pmc.py that contains two methods: run and main, but only the former is used in the P

Re: Python script help

2013-08-01 Thread Alister
On Thu, 01 Aug 2013 10:57:01 +1000, alex23 wrote: > On 31/07/2013 6:15 PM, cool1...@gmail.com wrote: >> Here are some scripts, how do I put them together to create the script >> I want? (to search a online document and download all the links in it) > > 1. Think about the requirements. > 2. Write

Re: Python and PyQt (Windows) - AttributeError: 'module' object has not attribute run

2013-08-01 Thread Dave Angel
alesssia wrote: > I developed a python3-PyQt4 application (I’m a newbie!) on a 32-bit Linux > platform, and I’m experiencing some problems when testing it on Windows > platforms (Windows 7 and 8, both 64-bit). > > I have a module called Pmc.py that contains two methods: run and main, but > only

Re: script to Login a website

2013-08-01 Thread Dave Angel
wachk...@gmail.com wrote: > On Wednesday, July 31, 2013 12:21:59 PM UTC-4, John Gordon wrote: >> >> How is the data in 'users.txt' and 'password.txt' organized? Given the >> >> filenames, I would expect that 'users.txt' contains one username on each >> >> line, and 'password.txt' contai

Re: Best Python book(s) for a pre-teen?

2013-08-01 Thread beliavsky
On Tuesday, February 18, 2003 2:27:58 PM UTC-5, Mike Silva wrote: > Hi all, > > My son is 11 and wants to try programming, partly because it's what I > do for a living. Even though I don't (yet?) use or even know Python, > through some unexplainable thought process I've decided it would be a > go

Re: script to Login a website

2013-08-01 Thread wachkama
On Wednesday, July 31, 2013 11:33:25 AM UTC-4, wach...@gmail.com wrote: > I have created a script to log in a website. It gets its username and > password from two files, then log's in with this credentials. My code is not > showing me what username it is using to login from the file. And I am no

RE: sqlite3 version lacks instr

2013-08-01 Thread Fábio Santos
I'm not sure but it seems like you could use operator.__contains__ . it might be faster. On 28 Jul 2013 20:18, "Peter Otten" <__pete...@web.de> wrote: > Joseph L. Casale wrote: > > >> Has anyone encountered this and utilized other existing functions > >> within the shipped 3.6.21 sqlite version to

Re: Editing tabular data [was: PEP8 79 char max]

2013-08-01 Thread Neil Cerutti
On 2013-08-01, Chris Angelico wrote: > On Wed, Jul 31, 2013 at 8:02 PM, Grant Edwards > wrote: >> On 2013-07-31, Skip Montanaro wrote: I don't understand. That just moves them to a different file -- doesn't it? You've still got to deal with editing a large table of data (for ex

Re: script to Login a website

2013-08-01 Thread Dave Angel
wachk...@gmail.com wrote: > On Wednesday, July 31, 2013 11:33:25 AM UTC-4, wach...@gmail.com wrote: >> I have created a script to log in a website. It gets its username and >> password from two files, then log's in with this credentials. My code is not >> showing me what username it is using to

Re: Simple Python script as SMTP server for outgoing e-mails?

2013-08-01 Thread Gilles
On Wed, 24 Jul 2013 10:38:52 -0400, Kevin Walzer wrote: >> Thanks. hMailServer was one of the apps I checked, and I was just >> making sure there weren't something simpler, considering my needs, >> ideally something like Mongoose MTA. >> >> Regardless, because of the SPAM anti-measures mentioned a

Re: Best Python book(s) for a pre-teen?

2013-08-01 Thread ishish
Am 01.08.2013 14:11, schrieb beliav...@aol.com: On Tuesday, February 18, 2003 2:27:58 PM UTC-5, Mike Silva wrote: Hi all, My son is 11 and wants to try programming, partly because it's what I do for a living. Even though I don't (yet?) use or even know Python, through some unexplainable thou

Best practice for connections and cursors

2013-08-01 Thread Joseph L. Casale
I posted this to the sqlite list but I suspect there are more C oriented users on that list than Python, hopefully someone here can shed some light on this one. I have created a python module that I import within several other modules that simply opens a connection to an sqlite file and defines s

Re: email 8bit encoding

2013-08-01 Thread rurpy
On 07/29/2013 02:52 PM, Antoon Pardon wrote: > Op 29-07-13 01:41, ru...@yahoo.com schreef: >> How, using Python-3.3's email module, do I "flatten" (I think >> that's the right term) a Message object to get utf-8 encoded >> body with the headers: >> Content-Type: text/plain; charset=UTF-8 >> Con

Re: Best practice for connections and cursors

2013-08-01 Thread Neil Cerutti
On 2013-08-01, Joseph L. Casale wrote: > A bit vague I know, but does anyone see the obvious mistake? I > assumed the module setting up a singleton connection was a > perfectly viable way to accomplish this? My one db application started out creating a new connection to the db (sqlite3) for every

Re: how to package embedded python?

2013-08-01 Thread CM
On Wednesday, July 31, 2013 11:47:19 AM UTC-4, David M. Cotter wrote: > okay, well that might turn out to be useful, except i don't quite know how to > use it, and there are no "from scratch" instructions. > > > > i managed to download "py2exe-0.6.9.zip" and unzip it, but how does one > "insta

Re: Python script help

2013-08-01 Thread cool1574
I know I should be testing out the script myself but I did, I tried and since I am new in python and I work for a security firm that ask me to scan hundreds of documents a day for unsafe links (by opening them) I thought writing a script will be much easier. I do not know how to combine those

Re: Lambda function Turing completeness

2013-08-01 Thread Ian Kelly
On Wed, Jul 31, 2013 at 11:55 PM, Steven D'Aprano wrote: > On Wed, 31 Jul 2013 13:53:26 +0700, Musical Notation wrote: > >> Is it possible to write a Turing-complete lambda function (which does >> not depend on named functions) in Python? > > > lambda s: eval(s) eval is a named function. -- http

Re: PEP8 79 char max

2013-08-01 Thread Joshua Landau
On 31 July 2013 17:32, Grant Edwards wrote: > On 2013-07-31, Tim Chase wrote: > > On 2013-07-31 07:16, Joshua Landau wrote: > >> On 30 July 2013 18:52, Grant Edwards wrote: > >>> I also find intializers for tables of data to be much more easily > >>> read and maintained if the columns can be ali

How to use Python to open Unread message(s) in specific Outlook folder, clicking a hyperlink within the email message to a secure login window, entering password to download .csv file, run Excel macro

2013-08-01 Thread hambergcfa
Entire Project I am very new to Python and realize my subject line is more than a mouthful and the best way to tackle this project may be to break it down into smaller projects; but I wanted to let you know what my entire project is in the event there is/are shortcuts or more reliable ways to go

How do I deal with packet data

2013-08-01 Thread Pacopag
Hi. I have the hex stream of a packet that a program sent over the network. Now I want to view the data in the packet. I'm pretty sure the data was just a string (or at least contains a string), but when I decode it I just get gibberish. For example, the packet is sent something like this i

Re: Oddity with 'yield' as expression - parentheses demanded

2013-08-01 Thread Ian Kelly
On Thu, Aug 1, 2013 at 12:25 AM, Chris Angelico wrote: > Was playing around with yield inside a lambda and ran into a distinct oddity. > > Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 > 32 bit (Intel)] on win32 foo=lambda x: yield(x) > SyntaxError: invalid syntax

Re: How to use Python to open Unread message(s) in specific Outlook folder, clicking a hyperlink within the email message to a secure login window, entering password to download .csv file, run Excel m

2013-08-01 Thread Chris Angelico
On Thu, Aug 1, 2013 at 6:31 PM, wrote: > Details > Every morning I receive three emails (three different subject lines) in the > same Sub-Folder ("POINT") under Folder ("Reports") in my Inbox in Outlook. > Each email has two secure hyperlinks, one provides me with a site to register > and the

Re: Oddity with 'yield' as expression - parentheses demanded

2013-08-01 Thread Chris Angelico
On Thu, Aug 1, 2013 at 6:35 PM, Ian Kelly wrote: > yield was a statement before it became an expression, and the syntax > "yield x, y, z" was (and still is) perfectly legal, with all three > expressions (technically a single tuple expression) being governed by > the yield. That is to say, "yield

Does Python 'enable' poke and hope programming?

2013-08-01 Thread CM
(My subject line is meant to be tongue and cheek inflammatory) I've been thinking about why programming for me often feels like ice skating uphill. I think part of the problem, maybe the biggest part, is what now strikes me as a Very Bad Habit, which is "poke and hope" (trial and error) progra

Re: Does Python 'enable' poke and hope programming?

2013-08-01 Thread Neil Cerutti
On 2013-08-01, CM wrote: > http://en.wikipedia.org/wiki/Programming_by_permutation > > It seems that if I can make a change to the code and then > immediately test it by running the Python interpreter and > finding out, in a few seconds, if it worked, I am going to be > *much* more likely to use t

Re: How to use Python to open Unread message(s) in specific Outlook folder, clicking a hyperlink within the email message to a secure login window, entering password to download .csv file, run Excel m

2013-08-01 Thread hambergcfa
On Thursday, August 1, 2013 1:47:37 PM UTC-4, Chris Angelico wrote: > On Thu, Aug 1, 2013 at 6:31 PM, wrote: > > > Details > > > Every morning I receive three emails (three different subject lines) in the > > same Sub-Folder ("POINT") under Folder ("Reports") in my Inbox in Outlook. > > Each

Building python 2.7.5 with VS2012 - Regression test failures

2013-08-01 Thread thakur . gautam
I managed to build a 64bit version of Python 2.7.5 from sources with VS2012 on Windows 8 following the wiki on modifying the build files as advised for VS2010. I ran the python regression tests on the build and it cleared most of the tests and skipped a few. It hanged when trying to run the fo

Re: Does Python 'enable' poke and hope programming?

2013-08-01 Thread Chris Angelico
On Thu, Aug 1, 2013 at 6:57 PM, CM wrote: > It seems that if I can make a change to the code and then immediately test it > by running the Python interpreter and finding out, in a few seconds, if it > worked, I am going to be *much* more likely to use this trial-and-error > approach than if I h

Re: How to use Python to open Unread message(s) in specific Outlook folder, clicking a hyperlink within the email message to a secure login window, entering password to download .csv file, run Excel m

2013-08-01 Thread Chris Angelico
On Thu, Aug 1, 2013 at 7:08 PM, wrote: >> 1) You receive an email >> >> 2) That email has two URLs in it ("secure hyperlinks" means they begin >> >> https:// ?) >> >> 3) You choose one of them as being "appropriate" - is it always the second? >> >> 4) You download the document at that URL, which

Re: PEP8 79 char max

2013-08-01 Thread Steven D'Aprano
On Thu, 01 Aug 2013 18:21:32 +0100, Joshua Landau wrote: > On 31 July 2013 17:32, Grant Edwards wrote: > >> On 2013-07-31, Tim Chase wrote: >> > On 2013-07-31 07:16, Joshua Landau wrote: >> >> On 30 July 2013 18:52, Grant Edwards wrote: >> >>> I also find intializers for tables of data to be mu

Re: Python and PyQt (Windows) - AttributeError: 'module' object has not attribute run

2013-08-01 Thread alesssia
>> After some tests, I discovered that renaming Pmc.py in pmc.py > I don't know what that means. I simply renamed Pmc.py to pmc.py, using a lower case instead of an upper case. Of course, I also changed lines referencing to 'Pmc' (upper case) to 'pmc' (lover case) in the source code. This allow

Re: Oddity with 'yield' as expression - parentheses demanded

2013-08-01 Thread Terry Reedy
On 8/1/2013 1:58 PM, Chris Angelico wrote: On Thu, Aug 1, 2013 at 6:35 PM, Ian Kelly wrote: yield was a statement before it became an expression, and the syntax "yield x, y, z" was (and still is) perfectly legal, with all three expressions (technically a single tuple expression) being governed

Re: PEP8 79 char max

2013-08-01 Thread Grant Edwards
On 2013-08-01, Joshua Landau wrote: > On 31 July 2013 17:32, Grant Edwards wrote: > >> On 2013-07-31, Tim Chase wrote: >> > On 2013-07-31 07:16, Joshua Landau wrote: >> >> On 30 July 2013 18:52, Grant Edwards wrote: >> >>> I also find intializers for tables of data to be much more easily >> >>>

Re: script to Login a website

2013-08-01 Thread wachkama
On Wednesday, July 31, 2013 11:33:25 AM UTC-4, wach...@gmail.com wrote: > I have created a script to log in a website. It gets its username and > password from two files, then log's in with this credentials. My code is not > showing me what username it is using to login from the file. And I am no

Re: How do I deal with packet data

2013-08-01 Thread Dave Angel
Pacopag wrote: > Hi. > > I have the hex stream of a packet that a program sent over the network. Now > I want to view the data in the packet. I'm pretty sure the data was just a > string (or at least contains a string), but when I decode it I just get > gibberish. > > For example, the packet

PEP8 revised: max line lengths

2013-08-01 Thread Terry Reedy
Newly revised this morning: http://www.python.org/dev/peps/pep-0008/#maximum-line-length summary: 72 for text block (comments, triple-quoted strings) 79 for normal code 99 for code that is really more readable with extra The diff with all the changes is here http://hg.python.org/peps/rev/fb24c80e

Re: PEP8 79 char max

2013-08-01 Thread Grant Edwards
On 2013-08-01, Grant Edwards wrote: > On 2013-08-01, Joshua Landau wrote: >> On 31 July 2013 17:32, Grant Edwards wrote: >> >>> On 2013-07-31, Tim Chase wrote: >>> > On 2013-07-31 07:16, Joshua Landau wrote: >>> >> On 30 July 2013 18:52, Grant Edwards wrote: >>> >>> I also find intializers for

Re: Does Python 'enable' poke and hope programming?

2013-08-01 Thread Dave Angel
CM wrote: > what now strikes me as a Very Bad Habit, which is "poke and hope" > (trial and error) programming (of several names this page provided, I kind > of like that one): > I recall when a "compile" took up to two days, before we got the punched paper tape to begin testing. If we wante

Re: PEP8 revised: max line lengths

2013-08-01 Thread Terry Reedy
On 8/1/2013 3:52 PM, Terry Reedy wrote: Newly revised this morning: http://www.python.org/dev/peps/pep-0008/#maximum-line-length summary: 72 for text block (comments, triple-quoted strings) 79 for normal code 99 for code that is really more readable with extra Or maybe not for stdlib. Guido thin

Re: PEP8 revised: max line lengths

2013-08-01 Thread Tim Chase
On 2013-08-01 15:52, Terry Reedy wrote: > Newly revised this morning: > http://www.python.org/dev/peps/pep-0008/#maximum-line-length > > The diff with all the changes is here > http://hg.python.org/peps/rev/fb24c80e9afb Just a quick spelling fix of s/experimants/experiments/ at http://hg.pyth

Re: How to install googleapp engine on ubuntu 12.04 already downloads google_appengine_1.8.2.zip

2013-08-01 Thread Jai
got answer downloaded google_appengine_1.8.2.zip unziped it command path-to-/dev_appserver.py path-to/application-diectory that it -- http://mail.python.org/mailman/listinfo/python-list

Logging help

2013-08-01 Thread Joseph L. Casale
I have a couple handlers applied to a logger for a file and console destination. Default levels have been set for each, INFO+ to console and anything to file. How does one prevent logging.exception from going to a specific handler when it falls within the desired levels? Thanks, jlc -- http://ma

Re: PEP8 revised: max line lengths

2013-08-01 Thread Terry Reedy
On 8/1/2013 4:22 PM, Tim Chase wrote: On 2013-08-01 15:52, Terry Reedy wrote: Newly revised this morning: http://www.python.org/dev/peps/pep-0008/#maximum-line-length The diff with all the changes is here http://hg.python.org/peps/rev/fb24c80e9afb Just a quick spelling fix of s/experiman

Re: PEP8 revised: max line lengths

2013-08-01 Thread Dave Angel
Terry Reedy wrote: >>> >>> The diff with all the changes is here >>> http://hg.python.org/peps/rev/fb24c80e9afb >> Just out of curiosity, where is "coding cookie" defined? I found enough distant references to decide it was supposed to mean the coding line (line 2, typically in Unix). But I ori

Re: Python and PyQt (Windows) - AttributeError: 'module' object has not attribute run

2013-08-01 Thread Dave Angel
alesssia wrote: >> My guess is that somehow when the zip file was extracted, the case of >> this file was not preserved, and it came out pmc.py. > > The zip was not extracted because there was no zip. I copied the code from my > computer to a USB pen drive and ran the code from there. Tha

Re: PyQt5 and virtualenv problem

2013-08-01 Thread D. Xenakis
Any advice?Plz? -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP8 revised: max line lengths

2013-08-01 Thread Roy Smith
In article , Terry Reedy wrote: > Newly revised this morning: > http://www.python.org/dev/peps/pep-0008/#maximum-line-length > summary: > 72 for text block (comments, triple-quoted strings) > 79 for normal code > 99 for code that is really more readable with extra And the people did rejoice and

Re: Does Python 'enable' poke and hope programming?

2013-08-01 Thread Sam Whitehead
I find myself doing this a lot with libraries whose documentation encourages an understanding based on intuition, rather than one based on formal concepts. When doing more 'pure' stuff with mostly the standard library, not so much. Most imperative languages let their users get kind of loose wit

Having troubles with list methods

2013-08-01 Thread Adam Sweiger
The code: pastebin.com/MyrLB704 I'm working on this program in my Python book, and for some reason it doesn't seem to be working. I've read my code, it seems fine to me. Here's what the book says: The High Scores program uses list methods to create and maintain a list of the user's best scores

Re: Having troubles with list methods

2013-08-01 Thread Sam Whitehead
Your indentation is such that the first print statement is the only thing inside the while loop. -- http://mail.python.org/mailman/listinfo/python-list

Re: Having troubles with list methods

2013-08-01 Thread Adam Sweiger
On Thursday, August 1, 2013 8:11:42 PM UTC-5, Sam Whitehead wrote: > Your indentation is such that the first print statement is the only thing > inside the while loop. I corrected the indentation and it works perfectly now. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Best practice for connections and cursors

2013-08-01 Thread Ian Kelly
On Thu, Aug 1, 2013 at 6:49 PM, Dennis Lee Bieber wrote: > On Thu, 1 Aug 2013 15:05:08 +, "Joseph L. Casale" > declaimed the following: > >> >>As the module opens a connection, wherever I import it I call a commit against >>the connection after invoking any methods that insert or change data.

Re: Does Python 'enable' poke and hope programming?

2013-08-01 Thread Vito De Tullio
CM wrote: > Basically this amounts to: with an interpreted language (so of course > this is not really just about Python--I just think in terms of Python), > it's easier to be mentally lazy. But, ironically, being lazy winds up > creating *way* more work ultimately, since one winds up programmin

Re: PEP8 revised: max line lengths

2013-08-01 Thread Steven D'Aprano
On Thu, 01 Aug 2013 20:51:43 -0400, Roy Smith wrote: > In article , > Terry Reedy wrote: > >> Newly revised this morning: >> http://www.python.org/dev/peps/pep-0008/#maximum-line-length summary: >> 72 for text block (comments, triple-quoted strings) 79 for normal code >> 99 for code that is rea

Re: PEP8 revised: max line lengths

2013-08-01 Thread Terry Reedy
On 8/1/2013 7:33 PM, Dave Angel wrote: Terry Reedy wrote: The diff with all the changes is here http://hg.python.org/peps/rev/fb24c80e9afb Just out of curiosity, where is "coding cookie" defined? I found enough distant references to decide it was supposed to mean the coding line (line 2,

Re: PEP8 revised: max line lengths

2013-08-01 Thread Dave Angel
Terry Reedy wrote: > On 8/1/2013 7:33 PM, Dave Angel wrote: >> Terry Reedy wrote: >> >> > > The diff with all the changes is here > http://hg.python.org/peps/rev/fb24c80e9afb >> >> Just out of curiosity, where is "coding cookie" defined? I found enough >> distant references to de

Re: Problem with psycopg2, bytea, and memoryview

2013-08-01 Thread Frank Millman
"Terry Reedy" wrote in message news:ktbj9i$4au$1...@ger.gmane.org... > On 7/31/2013 9:07 AM, Antoine Pitrou wrote: >> >> I would suggest asking the psycopg2 project why they made this choice, >> and >> if they would reconsider. Returning a memoryview doesn't make much sense >> IMHO. > > I agre

Re: Editing tabular data

2013-08-01 Thread Ben Finney
Skip Montanaro writes: > I really love Emacs, however... […] > > This is clearly a case where choosing the proper tool is important. I > agree that using a spreadsheet to edit a 3x5 CSV file is likely > overkill (might just as well use Notepad or TextEdit), but tabular > data are tabular data, no