Re: pycparser error or openSUSE error

2015-08-31 Thread Cecil Westerhof
On Saturday 29 Aug 2015 01:22 CEST, Laura Creighton wrote: > In a message of Sat, 29 Aug 2015 00:51:57 +0200, Cecil Westerhof > writes: >> When doing a ‘zypper update’ on openSUSE I get: Installing: >> python-pycparser-2.12-8.2 >> ...

Re: pycparser error or openSUSE error

2015-08-31 Thread Cecil Westerhof
On Saturday 29 Aug 2015 01:30 CEST, Laura Creighton wrote: > In a message of Sat, 29 Aug 2015 01:22:54 +0200, Laura Creighton > writes: >> In a message of Sat, 29 Aug 2015 00:51:57 +0200, Cecil Westerhof >> writes: >>> When doing a ‘zypper update’ on openSUSE I get: Installing: >>> python-pycparse

install pip

2015-08-31 Thread chenc...@inhand.com.cn
hi: I cross compiled python2.7.10 and install python on my embedded device. But now, I may install pip on my embedded device. So, how can i do that? -- https://mail.python.org/mailman/listinfo/python-list

Why Python is not both an interpreter and a compiler?

2015-08-31 Thread Mahan Marwat
What I know about an interpreter and a compiler is: they both convert source code to machine code and the only difference is, an interpreter convert it, line by line while compiler convert the whole source file. Now if we compile a C source file on C compiler, it will produce a small executable

Re: Why Python is not both an interpreter and a compiler?

2015-08-31 Thread Chris Angelico
On Mon, Aug 31, 2015 at 6:35 PM, Mahan Marwat wrote: > What I know about an interpreter and a compiler is: they both convert source > code to machine code and the only difference is, an interpreter convert it, > line by line while compiler convert the whole source file. > Now if we compile a C s

Re: install pip

2015-08-31 Thread Laura Creighton
In a message of Mon, 31 Aug 2015 15:38:26 +0800, "chenc...@inhand.com.cn" write s: >hi: >I cross compiled python2.7.10 and install python on my embedded >device. But now, I may install pip on my embedded device. So, how can i >do that? https://pip.pypa.io/en/latest/installing.html This is n

pip

2015-08-31 Thread chenc...@inhand.com.cn
hi: Python 2.7.9 and later (on the python2 series), and Python 3.4 and later include pip by default.But i can not find it in python2.7.10 package. What's the matter? How can i install pip on my Embedded device? -- https://mail.python.org/mailman/listinfo/python-list

Re: pip

2015-08-31 Thread Chris Warrick
On 31 August 2015 at 11:43, chenc...@inhand.com.cn wrote: > hi: > Python 2.7.9 and later (on the python2 series), and Python 3.4 and later > include pip by default.But i can not find it in python2.7.10 package. What's > the matter? How can i install pip on my Embedded device? > > > -- > https:

Re: Why Python is not both an interpreter and a compiler?

2015-08-31 Thread Cameron Simpson
On 31Aug2015 01:35, Mahan Marwat wrote: What I know about an interpreter and a compiler is: they both convert source code to machine code and the only difference is, an interpreter convert it, line by line while compiler convert the whole source file. This is simplistic and misleading. Comp

Re: Why Python is not both an interpreter and a compiler?

2015-08-31 Thread Ben Finney
Mahan Marwat writes: > What I know about an interpreter and a compiler is: they both convert > source code to machine code Yes, Python implementations always compile the source code to machine code. The target machine for the Python compiler, though, is a virtual machine which then gets emulated

Re: Why Python is not both an interpreter and a compiler?

2015-08-31 Thread Marko Rauhamaa
Ben Finney : > Yes, that's because the C language is low-level enough that a compiler > can target directly the host CPU's machine code. A Python program, > though, is written in a dynamic language, which is compiled to a > virtual machine code, which needs the Python virtual machine as well > to

Re: RPI.GPIO Help

2015-08-31 Thread John McKenzie
Dennis, Hakugin, I tried your scripts and had to alter a typo here or there, but once the basic errors disappeared I had the same error message. "Conflicting edge detection already enabled for this GPIO channel". As much as I despise web based bulletin board systems I registered on the Rasp

Re: Why Python is not both an interpreter and a compiler?

2015-08-31 Thread Mahan Marwat
> Python programs *could* easily be compiled the same way, but it generally > hasn't been considered all that useful. If it hasn't been considered all that useful, then why the tools like cx_freeze, pytoexe are doing very hard! And if it is really easy, then why cx_freeze, pytoexe developer are

Re: Why Python is not both an interpreter and a compiler?

