ANN: Training - Einstieg in Django (German), 15. - 17. Juli 2013

2013-06-25 Thread Mike Müller
This announcement is in German because the training is offered in German. We do offer an English version [1]. Einstieg in Django == Was: Praktischer Einstieg in die Entwicklung von Web-Anwendungen mit Django Wann: 15. - 17. Juli 2013 Wo: Python Academy, Leipzig Wer: Markus

ANN: Training - Django für Fortgeschrittene (German), 18. - 20. Juli 2013

2013-06-25 Thread Mike Müller
This announcement is in German because the training is offered in German. We do offer an English version [1]. Django für Fortgeschrittene === Was: Tiefes Eintauschen in Django Wann: 18. - 20. Juli 2013 Wo: Python Academy, Leipzig Wer: Markus Zapke-Gründemann Details:

XYmath a curve fitting GUI for python on Windows

2013-06-25 Thread Charlie Taylor
I have just released a new project on Sourceforge called XYmath at: https://sourceforge.net/p/xymath/xywiki/Home/ XYmath will find the best curve fit using either minimum percent error or minimum total error. It can search through common equations, an exhaustive search through thousands of

Support for Django in Authomatic

2013-06-25 Thread Peter Hudec
Hi, I would like to announce that the Authomatic authentication / authorization package now supports Django out of the box. There is a short Authomatic + Django tutorial: http://peterhudec.github.io/authomatic/examples/django-simple.html Enjoy Peter Hudec --

Re: Is this PEP-able? fwhile

2013-06-25 Thread rusi
On Tuesday, June 25, 2013 4:44:44 AM UTC+5:30, alex23 wrote: I'd probably just go with a generator expression to feed the for loop: for X in (i for i in ListY if conditionZ): Nice idiom -- thanks Yes it does not correspond to a takewhile (or break in the control

Unable to import NHunspell.dll using ctypes in Python

2013-06-25 Thread akshay . ksth
Im required to import ha certain dll called 'NHunspell.dll' which is used for Spell Checking purposes. I am using Python for the software. Although I checked out several websites to properly use ctypes, I have been unable to load the dll properly. When I use this code. from ctypes import

Re: io module and pdf question

2013-06-25 Thread rusi
On Tuesday, June 25, 2013 9:48:44 AM UTC+5:30, jyou...@kc.rr.com wrote: 1. Is there another way to get metadata out of a pdf without having to install another module? 2. Is it safe to assume pdf files should always be encoded as latin-1 (when trying to read it this way)? Is there a chance

Re: Unable to import NHunspell.dll using ctypes in Python

2013-06-25 Thread Mark Lawrence
On 25/06/2013 07:23, akshay.k...@gmail.com wrote: Im required to import ha certain dll called 'NHunspell.dll' which is used for Spell Checking purposes. I am using Python for the software. Although I checked out several websites to properly use ctypes, I have been unable to load the dll

Re: io module and pdf question

