Re: How to handle attachments passed via Postfix

2015-10-13 Thread Burak Arslan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 10/13/15 00:52, Anthony Papillion wrote: >> Check out the email.parser module, or the convenience function >> > email.message_from_string - you should be able to get at the >> > different parts (including attachments) from there. >> > > Many th

Re: Strong typing implementation for Python

2015-10-13 Thread Todd
On Oct 13, 2015 2:11 AM, "Steven D'Aprano" wrote: > > On Tue, 13 Oct 2015 04:20 am, Marko Rauhamaa wrote: > > > As for managing complexity, many people believe static typing is a > > crucial tool. I disagree. Static typing adds vast amounts of noise to > > the code. > > Only if you are stuck in th

Re: Strong typing implementation for Python

2015-10-13 Thread m
W dniu 13.10.2015 o 03:35, Michael Torrie pisze: > On 10/12/2015 06:07 PM, Steven D'Aprano wrote: >> > Where is the "vast amounts of noise" added to the code? > Well in Java code for one. No wonder they require auto-completion. > Java class-based namespaces must be a nightmare to work with. IMHO

Python not working on my system

2015-10-13 Thread Cinto Llach
I'm sending you this email, as I'm having problems trying to install and use Python. I've been tryng to install Python on one System : HP Intel Core 2 Duo 4300, 1,8 GHz 2 Gb RAM Windows XP Professional SP 3 And I've got the following screens, with no visible Command Buttons. I've been ab

Re: Python not working on my system

2015-10-13 Thread Mathew Carrick
Hi Cinto, Python 3.5 does not work on Windows XP. Can you use Python 3.4 instead? Best, Mathew Carrick On Tue, Oct 13, 2015 at 12:10 AM, Cinto Llach wrote: > I’m sending you this email, as I’m having problems trying to install and > use Python. > > > > I’ve been tryng to install Python on one

Re: Some Help getting started

2015-10-13 Thread Laura Creighton
In a message of Mon, 12 Oct 2015 16:58:40 -0600, Ian Kelly writes: >Just saying that it doesn't work doesn't help us help you. What >precisely have you tried, and what was the error that you got when you >tried it? What Ian said. Also what python version are you using and what OS? Laura -- htt

Re: Strong typing implementation for Python

2015-10-13 Thread Laura Creighton
In a message of Mon, 12 Oct 2015 19:35:57 -0600, Michael Torrie writes: >On 10/12/2015 06:07 PM, Steven D'Aprano wrote: >> Where is the "vast amounts of noise" added to the code? > >Well in Java code for one. No wonder they require auto-completion. >Java class-based namespaces must be a nightmare

Re: How to handle attachments passed via Postfix

2015-10-13 Thread Anthony Papillion
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On October 13, 2015 2:04:09 AM CDT, Burak Arslan wrote: > > >On 10/13/15 00:52, Anthony Papillion wrote: >>> Check out the email.parser module, or the convenience function >>> > email.message_from_string - you should be able to get at the >>> > d

ANN: Python Meeting Düsseldorf - 21.10.2015