2015-08-31 Thread Emile van Sebille
On 8/31/2015 10:48 AM, Mahan Marwat wrote: Python programs *could* easily be compiled the same way, but it generally hasn't been considered all that useful. If it hasn't been considered all that useful, then why the tools like cx_freeze, pytoexe are doing very hard! People scratching their o

Re: RPI.GPIO Help

2015-08-31 Thread MRAB
On 2015-08-31 18:41, John McKenzie wrote: Dennis, Hakugin, I tried your scripts and had to alter a typo here or there, but once the basic errors disappeared I had the same error message. "Conflicting edge detection already enabled for this GPIO channel". Are you still calling GPIO.add_event_

Re: RPI.GPIO Help

2015-08-31 Thread hakugin . gin
On Monday, August 31, 2015 at 1:42:16 PM UTC-4, John McKenzie wrote: > Dennis, Hakugin, I tried your scripts and had to alter a typo here or > there, but once the basic errors disappeared I had the same error > message. "Conflicting edge detection already enabled for this GPIO > channel". > >

Re: RPI.GPIO Help

2015-08-31 Thread Tim Daneliuk
On 08/16/2015 02:40 PM, John McKenzie wrote: > > Hello, all. I am hoping some people here are familiar with the RPi.GPIO > python module for the Raspberry Pi. I am not familiar with the module, but I am quite familiar with dealing with hardware interfacing, mostly in assembler. One thing you

AttributeError: 'module' object has no attribute '__path__'

2015-08-31 Thread kbtyo
I am using Jupyter notebooks, with Python 3.4. The error below references the Anaconda distribution package. This error occurred quite precipitously (only 2 minutes before I was able to import the modules). I am using Windows 7. My path in the console uses Python27. I also have python 34 as wel

Re: AttributeError: 'module' object has no attribute '__path__'

2015-08-31 Thread Laura Creighton
Check and see if you have a file in your working directory with the very same name as a module you are trying to import, or the_same_name.py If so, change the name of that file to something else. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: AttributeError: 'module' object has no attribute '__path__'

2015-08-31 Thread Saran Ahluwalia
Laura, It does not appear to be the case. I actually had to actually unset the PYTHONPATH. Thanks for your suggestion. Sincerely, Saran On Mon, Aug 31, 2015 at 4:17 PM, Laura Creighton wrote: > Check and see if you have a file in your working directory with the > very same name as a module yo

Re: AttributeError: 'module' object has no attribute '__path__'

2015-08-31 Thread Laura Creighton
In a message of Mon, 31 Aug 2015 17:01:07 -0400, Saran Ahluwalia writes: >Laura, > >It does not appear to be the case. I actually had to actually unset the >PYTHONPATH. > >Thanks for your suggestion. > >Sincerely, >Saran Are you and kbtyo the same person? If deleting your PYTHONPATH fixed it, th

Re: Why Python is not both an interpreter and a compiler?

2015-08-31 Thread Ben Finney
Mahan Marwat writes: > > Python programs *could* easily be compiled the same way, but it generally > > hasn't been considered all that useful. > > If it hasn't been considered all that useful, then why the tools like > cx_freeze, pytoexe are doing very hard! Thay don't compile to machine code

Hi am new to python

2015-08-31 Thread Chubasco Diranga
Can anyone please help me with the following please? My question is in a while loop; how do l sum all the numbers in the given list (list_a)? list_a = [8, 5, 2, 4] sum_a = 0 # for storing the sum of list_a i = 0 # for looping through the list_a# Use a while loop to sum all numbers in list_a# If

Re: Hi am new to python

2015-08-31 Thread Ian Kelly
On Mon, Aug 31, 2015 at 5:27 PM, Chubasco Diranga wrote: > Can anyone please help me with the following please? > > My question is in a while loop; how do l sum all the numbers in the given > list (list_a)? > > list_a = [8, 5, 2, 4] > sum_a = 0 # for storing the sum of list_a > i = 0 # for loopin

Re: Hi am new to python

2015-08-31 Thread Emile van Sebille
On 8/31/2015 4:27 PM, Chubasco Diranga wrote: Can anyone please help me with the following please? My question is in a while loop; how do l sum all the numbers in the given list (list_a)? list_a = [8, 5, 2, 4] sum_a = 0 # for storing the sum of list_a i = 0 # for looping through the list_a# Us

Re: Hi am new to python

2015-08-31 Thread Chris Angelico
On Tue, Sep 1, 2015 at 9:27 AM, Chubasco Diranga wrote: > Can anyone please help me with the following please? > > My question is in a while loop; how do l sum all the numbers in the given > list (list_a)? > > list_a = [8, 5, 2, 4] > sum_a = 0 # for storing the sum of list_a > i = 0 # for looping