2013-06-25 Thread Christian Gollwitzer
Am 25.06.13 08:33, schrieb rusi: On Tuesday, June 25, 2013 9:48:44 AM UTC+5:30, jyou...@kc.rr.com wrote: 1. Is there another way to get metadata out of a pdf without having to install another module? 2. Is it safe to assume pdf files should always be encoded as latin-1 (when trying to read it

Re: Is this PEP-able? fwhile

2013-06-25 Thread Chris Angelico
On Tue, Jun 25, 2013 at 2:20 PM, Benjamin Kaplan benjamin.kap...@case.edu wrote: On Mon, Jun 24, 2013 at 8:54 PM, Chris Angelico ros...@gmail.com wrote: On Tue, Jun 25, 2013 at 12:01 PM, rusi rustompm...@gmail.com wrote: On Tuesday, June 25, 2013 3:08:57 AM UTC+5:30, Chris Angelico wrote: On

Re: Is this PEP-able? fwhile

2013-06-25 Thread Neil Hodgson
jim...@aol.com: Syntax: fwhile X in ListY and conditionZ: There is precedent in Algol 68: for i from 0 to n while safe(i) do .. od which would also make a python proposal that needs no new key words: for i in range(n) while safe(i): .. The benefit of the syntax would be to

Re: Unable to import NHunspell.dll using ctypes in Python

2013-06-25 Thread akshay . ksth
Thanks for the reply Mark. I did what you suggested. But now I'm getting an error like this. Traceback (most recent call last): File start.py, line 15, in module hunspell = cdll.LoadLibrary('/home/kuro/Desktop/notepad/Hunspellx64.dll') File /usr/lib/python2.7/ctypes/__init__.py, line

Re: Unable to import NHunspell.dll using ctypes in Python

2013-06-25 Thread Dave Angel
On 06/25/2013 03:32 AM, akshay.k...@gmail.com wrote: Thanks for the reply Mark. I did what you suggested. But now I'm getting an error like this. Traceback (most recent call last): File start.py, line 15, in module hunspell =

Re: Unable to import NHunspell.dll using ctypes in Python

2013-06-25 Thread Chris “Kwpolska” Warrick
On Tue, Jun 25, 2013 at 9:45 AM, Dave Angel da...@davea.name wrote: You're on Linux or similar, and dll's are the way a Windows executable is named. dll’s are libraries for windows, not executables (/lib not /bin) Try going back to where you downloaded this file, and see if you can get the

Re: Unable to import NHunspell.dll using ctypes in Python

2013-06-25 Thread akshay . ksth
Thanks Dave. I'm using Python 2.7 and am working on Linux Mint. Does it mean that I cant load the functions within the dll whilst on Linux. I thought that was what ctypes was used for. Please correct me if I misunderstood what you meant. -- http://mail.python.org/mailman/listinfo/python-list

Re: Unable to import NHunspell.dll using ctypes in Python

2013-06-25 Thread akshay . ksth
On Tuesday, June 25, 2013 12:08:17 PM UTC+5:45, aksha...@gmail.com wrote: Im required to import ha certain dll called 'NHunspell.dll' which is used for Spell Checking purposes. I am using Python for the software. Although I checked out several websites to properly use ctypes, I have been

Re: Is this PEP-able? fwhile

2013-06-25 Thread Joshua Landau
On 25 June 2013 00:13, Tim Chase python.l...@tim.thechases.com wrote: On 2013-06-24 23:39, Fábio Santos wrote: On 24 Jun 2013 23:35, Tim Chase wrote: On 2013-06-25 07:38, Chris Angelico wrote: Python has no issues with breaking out of loops, and even has syntax specifically to complement

Re: Unable to import NHunspell.dll using ctypes in Python

2013-06-25 Thread Chris “Kwpolska” Warrick
On Tue, Jun 25, 2013 at 10:04 AM, akshay.k...@gmail.com wrote: @Chris I understand that. But then I am supposed to create something that works on a Windows environment using a Windows Dll.Aaandd Im stuck. -- http://mail.python.org/mailman/listinfo/python-list Then you need to get your

Re: Is this PEP-able? fwhile

2013-06-25 Thread Joshua Landau
On 24 June 2013 23:50, Chris Angelico ros...@gmail.com wrote: In more free-form languages, I implement this by simply omitting a line-break: ... Python could afford to lose a little rigidity here rather than gain actual new syntax: for i in range(10): if i%3: print(i) And there you

Re: Looking for a name for a deployment framework...

2013-06-25 Thread jonathan . slenders
Le mardi 25 juin 2013 06:38:44 UTC+2, Chris Rebert a écrit : Er, Salt is likewise written in Python. You're right. Salt is also Python, excuse me, and it's very powerful as well. -- http://mail.python.org/mailman/listinfo/python-list

Is this PEP-able? fwhile

2013-06-25 Thread jimjhb
Syntax: fwhile X in ListY and conditionZ: There is precedent in Algol 68: for i from 0 to n while safe(i) do .. od which would also make a python proposal that needs no new key words: for i in range(n) while safe(i): .. The benefit of the syntax would be to concentrate the

Re: n00b question on spacing

2013-06-25 Thread Robert Kern
On 2013-06-25 01:22, Mark Janssen wrote: On Mon, Jun 24, 2013 at 4:48 PM, alex23 wuwe...@gmail.com wrote: On 23/06/2013 3:43 AM, Mark Janssen wrote: There was a recent discussion about this (under implicit string concatenation). It seems this is a part of the python language specification

Re: Looking for a name for a deployment framework...

2013-06-25 Thread Robert Kern
On 2013-06-24 13:50, Roy Smith wrote: Without forming any opinion on the software itself, the best advice I can offer is that naming puns are very popular. If you're thinking of this as a fabric replacement, I would go with cloth, textile, material, gabardine, etc. brocade -- Robert Kern I

Re: n00b question on spacing

2013-06-25 Thread Chris Angelico
On Tue, Jun 25, 2013 at 9:19 PM, Robert Kern robert.k...@gmail.com wrote: There is quite a bit of Python's lexical analysis that is specified in places other than the formal notation. That does not mean it is undefined. It is well defined in the lexer code and the documentation. You suggest

Re: Is this PEP-able? fwhile

2013-06-25 Thread Göktuğ Kayaalp
On Mon, Jun 24, 2013 at 11:45:57PM +0100, MRAB wrote: On 24/06/2013 23:35, Chris Angelico wrote: On Tue, Jun 25, 2013 at 8:30 AM, Tim Chase python.l...@tim.thechases.com wrote: On 2013-06-25 07:38, Chris Angelico wrote: Python has no issues with breaking out of loops, and even has syntax

Re: n00b question on spacing

2013-06-25 Thread Robert Kern
On 2013-06-25 12:48, Chris Angelico wrote: On Tue, Jun 25, 2013 at 9:19 PM, Robert Kern robert.k...@gmail.com wrote: There is quite a bit of Python's lexical analysis that is specified in places other than the formal notation. That does not mean it is undefined. It is well defined in the lexer

Re: n00b question on spacing

2013-06-25 Thread Chris Angelico
On Tue, Jun 25, 2013 at 9:59 PM, Robert Kern robert.k...@gmail.com wrote: On 2013-06-25 12:48, Chris Angelico wrote: On Tue, Jun 25, 2013 at 9:19 PM, Robert Kern robert.k...@gmail.com wrote: There is quite a bit of Python's lexical analysis that is specified in places other than the formal

Re: Default Value

2013-06-25 Thread Ian Kelly
On Sat, Jun 22, 2013 at 8:40 AM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Are you two guys now egging on Rick Johnson? No. Rick is incorrigible, and I would have been surprised if he responded to that anyway. -- http://mail.python.org/mailman/listinfo/python-list

[ANN] pypiserver 1.1.2 - minimal private pypi server

2013-06-25 Thread Ralf Schmitt
Hi, I've just uploaded pypiserver 1.1.2 to the python package index. pypiserver is a minimal PyPI compatible server. It can be used to serve a set of packages and eggs to easy_install or pip. pypiserver is easy to install (i.e. just 'pip install pypiserver'). It doesn't have any external

Re: Default Value

2013-06-25 Thread Lefavor, Matthew (GSFC-582.0)[MICROTEL LLC]
On Jun 21, 2013, at 11:17 AM, Rick Johnson wrote: On Thursday, June 20, 2013 5:28:06 PM UTC-5, Lefavor, Matthew (GSFC-582.0)[MICROTEL LLC] wrote: [snip example showing dummy coder doing something dumb] +1. This is what convinces me that keeping references to keyword arguments is

Re: newbie question

2013-06-25 Thread Gene Heskett
On Saturday 22 June 2013 22:46:51 christheco...@gmail.com did opine: Writing simple program asking a question with the answer being yes...how do I allow the correct answer if user types Yes, yes, or YES? Thanks AND each character coming in from the keyboard with $DF before adding it to

Re: Default Value

2013-06-25 Thread Lefavor, Matthew (GSFC-582.0)[MICROTEL LLC]
The Apathetic Approach: I could just assume that a programmer is responsible for the code he writes. If he passes mutables into a function as default arguments, and then

Question about pickle

2013-06-25 Thread Phu Sam
I have a method that opens a file, lock it, pickle.load the file into a dictionary. I then modify the status of a record, then pickle.dump the dictionary back to the file. The problem is that the pickle.dump never works. The file never gets updated. def updateStatus(self, fp, stn, status):

Is this PEP-able? fwhile

2013-06-25 Thread jimjhb
Ian, Regarding your first message breaks are anathema (for many) and your other alternative is complicated. Regarding your second post, anding of lists is allowed, but generally returns non-utile results, but point taken. I guess technically it could be the last statement, with the condition

Re: What is the semantics meaning of 'object'?

2013-06-25 Thread Antoon Pardon
Op 23-06-13 18:35, Steven D'Aprano schreef: On Sun, 23 Jun 2013 10:15:38 -0600, Ian Kelly wrote: If you're worried about efficiency, you can also explicitly name the superclass in order to call the method directly, like: A.__init__(self, arg) Please don't. This is false economy.

Inconsistency on getting arguments

2013-06-25 Thread Marco Perniciaro
Hi, I've been working with Python for a long time. Yet, I came across an issue which I cannot explain. Recently I have a new PC (Windows 7). Previously I could call a Python script with or without the python word at the beginning. Now the behavior is different if I use or not use the python

Re: Loop Question

2013-06-25 Thread Lutz Horn
Hi, Am 24.06.2013 14:12 schrieb christheco...@gmail.com: username=raw_input(Please enter your username: ) password=raw_input(Please enter your password: ) if username == john doe and password == fopwpo: print Login Successful else: print Please try again while not username or not

Re: Python development tools

2013-06-25 Thread Grant Edwards
On 2013-06-25, MRAB pyt...@mrabarnett.plus.com wrote: Automating tasks, e.g. controlling other applications and stringing together tasks that you would otherwise be doing by hand. That, IMO, is the definition of scripting: writing a program to automate a task that would probably be done by

Re: Loop Question

2013-06-25 Thread Dave Angel
On 06/24/2013 08:20 AM, Lutz Horn wrote: Hi, Am 24.06.2013 14:12 schrieb christheco...@gmail.com: username=raw_input(Please enter your username: ) password=raw_input(Please enter your password: ) if username == john doe and password == fopwpo: print Login Successful else: print

Re: Question about pickle

2013-06-25 Thread Peter Otten
Phu Sam wrote: I have a method that opens a file, lock it, pickle.load the file into a dictionary. I then modify the status of a record, then pickle.dump the dictionary back to the file. The problem is that the pickle.dump never works. The file never gets updated. def

Re: Inconsistency on getting arguments

2013-06-25 Thread Peter Otten
Marco Perniciaro wrote: Hi, I've been working with Python for a long time. Yet, I came across an issue which I cannot explain. Recently I have a new PC (Windows 7). Previously I could call a Python script with or without the python word at the beginning. Now the behavior is different if I

Re: Unable to import NHunspell.dll using ctypes in Python

2013-06-25 Thread Dave Angel
On 06/25/2013 03:54 AM, Chris “Kwpolska” Warrick wrote: On Tue, Jun 25, 2013 at 9:45 AM, Dave Angel da...@davea.name wrote: You're on Linux or similar, and dll's are the way a Windows executable is named. dll’s are libraries for windows, not executables (/lib not /bin) Try going back to

Re: Unable to import NHunspell.dll using ctypes in Python

2013-06-25 Thread Dave Angel
On 06/25/2013 03:58 AM, akshay.k...@gmail.com wrote: Thanks Dave. I'm using Python 2.7 and am working on Linux Mint. Does it mean that I cant load the functions within the dll whilst on Linux. I thought that was what ctypes was used for. Please correct me if I misunderstood what you meant.

Re: Inconsistency on getting arguments

2013-06-25 Thread Dave Angel
On 06/25/2013 09:55 AM, Peter Otten wrote: Marco Perniciaro wrote: Hi, I've been working with Python for a long time. Yet, I came across an issue which I cannot explain. Recently I have a new PC (Windows 7). Previously I could call a Python script with or without the python word at the

Re: Is this PEP-able? fwhile

2013-06-25 Thread Terry Reedy
On 6/25/2013 7:17 AM, jim...@aol.com wrote: for i in range(n) while safe(i): .. Combined for-while and for-if statements have been proposed before and rejected. We cannot continuously add simple compositions to the langauge. I disagree. The problem IMO is that python 'for's are a

Re: Unable to import NHunspell.dll using ctypes in Python

2013-06-25 Thread akshay . ksth
Thanks everyone. But it still did not work. I instead used a Python wrapper for Hunspell called Pyhunspell. The actual link in PyPi does not work for Python 2.7 but it has been improved and upgraded in [here](https://github.com/akshaylb/nepali-spellchecker-v2/tree/master/pyhunspell). --

Re: Is this PEP-able? fwhile

2013-06-25 Thread Ian Kelly
On Mon, Jun 24, 2013 at 2:33 PM, jim...@aol.com wrote: Ian, Regarding your first message breaks are anathema (for many) and your other alternative is complicated. Regarding your second post, anding of lists is allowed, but generally returns non-utile results, but point taken. I guess

Re: (newbye) exceptions list for python3 classes

2013-06-25 Thread chrem
Le 24/06/13 23:43, chrem a écrit : Le 24/06/13 23:35, chrem a écrit : Hi, what is the best way to find out all exceptions for a class? E.g. I want to find out all exceptions related to the zipfile (I'm searching for the Bad password exception syntax). thanks for your help or feedback,

Re: Don't feed the troll...

2013-06-25 Thread rurpy
On 06/24/2013 07:37 AM, Antoon Pardon wrote: Op 23-06-13 16:29, ru...@yahoo.com schreef: On 06/21/2013 01:32 PM, Antoon Pardon wrote: Op 19-06-13 23:13, ru...@yahoo.com schreef: [...] Note: although I clipped the group volition paragraphs, thank you for pointing out that Nikos posts go back to

Re: Inconsistency on getting arguments

2013-06-25 Thread Chris Angelico
On Wed, Jun 26, 2013 at 12:17 AM, Dave Angel da...@davea.name wrote: On 06/25/2013 09:55 AM, Peter Otten wrote: Marco Perniciaro wrote: Hi, I've been working with Python for a long time. Yet, I came across an issue which I cannot explain. Recently I have a new PC (Windows 7). Previously

Re: Is this PEP-able? fwhile

2013-06-25 Thread Ian Kelly
On Tue, Jun 25, 2013 at 1:21 AM, Chris Angelico ros...@gmail.com wrote: On Tue, Jun 25, 2013 at 2:20 PM, Benjamin Kaplan benjamin.kap...@case.edu wrote: The reason I was given (which I promptly ignored, of course) is that it's best practice to only have one exit point for a block of code.

RE: io module and pdf question

2013-06-25 Thread jyoung79
Thank you Rusi and Christian! So it sounds like I should read the pdf data in as binary: import os pdfPath = '~/Desktop/test.pdf' colorlistData = '' with open(os.path.expanduser(pdfPath), 'rb') as f: for i in f: if 'XYZ:colorList' in i:

Re: Is this PEP-able? fwhile

2013-06-25 Thread rusi
On Tuesday, June 25, 2013 9:30:54 PM UTC+5:30, Ian wrote: In my experience the sorts of people who preach one exit point are also all about defining preconditions and postconditions and proving that the postconditions follow from the preconditions. I think that the two are linked, because the

Re: io module and pdf question

2013-06-25 Thread rusi
I guess the string constant 'XYZ:colorlist' needs to be a byte-string -- use b prefix? Dunno for sure. Black hole for me -- unicode! -- http://mail.python.org/mailman/listinfo/python-list

Re: io module and pdf question

2013-06-25 Thread MRAB
On 25/06/2013 17:15, jyoun...@kc.rr.com wrote: Thank you Rusi and Christian! So it sounds like I should read the pdf data in as binary: import os pdfPath = '~/Desktop/test.pdf' colorlistData = '' with open(os.path.expanduser(pdfPath), 'rb') as f: for i in f:

Re: What is the semantics meaning of 'object'?

2013-06-25 Thread Ian Kelly
On Sun, Jun 23, 2013 at 1:33 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Op 23-06-13 18:35, Steven D'Aprano schreef: Please don't. This is false economy. The time you save will be trivial, the overhead of inheritance is not going to be the bottleneck in your code, and by ignoring

Love Italy è su Facebook.

2013-06-25 Thread Facebook
JASMINE PASTUNG TI INVITA facebook Clicca "Mi piace" su Love Italy su Facebook Dal momento che ricevi già gli aggiornamenti e-mail al di fuori di Facebook, Love Italy ti invita a cliccare su "Mi piace" sulla sua Pagina per non perderti neanche una

Re: Making a pass form cgi = webpy framework

2013-06-25 Thread rurpy
On 06/23/2013 07:44 PM, Νίκος wrote: Why use mako's approach which requires 2 files(an html template and the actual python script rendering the data) when i can have simple print statements inside 1 files(my files.py script) ? After all its only one html table i wish to display. Good

Re: Making a pass form cgi = webpy framework

2013-06-25 Thread Joel Goldstick
On Tue, Jun 25, 2013 at 2:00 PM, ru...@yahoo.com wrote: On 06/23/2013 07:44 PM, Νίκος wrote: Why use mako's approach which requires 2 files(an html template and the actual python script rendering the data) when i can have simple print statements inside 1 files(my files.py script) ? After

Re: newbie question

2013-06-25 Thread Ian Kelly
On Sat, Jun 22, 2013 at 8:49 PM, Gene Heskett ghesk...@wdtv.com wrote: On Saturday 22 June 2013 22:46:51 christheco...@gmail.com did opine: Writing simple program asking a question with the answer being yes...how do I allow the correct answer if user types Yes, yes, or YES? Thanks AND

Re: newbie question

2013-06-25 Thread Tim Rowe
On 23 June 2013 03:49, Gene Heskett ghesk...@wdtv.com wrote: On Saturday 22 June 2013 22:46:51 christheco...@gmail.com did opine: Writing simple program asking a question with the answer being yes...how do I allow the correct answer if user types Yes, yes, or YES? Thanks AND each

Re: Looking for a name for a deployment framework...

2013-06-25 Thread Stig Sandbeck Mathisen
jonathan.slend...@gmail.com writes: Any suggestions for a good name, for a framework that does automatic server deployments? Whatever you choose, make sure it is easily searchable. Googling for puppet and chef only recently gave relevant results for something not, er, doll or food related. It

Re: Looking for a name for a deployment framework...

2013-06-25 Thread Stig Sandbeck Mathisen
jonathan.slend...@gmail.com writes: Any suggestions for a good name, for a framework that does automatic server deployments? Whatever you choose, make sure it is easily searchable. Googling for puppet and chef only recently gave relevant results for something not, er, doll or food related. It

Limit Lines of Output

2013-06-25 Thread Bryan Britten
Hey, group, quick (I hope) question: I've got a simple script that counts the number of words in a data set (it's more complicated than that, but that's one of the functions), but there are so many words that the output is too much to see in the command prompt window. What I'd like to be able

Re: Limit Lines of Output

2013-06-25 Thread Joel Goldstick
On Tue, Jun 25, 2013 at 4:09 PM, Bryan Britten britten.br...@gmail.comwrote: Hey, group, quick (I hope) question: I've got a simple script that counts the number of words in a data set (it's more complicated than that, but that's one of the functions), but there are so many words that the

Re: A few questiosn about encoding

2013-06-25 Thread wxjmfauth
Le dimanche 23 juin 2013 18:30:40 UTC+2, Steven D'Aprano a écrit : On Sun, 23 Jun 2013 08:51:41 -0700, wxjmfauth wrote: utf-8: how many bytes to hold an a in memory? one byte. flexible string representation: how many bytes to hold an a in memory? One byte? No, two. (Funny, it

Re: Limit Lines of Output

2013-06-25 Thread Bryan Britten
Ah, I always forget to mention my OS on these forums. I'm running Windows. -- http://mail.python.org/mailman/listinfo/python-list

Re: Limit Lines of Output

2013-06-25 Thread Joshua Landau
On 25 June 2013 21:22, Bryan Britten britten.br...@gmail.com wrote: Ah, I always forget to mention my OS on these forums. I'm running Windows. Supposedly, Windows has more [http://superuser.com/questions/426226/less-or-more-in-windows], For Linux+less; this works: from subprocess import Popen,

Re: Limit Lines of Output

2013-06-25 Thread Joel Goldstick
On Tue, Jun 25, 2013 at 4:22 PM, Bryan Britten britten.br...@gmail.comwrote: Ah, I always forget to mention my OS on these forums. I'm running Windows. -- http://mail.python.org/mailman/listinfo/python-list I don't think I fully understand your problem. Why can't you send output to a text

Re: Limit Lines of Output

2013-06-25 Thread Bryan Britten
Joel - I don't want to send it to a text file because it's just meant to serve as a reference for the user to get an idea of what words are mentioned. The words being analyzed are responses to a survey questions and the primary function of this script is to serve as a text analytics program.

Re: Limit Lines of Output

2013-06-25 Thread Ian Kelly
On Tue, Jun 25, 2013 at 2:31 PM, Joshua Landau joshua.landau...@gmail.com wrote: On 25 June 2013 21:22, Bryan Britten britten.br...@gmail.com wrote: Ah, I always forget to mention my OS on these forums. I'm running Windows. Supposedly, Windows has more

Re: What is the semantics meaning of 'object'?

2013-06-25 Thread Mark Janssen
This bothers me as well. If you look at Raymond Hettinger's super() considered super article, he includes the (correct) advice that super() needs to be used at every level of the call chain. At the end of the article, he offers this example to show how easy multiple inheritance can be:

Re: What is the semantics meaning of 'object'?

2013-06-25 Thread Chris Angelico
On Wed, Jun 26, 2013 at 3:44 AM, Ian Kelly ian.g.ke...@gmail.com wrote: On Sun, Jun 23, 2013 at 1:33 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Op 23-06-13 18:35, Steven D'Aprano schreef: Please don't. This is false economy. The time you save will be trivial, the overhead of

newbie EOL while scanning string literal

2013-06-25 Thread willlewis965
I'am starting to learn python reading a book and I have to do some exercises but I can't understand this one, when I run it it says EOL while scanning string literal and a red shadow next to a line of code. I'm trying to get input from user. I have 3 questions: - Whats does EOL mean and in

Re: What is the semantics meaning of 'object'?

2013-06-25 Thread Ian Kelly
On Tue, Jun 25, 2013 at 3:58 PM, Mark Janssen dreamingforw...@gmail.com wrote: Ah, and here we see the weakness in the object architecture that has evolved in the past decade (not just in Python, note). It hasn't really ironed out what end is what. Here's a proposal: the highest, most

Re: What is the semantics meaning of 'object'?

2013-06-25 Thread Ian Kelly
On Tue, Jun 25, 2013 at 4:17 PM, Chris Angelico ros...@gmail.com wrote: The main problem is getting to the top/end of the call chain. Classic example is with __init__, but the same problem can also happen with other calls. Just a crazy theory, but would it be possible to construct a

Re: What is the semantics meaning of 'object'?

2013-06-25 Thread Mark Janssen
So instead of super(), you would have sub()? It's an interesting concept, but I don't think it changes anything. You still have to design your classes cooperatively if you expect to use them with multiple inheritance. Yes, and let new instances of the child classes automatically ensure the

Parsing soap/xml result

2013-06-25 Thread miguel olivares varela
I try to parse a soap/xml answer like: soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenv:Body ns1:giftPkgResponse

Re: What is the semantics meaning of 'object'?

2013-06-25 Thread Mark Janssen
The main problem is getting to the top/end of the call chain. Classic example is with __init__, but the same problem can also happen with other calls. Just a crazy theory, but would it be possible to construct a black-holing object that, for any given method name, returns a dummy function

Re: newbie EOL while scanning string literal

2013-06-25 Thread willlewis965
FORGET ABOUT is_triangle(5,4,3) I POST IT AND DONT KNOW HOW TO EDIT MY QUESTION -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the semantics meaning of 'object'?

2013-06-25 Thread Mark Janssen
Sorry my last message got sent prematurely. Retrying... So instead of super(), you would have sub()? It's an interesting concept, but I don't think it changes anything. You still have to design your classes cooperatively if you expect to use them with multiple inheritance. Yes, and let

Re: newbie EOL while scanning string literal

2013-06-25 Thread Andrew Berg
On 2013.06.25 17:19, willlewis...@gmail.com wrote: na=('type first integer n\')##THE RED SHADOW APPEARS HERE## Here you escape the closing single quote. \n is a line feed, not n\. Also, the parentheses are unnecessary, and it looks like you are a assigning a tuple instead of a string. Syntax

Re: What is the semantics meaning of 'object'?

2013-06-25 Thread Chris Angelico
On Wed, Jun 26, 2013 at 8:25 AM, Ian Kelly ian.g.ke...@gmail.com wrote: On Tue, Jun 25, 2013 at 4:17 PM, Chris Angelico ros...@gmail.com wrote: The main problem is getting to the top/end of the call chain. Classic example is with __init__, but the same problem can also happen with other calls.

Re: newbie EOL while scanning string literal

2013-06-25 Thread rurpy
On Tuesday, June 25, 2013 4:19:43 PM UTC-6, willle...@gmail.com wrote: [...] na=('type first integer n\')##THE RED SHADOW APPEARS HERE## You want \n at the end of the string, not n\. A backslash character \ in front of the ' escapes the ' and causes it to to be considered as a character in the

Re: What is the semantics meaning of 'object'?

2013-06-25 Thread Chris Angelico
On Wed, Jun 26, 2013 at 8:27 AM, Mark Janssen dreamingforw...@gmail.com wrote: Here's how it *should* be made: the most superest, most badassed object should take care of its children. New instances should automatically call up the super chain (and not leave it up to the subclasses), so that

Re: Parsing soap/xml result

2013-06-25 Thread MRAB
On 25/06/2013 23:28, miguel olivares varela wrote: I try to parse a soap/xml answer like: soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenv:Body

Re: What is the semantics meaning of 'object'?

2013-06-25 Thread Chris Angelico
On Wed, Jun 26, 2013 at 8:38 AM, Mark Janssen dreamingforw...@gmail.com wrote: Combining integers with sets I can make a Rational class and have infinite-precision arithmetic, for example. Combining two integers lets you make a Rational. Python integers are already infinite-precision. Or are

Re: What is the semantics meaning of 'object'?

2013-06-25 Thread Chris Angelico
On Wed, Jun 26, 2013 at 9:00 AM, Mark Janssen dreamingforw...@gmail.com wrote: 1) That breaks the Liskov Substitution Principle. A subclass of list ought to fulfill the contracts of a basic list. We don't need LSP. I write about this on the WIkiWikiWeb where there were many arguments

Re: What is the semantics meaning of 'object'?

2013-06-25 Thread Ian Kelly
On Tue, Jun 25, 2013 at 4:38 PM, Mark Janssen dreamingforw...@gmail.com wrote: Sorry my last message got sent prematurely. Retrying... So instead of super(), you would have sub()? It's an interesting concept, but I don't think it changes anything. You still have to design your classes

Re: What is the semantics meaning of 'object'?

2013-06-25 Thread Ian Kelly
On Tue, Jun 25, 2013 at 5:07 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On Tue, Jun 25, 2013 at 4:38 PM, Mark Janssen dreamingforw...@gmail.com wrote: The issue of classes cooperating isn't as big as it seems, because since you're working now from a useful, agreed-upon common base (the

Re: What is the semantics meaning of 'object'?

2013-06-25 Thread Mark Janssen
Combining integers with sets I can make a Rational class and have infinite-precision arithmetic, for example. Combining two integers lets you make a Rational. Ah, but what is going to group them together? You see you've already gotten seduced. Python already uses a set to group them

Re: What is the semantics meaning of 'object'?

2013-06-25 Thread Mark Janssen
Here's how it *should* be made: the most superest, most badassed object should take care of its children. New instances should automatically call up the super chain (and not leave it up to the subclasses), so that the parent classes can take care of the chil'en. When something goes wrong

Re: newbie EOL while scanning string literal

2013-06-25 Thread rurpy
On 06/25/2013 04:19 PM, willlewis...@gmail.com wrote: I'am starting to learn python reading a book and I have to do some exercises but I can't understand this one, when I run it it says EOL while scanning string literal and a red shadow next to a line of code. I'm trying to get input from

Re: newbie EOL while scanning string literal

2013-06-25 Thread willlewis965
thanks man you answered my questions very clear, btw do you know of a place where I can learn python I know some tutorials but are 2. something and I'm using 3.3 and I've been told they are different. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the semantics meaning of 'object'?

2013-06-25 Thread Ian Kelly
On Tue, Jun 25, 2013 at 5:19 PM, Mark Janssen dreamingforw...@gmail.com wrote: Combining integers with sets I can make a Rational class and have infinite-precision arithmetic, for example. Combining two integers lets you make a Rational. Ah, but what is going to group them together? You see

Python Zelda II sequel - game engine works - GPLv2

2013-06-25 Thread Turtle Wizard
Hi all, thanks to dudes on the net I can release this code : https://github.com/zork9/pygame-pyZeldaII Everything is Python/Pygame, you can download it with the following command : git clone https://github.com/zork9/pygame-pyZeldaII.git Visit my blog for screenshots :

using 3rd party dll in python - UsingTheVRTTDriver.zip (0/1)

2013-06-25 Thread Mark R Rivet
I would like to use the Gen3.dll functions from python. I understand that I can use ctypes to load the dll. I have been able to load the dll but cannot make any sense of how to use it once I have it loaded. I have been trying to understand the ctypes tutorial but I just can't wrap my head around

Proxy connection with Python

2013-06-25 Thread bevan jenkins
Hello, I have an issue that has been frustrating me for a while now. This is an update of a crosspost (http://stackoverflow.com/questions/16703936/proxy-connection-with-python) which I made over a month ago. I have been attempting to connect to URLs from python. I have tried: urllib2, urlib3,

Re: What is the semantics meaning of 'object'?

2013-06-25 Thread Mark Janssen
Combining two integers lets you make a Rational. Ah, but what is going to group them together? You see you've already gotten seduced. Python already uses a set to group them together -- it's called a Dict and it's in every Class object. When you inherit a set to make a Rational, you're

Re: io module and pdf question

2013-06-25 Thread Dave Angel
On 06/25/2013 12:15 PM, jyoun...@kc.rr.com wrote: Thank you Rusi and Christian! Something I don't think was mentioned was that reading a text file in Python 3, and specifying latin-1, will work simply because every possible 8-bit byte is a character in Latin-1 That doesn't mean that those

  1   2   >