2015-10-13 Thread eGenix Team: M.-A. Lemburg
[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

User defined generic types and collections.abc

2015-10-13 Thread Martí Congost
I have a package that defines a variety of collections based on the ABCs provided by collections.abc (Mapping, Sequence, etc). I wanted to take advantage of the type hinting facilities introduced in Python 3.5, and I'm having doubts as to what would be the best way to go about it. Lets take one of

Re: Strong typing implementation for Python

2015-10-13 Thread Marko Rauhamaa
Laura Creighton : > When Design Patterns were new, the 2 of the first books to come out > were 'Design Patterns'[1995] which was C++ focused, and the 'Design > Patterns Smalltalk Companion'[1998]. If you read the two of them, side > by side (as DPSTC asks you to) you will be struct by how little o

sorry for all the typos

2015-10-13 Thread Laura Creighton
re-reading what I wrote after Marko quoted it, I see an unacceptable level of typos and other sentence structure errors. I have eyedrops in my eyes today. I really cannot read what I type well enough. Amusing that my fingers find 'struct' a more reasonable thing to type than 'struck', (to me

I have this programme (annotated) I want allow it to run more than once any tips or even better python code. :)

2015-10-13 Thread abbasmo
import time #this is so that i can set a timer print ("only print numbers as your answers (Round all numbers up): ") time.sleep(2) #this is to let the person know what format to write it in# answer = input ("enter the height of the room walls between 2 to 6 metres: ") #this is the first input t

Extended functions in embedded code

2015-10-13 Thread Ervin Hegedüs
Hello there, I'm interesting for the embeding of Python code - the examples and docs are very helpfully. The main code, which embeds the Python interpreter, had written in C. There are several functions, what I have to use in embedded (Python) code, so I must to write them as Python extension. Th

dont know if it sent sorry if it has

2015-10-13 Thread abbasmo
import time #this is so that i can set a timer print ("only print numbers as your answers (Round all numbers up): ") time.sleep(2) #this is to let the person know what format to write it in# answer = input ("enter the height of the room walls between 2 to 6 metres: ") #this is the first input t

Re: Strong typing implementation for Python

2015-10-13 Thread Bartc
On 13/10/2015 11:42, Marko Rauhamaa wrote: A few years back I programmed in Java. I literally had to write (or generate) 2,000 lines of code to satisfy the structural requirements (interfaces, method stubs, javadocs, ...) before the code actually did anything. And this is the recommended langu

Re: Extended functions in embedded code

2015-10-13 Thread Laura Creighton
Are you looking for this:? https://docs.python.org/3.5/library/runpy.html or maybe this:? https://docs.python.org/3.5/library/importlib.html#importlib.import_module Or is your real problem 'I don't have a filesystem'? Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: Strong typing implementation for Python

2015-10-13 Thread Laura Creighton
In a message of Tue, 13 Oct 2015 13:31:56 +0100, Bartc writes: >On 13/10/2015 11:42, Marko Rauhamaa wrote: > >> A few years back I programmed in Java. I literally had to write (or >> generate) 2,000 lines of code to satisfy the structural requirements >> (interfaces, method stubs, javadocs, ...) be

Re: Strong typing implementation for Python

2015-10-13 Thread Steven D'Aprano
On Tue, 13 Oct 2015 06:55 pm, Todd wrote: > On Oct 13, 2015 2:11 AM, "Steven D'Aprano" wrote: >> Consider the following piece of code: >> >> def addone(x): >> return x + 1 >> >> >> The human programmer reading that can trivially infer that x must be a >> number (or at least something which s

Strict comparisons in Python 2

2015-10-13 Thread Steven D'Aprano
In Python 3, comparisons between arbitrary types raise TypeError: py> None < 2 Traceback (most recent call last): File "", line 1, in TypeError: unorderable types: NoneType() < int() In Python 2, that same comparison will arbitrarily return True or False, according to some implementation-depe

Re: Strict comparisons in Python 2

2015-10-13 Thread Ian Kelly
On Oct 13, 2015 7:48 AM, "Steven D'Aprano" wrote: > > In Python 3, comparisons between arbitrary types raise TypeError: > > py> None < 2 > Traceback (most recent call last): > File "", line 1, in > TypeError: unorderable types: NoneType() < int() > > > In Python 2, that same comparison will arb

Re: Extended functions in embedded code

2015-10-13 Thread Ervin Hegedüs
Hi, On Tue, Oct 13, 2015 at 02:51:21PM +0200, Laura Creighton wrote: > Are you looking for this:? > https://docs.python.org/3.5/library/runpy.html I think I'm not - I'm afraid, the runpy modul wasn't developed for me, for this reason. > or maybe this:? > https://docs.python.org/3.5/library/impo

Re: Extended functions in embedded code

2015-10-13 Thread Chris Angelico
On Wed, Oct 14, 2015 at 1:59 AM, Ervin Hegedüs wrote: > no, I have filesystem. I help to contribute a software, which had > written in C. The configuration schema is very simple, there are > several keywords, but not all required function could be > configure with them. Python would be a good choi

Re: Strict comparisons in Python 2

2015-10-13 Thread Random832
Ian Kelly writes: > You couldn't do this with a __future__ import because those must be > confined to the importing module and are therefore generally limited > to syntax changes. In principle, it could be a syntax change to the < operator (etc) to cause it to try to call a different method first

Re: Extended functions in embedded code

2015-10-13 Thread Ervin Hegedüs
Hi Chris, On Wed, Oct 14, 2015 at 02:05:43AM +1100, Chris Angelico wrote: > On Wed, Oct 14, 2015 at 1:59 AM, Ervin Hegedüs wrote: > > no, I have filesystem. I help to contribute a software, which had > > written in C. The configuration schema is very simple, there are > > several keywords, but no

Re: Extended functions in embedded code

2015-10-13 Thread Chris Angelico
On Wed, Oct 14, 2015 at 2:29 AM, Ervin Hegedüs wrote: >> >> Sounds to me like the easiest way would be to inject into the >> builtins. You should be able to import the builtins module from your C >> code, and then stuff some extra attributes into it; they'll be >> automatically available to the sc

Re: Strict comparisons in Python 2

2015-10-13 Thread Ian Kelly
On Tue, Oct 13, 2015 at 9:24 AM, Random832 wrote: > Ian Kelly writes: >> You couldn't do this with a __future__ import because those must be >> confined to the importing module and are therefore generally limited >> to syntax changes. > > In principle, it could be a syntax change to the < operato

Re: Extended functions in embedded code

2015-10-13 Thread Emile van Sebille
On 10/13/2015 8:29 AM, Ervin Hegedüs wrote: Hi Chris, On Wed, Oct 14, 2015 at 02:05:43AM +1100, Chris Angelico wrote: Sounds to me like the easiest way would be to inject into the builtins. You should be able to import the builtins module from your C code, and then stuff some extra attributes

Re: Some Help getting started

2015-10-13 Thread jogaserbia
Hi Glenn, Welcome to the community and thank you for creating this module. It's great you want to get this going in Python (3?). A couple of things: 1) I looked at the github repo. You do not have anything to be deployed there. Actually, that repo has nothing to do with python as of yet, as

Re: Some Help getting started

2015-10-13 Thread jogaserbia
Forgot to mention. you might want to take a look at numpy and pandas for their structures. https://github.com/numpy/numpy https://github.com/pydata/pandas I always find it easier to look at something concrete. Ivan -- https://mail.python.org/mailman/listinfo/python-list

Re: Strong typing implementation for Python

2015-10-13 Thread Sibylle Koczian
Am 13.10.2015 um 00:10 schrieb Ben Finney: Sibylle Koczian writes: Am 12.10.2015 um 13:39 schrieb Steven D'Aprano: Auto-complete is a fine and useful tool. But if you are crippled as a programmer without it, well, then you can hardly claim to understand the language or framework you are progr

request

2015-10-13 Thread Uday Pethakamsetty
Hi I am working on python 2.x for long time. I thought of testing python 3.5 for possible usage. The problem is that when I installed python 3.5, all the pip installs are directing to python 3.5, instead of my native python 2.7. I heard of a feature called pylauancher; but I didn't find any sa

Re: request

2015-10-13 Thread paul.hermeneutic
On Oct 13, 2015 1:16 PM, "Uday Pethakamsetty" wrote: > The problem is that when I installed python 3.5, all the pip installs are directing to python 3.5, instead of my native python 2.7. > Probably, this is because the Python 3 directories appears first in the PATH variable. Python 3 has venv.

Re: request

2015-10-13 Thread Mathew Carrick
Hi Uday, Pip should support using the pip{version} command to install version-specific packages. Try using pip2.7 to install 2.7 packages. Best, Mathew Carrick On Tue, Oct 13, 2015 at 2:45 AM, Uday Pethakamsetty < uday.pethakamse...@infor.com> wrote: > Hi > > > > I am working on python 2.x for

Re: request

2015-10-13 Thread Laura Creighton
In a message of Tue, 13 Oct 2015 13:28:29 -0600, paul.hermeneu...@gmail.com wri tes: >On Oct 13, 2015 1:16 PM, "Uday Pethakamsetty" >wrote: > >> The problem is that when I installed python 3.5, all the pip installs are >directing to python 3.5, instead of my native python 2.7. >> > >Probably, this

Re: Extended functions in embedded code

2015-10-13 Thread Ervin Hegedüs
Hi Chris, what I misses: currently I'm using Python 2.7. On Wed, Oct 14, 2015 at 02:48:57AM +1100, Chris Angelico wrote: > On Wed, Oct 14, 2015 at 2:29 AM, Ervin Hegedüs wrote: > >> > >> Sounds to me like the easiest way would be to inject into the > >> builtins. You should be able to import the

Re: Extended functions in embedded code

2015-10-13 Thread Ervin Hegedüs
Hi, On Tue, Oct 13, 2015 at 08:55:42AM -0700, Emile van Sebille wrote: > On 10/13/2015 8:29 AM, Ervin Hegedüs wrote: > >Hi Chris, > > > >On Wed, Oct 14, 2015 at 02:05:43AM +1100, Chris Angelico wrote: > > >>Sounds to me like the easiest way would be to inject into the > >>builtins. You should be

Re: Extended functions in embedded code

2015-10-13 Thread Emile van Sebille
On 10/13/2015 1:32 PM, Ervin Hegedüs wrote: Hi, On Tue, Oct 13, 2015 at 08:55:42AM -0700, Emile van Sebille wrote: On 10/13/2015 8:29 AM, Ervin Hegedüs wrote: Hi Chris, On Wed, Oct 14, 2015 at 02:05:43AM +1100, Chris Angelico wrote: Sounds to me like the easiest way would be to inject into

Re: Extended functions in embedded code

2015-10-13 Thread Laura Creighton
In a message of Tue, 13 Oct 2015 22:28:54 +0200, Ervin Hegedüs writes: >Hi Chris, > >what I misses: currently I'm using Python 2.7. > >On Wed, Oct 14, 2015 at 02:48:57AM +1100, Chris Angelico wrote: >> On Wed, Oct 14, 2015 at 2:29 AM, Ervin Hegedüs wrote: >> >> >> >> Sounds to me like the easiest

Re: Strong typing implementation for Python

2015-10-13 Thread Gregory Ewing
Ben Finney wrote: * The overwhelming majority of .NET and Java programmers would feel crippled without auto-complete. (assertion made by Sibylle) An obvious resolution is to conclude that the overwhelming majority of Java and .NET programmers cannot claim to understand those technologies. A

Re: Strong typing implementation for Python

2015-10-13 Thread Gregory Ewing
Bartc wrote: I've surprised Basic needs it. The last time I looked, $A was a string, %B an integer, and C a number. A$ and B%, actually. Although if you didn't like the type suffixes, you could say DEFINT I-N and pretend you were writing Fortran code. :-) -- Greg -- https://mail.python.org/ma

Re: Strong typing implementation for Python

2015-10-13 Thread Gregory Ewing
m wrote: W dniu 13.10.2015 o 03:35, Michael Torrie pisze: Well in Java code for one. No wonder they require auto-completion. Java class-based namespaces must be a nightmare to work with. IMHO mainly because their naming convention. They just love typing long names. The biggest verbosity p

Re: Extended functions in embedded code

2015-10-13 Thread Chris Angelico
On Wed, Oct 14, 2015 at 7:28 AM, Ervin Hegedüs wrote: > Hi Chris, > > what I misses: currently I'm using Python 2.7. Oh, sorry. In that case, you'll be importing "__builtin__" rather than "builtins", but the same technique works. > On Wed, Oct 14, 2015 at 02:48:57AM +1100, Chris Angelico wrote:

Re: Strong typing implementation for Python

2015-10-13 Thread Josef Pktd
On Tuesday, October 13, 2015 at 2:52:32 PM UTC-4, Sibylle Koczian wrote: > Am 13.10.2015 um 00:10 schrieb Ben Finney: > > Sibylle Koczian <> writes: > > > >> Am 12.10.2015 um 13:39 schrieb Steven D'Aprano: > >>> Auto-complete is a fine and useful tool. But if you are crippled as a > >>> programmer

Re: Strong typing implementation for Python

2015-10-13 Thread Josef Pktd
On Tuesday, October 13, 2015 at 9:40:56 AM UTC-4, Steven D'Aprano wrote: > On Tue, 13 Oct 2015 06:55 pm, Todd wrote: > > > On Oct 13, 2015 2:11 AM, "Steven D'Aprano" <...> wrote: > > >> Consider the following piece of code: > >> > >> def addone(x): > >> return x + 1 > >> > >> > >> The human p

Re: Strict comparisons in Python 2

2015-10-13 Thread Terry Reedy
On 10/13/2015 9:43 AM, Steven D'Aprano wrote: In Python 3, comparisons between arbitrary types raise TypeError: py> None < 2 Traceback (most recent call last): File "", line 1, in TypeError: unorderable types: NoneType() < int() In Python 2, that same comparison will arbitrarily return Tru

Re: request

2015-10-13 Thread Zachary Ware
On Tue, Oct 13, 2015 at 5:45 AM, Uday Pethakamsetty wrote: > Hi > > I am working on python 2.x for long time. > > I thought of testing python 3.5 for possible usage. > > The problem is that when I installed python 3.5, all the pip installs are > directing to python 3.5, instead of my native python

Re: [mdi...@grulic.org.ar: modifying locals]

2015-10-13 Thread dieter
Marcos Dione writes: > ... > My problem is modifying the > locals ... In Python 2.7, I succeeded with the following code: >>> def f(): ... x = 1 ... exec('x=2') ... return x ... >>> f() 2 -- https://mail.python.org/mailman/listinfo/python-list

Re: Extended functions in embedded code

2015-10-13 Thread Ervin Hegedüs
On Wed, Oct 14, 2015 at 12:02:36AM +0200, Laura Creighton wrote: > In a message of Tue, 13 Oct 2015 22:28:54 +0200, Ervin Hegedüs writes: > >Hi Chris, > > > >what I misses: currently I'm using Python 2.7. > > > >On Wed, Oct 14, 2015 at 02:48:57AM +1100, Chris Angelico wrote: [...] > > > >PyModule_