Re: [Tutor] Dictionaries and multiple keys/values

2013-03-26 Thread Dave Angel
On 03/26/2013 12:36 AM, Robert Sjoblom wrote: Hi again, Tutor List. I am trying to figure out a problem I've run into. Let me first say that this is an assignment, so please don't give me any answers, but just nudge me in the general direction. So the task is this: from a text file, populate

Re: [Tutor] Dictionaries and multiple keys/values

2013-03-26 Thread Alan Gauld
On 26/03/13 04:36, Robert Sjoblom wrote: Georgie Porgie 87% $$$ Canadian, Pub Food So a 5 line pattern with 4 data fields. The last one containing multiple comma separated values, potentially. The three dictionaries are: name_to_rating = {} price_to_names = {'$': [], '$$': [], '$$$':

[Tutor] PyDtls

2013-03-26 Thread Mousumi Basu
I have installed PyDtls from the link:- https://pypi.python.org/pypi/Dtls/0.1.0;. While creating the server and client objects in sslconnection.py, it is referring to x509.py for certificates. Following error is occurring :- File

Re: [Tutor] PyDtls

2013-03-26 Thread Dave Angel
On 03/26/2013 08:16 AM, Mousumi Basu wrote: I have installed PyDtls from the link:- https://pypi.python.org/pypi/Dtls/0.1.0;. While creating the server and client objects in sslconnection.py, it is referring to x509.py for certificates. Following error is

[Tutor] Udp socket questio

2013-03-26 Thread Phil
Thank you for reading this. I'm a bit out of my depth here. I'm attempting to set up a simple udp client. The example that follows results in an error message and I'm wondering if I should be importing a different module. A Google search doesn't support that idea. '' udp socket

Re: [Tutor] Udp socket questio

2013-03-26 Thread Dave Angel
On 03/26/2013 07:30 AM, Phil wrote: Thank you for reading this. I'm a bit out of my depth here. I'm attempting to set up a simple udp client. The example that follows results in an error message and I'm wondering if I should be importing a different module. A Google search doesn't support that

Re: [Tutor] PyDtls

2013-03-26 Thread Alan Gauld
On 26/03/13 12:16, Mousumi Basu wrote: I have installed PyDtls from the link:-https://pypi.python.org/pypi/Dtls/0.1.0;. This list is for learning the python language and standard library. Anything beyond that you are taking pot luck whether anyone here knows about it. You

Re: [Tutor] PyDtls

2013-03-26 Thread eryksun
On Tue, Mar 26, 2013 at 8:16 AM, Mousumi Basu mousumi...@gmail.com wrote: FileC:\dtls\Dtls-0.1.0.sdist_with_openssl.win32\Dtls-0.1.0\dtls\openssl.py, line 74 in module You didn't install the package. Run python setup.py install. This will install it to Lib\site-packages\Dtls and copy the

[Tutor] Building Python 2.7.3 on RHEL 5.8 x86_64 -- Syntax Error

2013-03-26 Thread Sean Carolan
I'm attempting to use setup.py to build an RPM, but ran into this error: [scarolan@cobbler:~/rpmbuild/BUILD/Python-2.7.3]$ python27 setup.py bdist_rpm File setup.py, line 361 with open(tmpfile) as fp: ^ SyntaxError: invalid syntax error: Bad exit status from

Re: [Tutor] Building Python 2.7.3 on RHEL 5.8 x86_64 -- Syntax Error

2013-03-26 Thread Amit Saha
On Wed, Mar 27, 2013 at 12:55 AM, Sean Carolan scaro...@gmail.com wrote: I'm attempting to use setup.py to build an RPM, but ran into this error: [scarolan@cobbler:~/rpmbuild/BUILD/Python-2.7.3]$ python27 setup.py bdist_rpm File setup.py, line 361 with open(tmpfile) as fp:

Re: [Tutor] Building Python 2.7.3 on RHEL 5.8 x86_64 -- Syntax Error

2013-03-26 Thread Sean Carolan
Could it be that it is taking the system python executable which is probably 2.4? -Amit. I've tried it with python24, python25 and python27 and all of them give the same error. ___ Tutor maillist - Tutor@python.org To unsubscribe or change

Re: [Tutor] Building Python 2.7.3 on RHEL 5.8 x86_64 -- Syntax Error

2013-03-26 Thread Sean Carolan
Ok, so I'm now attempting a clean room installation using Python 2.7.3 to build the RPM. Here's my installation command: ./configure --with-zlib=/usr/include; make; sudo make install But the bdist_rpm setup command fails: [scarolan@titania:~/Python-2.7.3]$ python2.7 setup.py bdist_rpm error:

Re: [Tutor] Building Python 2.7.3 on RHEL 5.8 x86_64 -- Syntax Error

2013-03-26 Thread Hugo Arts
On Tue, Mar 26, 2013 at 3:18 PM, Sean Carolan scaro...@gmail.com wrote: Could it be that it is taking the system python executable which is probably 2.4? -Amit. I've tried it with python24, python25 and python27 and all of them give the same error. What it looks like to me is that

Re: [Tutor] Building Python 2.7.3 on RHEL 5.8 x86_64 -- Syntax Error

2013-03-26 Thread Sean Carolan
What it looks like to me is that while you run (using python 2.7): python27 setup.py bdist_rpm doing that generates a temporary bash script, which in turn runs: python setup.py build Yea, I checked this, and /usr/local/bin/python is just a symlink pointing at /usr/local/bin/python2.7.

Re: [Tutor] Building Python 2.7.3 on RHEL 5.8 x86_64 -- Syntax Error

2013-03-26 Thread Walter Prins
Hi, On 26 March 2013 16:54, Hugo Arts hugo.yo...@gmail.com wrote: On Tue, Mar 26, 2013 at 3:18 PM, Sean Carolan scaro...@gmail.com wrote: Could it be that it is taking the system python executable which is probably 2.4? -Amit. I've tried it with python24, python25 and python27 and

Re: [Tutor] Building Python 2.7.3 on RHEL 5.8 x86_64 -- Syntax Error

2013-03-26 Thread eryksun
On Tue, Mar 26, 2013 at 11:18 AM, Sean Carolan scaro...@gmail.com wrote: I've tried it with python24, python25 and python27 and all of them give the same error. After looking at the source, I think the option python=python2.7 may solve the problem.

Re: [Tutor] PyDtls

2013-03-26 Thread eryksun
On Tue, Mar 26, 2013 at 12:59 PM, Mousumi Basu mousumi...@gmail.com wrote: I have run the following command previously in the command prompt:- C:\dtls\Dtls-0.1.0.sdist_with_openssl.win32\Dtls-0.1.0\dtls python setup.py install Was that incorrect?Please help me out as i am eager to learn

Re: [Tutor] PyDtls

2013-03-26 Thread eryksun
On Tue, Mar 26, 2013 at 1:35 PM, eryksun eryk...@gmail.com wrote: C:\dtls\Dtls-0.1.0.sdist_with_openssl.win32\Dtls-0.1.0\dtls python setup.py install Was that incorrect?Please help me out as i am eager to learn about pydtls. That's fine, On 2nd thought, that's not fine. setup.py is located

Re: [Tutor] Dictionaries and multiple keys/values

2013-03-26 Thread David Rock
* Robert Sjoblom robert.sjob...@gmail.com [2013-03-26 05:36]: brittle. However, even if I was happy with that, I can't figure out what to do in the situation where: data[i+3] = 'Canadian, Pub Food' #should be two items, is currently a string. My problem is that I'm... stupid. I can split the

Re: [Tutor] Building Python 2.7.3 on RHEL 5.8 x86_64 -- Syntax Error

2013-03-26 Thread Sean Carolan
http://hg.python.org/cpython/file/d321885ff8f3/Lib/distutils/command/bdist_rpm.py#l23 No dice. [scarolan@titania:~/Python-2.7.3]$ alias | grep python alias python='/usr/local/bin/python2.7' [scarolan@titania:~/Python-2.7.3]$ /usr/local/bin/python2.7 setup.py bdist_rpm error: pyconfig.h: No

Re: [Tutor] Building Python 2.7.3 on RHEL 5.8 x86_64 -- Syntax Error

2013-03-26 Thread Sean Carolan
If so, what was your secret? I tried running this again with strace, and it looks like it's finding the pyconfig.h file: open(/usr/local/include/python2.7/pyconfig.h, O_RDONLY) = 4 read(4, /* pyconfig.h. Generated from p..., 4096) = 4096 stat(pyconfig.h, {st_mode=S_IFREG|0664, st_size=36037,

Re: [Tutor] Building Python 2.7.3 on RHEL 5.8 x86_64 -- Syntax Error

2013-03-26 Thread Alan Gauld
On 26/03/13 19:04, Sean Carolan wrote: Has anyone on this list successfully built a python 2.7 RPM using this command? python2.7 setup.py bdist_rpm Given that most folks on this list are only learning Python its pretty unlikely that they are building bespoke RPMs... You might find more

Re: [Tutor] Building Python 2.7.3 on RHEL 5.8 x86_64 -- Syntax Error

2013-03-26 Thread Sean Carolan
Given that most folks on this list are only learning Python its pretty unlikely that they are building bespoke RPMs... You might find more experience of RPM building on the general Python mailing list/newsgroup. Sorry 'bout that. I'll follow up with the bug report and possibly the general

Re: [Tutor] Building Python 2.7.3 on RHEL 5.8 x86_64 -- Syntax Error

2013-03-26 Thread Prasad, Ramit
Sean Carolan wrote: [Alan Gauld wrote:] Given that most folks on this list are only learning Python its pretty unlikely that they are building bespoke RPMs... You might find more experience of RPM building on the general Python mailing list/newsgroup. Sorry 'bout that.  I'll

Re: [Tutor] Building Python 2.7.3 on RHEL 5.8 x86_64 -- Syntax Error

2013-03-26 Thread Amit Saha
On Wed, Mar 27, 2013 at 7:32 AM, Sean Carolan scaro...@gmail.com wrote: Given that most folks on this list are only learning Python its pretty unlikely that they are building bespoke RPMs... You might find more experience of RPM building on the general Python mailing list/newsgroup. Sorry

Re: [Tutor] Building Python 2.7.3 on RHEL 5.8 x86_64 -- Syntax Error

2013-03-26 Thread Amit Saha
On Wed, Mar 27, 2013 at 7:32 AM, Sean Carolan scaro...@gmail.com wrote: Given that most folks on this list are only learning Python its pretty unlikely that they are building bespoke RPMs... You might find more experience of RPM building on the general Python mailing list/newsgroup. Sorry