Re: Hi am new to python

2015-08-31 Thread Ben Finney
Chubasco Diranga writes: > Can anyone please help me with the following please? Welcome! Is this a homework assignment? It's okay to ask for help with those, but we're not going to do the work for you. > My question is in a while loop; how do l sum all the numbers in the > given list (list_a)?

more itertools

2015-08-31 Thread Mark Lawrence
This contained the itertool recipes and was available on pypi but looks like it's gone. Can anybody tell me if it's defunct, superceeded or what? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/

Re: more itertools

2015-08-31 Thread Chris Angelico
On Tue, Sep 1, 2015 at 11:42 AM, Mark Lawrence wrote: > This contained the itertool recipes and was available on pypi but looks like > it's gone. Can anybody tell me if it's defunct, superceeded or what? This one? https://pypi.python.org/pypi/more-itertools/ Though it hasn't been updated in a

Re: more itertools

2015-08-31 Thread Chris Rebert
On Mon, Aug 31, 2015 at 6:42 PM, Mark Lawrence wrote: > This contained the itertool recipes and was available on pypi but looks like > it's gone. Can anybody tell me if it's defunct, superseded or what? What do you mean? It's still there AFAICT: https://pypi.python.org/pypi/more-itertools St

Re: more itertools

2015-08-31 Thread Mark Lawrence
On 01/09/2015 02:52, Chris Rebert wrote: On Mon, Aug 31, 2015 at 6:42 PM, Mark Lawrence wrote: This contained the itertool recipes and was available on pypi but looks like it's gone. Can anybody tell me if it's defunct, superseded or what? What do you mean? It's still there AFAICT: http

Re: more itertools

2015-08-31 Thread Chris Angelico
On Tue, Sep 1, 2015 at 12:12 PM, Mark Lawrence wrote: > Thanks Chris, and Chris Angelico. Just to make sure I'm not completely > barking can you try a search on pypi, as I know I've found it that way in > the past, but literally not right now. The first hit I get for 'itertools' > is picklable-i

Re: more itertools

2015-08-31 Thread Mark Lawrence
On 01/09/2015 03:20, Chris Angelico wrote: On Tue, Sep 1, 2015 at 12:12 PM, Mark Lawrence wrote: Thanks Chris, and Chris Angelico. Just to make sure I'm not completely barking can you try a search on pypi, as I know I've found it that way in the past, but literally not right now. The first hi

Re: AttributeError: 'module' object has no attribute '__path__'

2015-08-31 Thread Rustom Mody
On Tuesday, September 1, 2015 at 3:46:15 AM UTC+5:30, Laura Creighton wrote: > Can you make the effort to move your cursor to the bottom of > the mail you are replying to, before you start typing, > so that your reply comes after what was said before, instead of > first thing, and thus before what

Re: AttributeError: 'module' object has no attribute '__path__'

2015-08-31 Thread Chris Angelico
On Tue, Sep 1, 2015 at 1:32 PM, Rustom Mody wrote: > On Tuesday, September 1, 2015 at 3:46:15 AM UTC+5:30, Laura Creighton wrote: >> Can you make the effort to move your cursor to the bottom of >> the mail you are replying to, before you start typing, >> so that your reply comes after what was sai

Extra AttributeError inside property - possible bug ?

2015-08-31 Thread dunric29a
Hello, bellow is a simple Python2 example of a class which defines __getattr__ method and a property, where AttributeError exception is raised: from __future__ import print_function class MyClass(object): def __getattr__(self, name): print('__getattr__ <<', name) raise Attri

Re: more itertools

2015-08-31 Thread dieter
Mark Lawrence writes: > ... > can you try a search on pypi, as I know I've found > it that way in the past, but literally not right now. I have recently made a similar experience with "Products.CMFPlacefulWorkflow". Searching for this product does not find the package but "https://pypi.python.org

Re: Why Python is not both an interpreter and a compiler?

2015-08-31 Thread Luca Menegotto
Il 31/08/2015 19:48, Mahan Marwat ha scritto: If it hasn't been considered all that useful, then why > the tools like cx_freeze, pytoexe are doing very hard! Well, I consider those tools useless at all! I appreciate Python because, taken one or two precautions, I can easily port my code from

Re: more itertools

2015-08-31 Thread dieter
Mark Lawrence writes: > ... > But then you go to check > which bug tracker and what do you find but > https://bitbucket.org/pypa/pypi/issues/326/some-packages-not-showing-up-when Thus, the reporting is already done. Hope, there will be a fix soon :-) -- https://mail.python.org/mailman/listinfo/