Re: Help with suds: HTTP Error 401

2014-07-29 Thread dieter
> ... HTTP Error 401 means "Unauthorized": the service you tried to use requires authentication and either it has not found authentication information or it was wrong. -- https://mail.python.org/mailman/listinfo/python-list

Re: rpath alike feature for python scripts

2014-07-29 Thread dieter
Olaf Hering writes: > On Mon, Jul 28, Albert-Jan Roskam wrote: >> does this help: https://nixos.org/patchelf.html. It is not specific to >> Python, though. > > No, this does not help because its not about patching the result. > The questions is how to obtain the value with should be patched into

Re: Load a CSV with different row lengths

2014-07-29 Thread Miki Tebeka
Greetings, > I should've mentioned that I want to import my csv as a data frame or numpy > array or as a table. If you know the max length of a row, then you can do something like: def gen_rows(stream, max_length): for row in csv.reader(stream): yield row + ([None] * (max_

Re: Help with suds: HTTP Error 401

2014-07-29 Thread manelclos
Use a SUDS fork that works, I tried https://github.com/unomena/suds See here: http://stackoverflow.com/questions/18455945/python-suds-runtimeerror-maximum-recursion-depth-exceeded-while-calling-a-pyth/24908676#24908676 -- https://mail.python.org/mailman/listinfo/python-list

Re: Windows Studio 2008 Download

2014-07-29 Thread TP
On Tue, Jul 29, 2014 at 5:54 AM, Colin J. Williams wrote: > ii. The Service Pack 1 has the original studio as a prerequisite. That is > no longer available from Microsoft. I haven't tried it but the Visual Studio 2008 Professional 90 Day Trial iso *is* available from Microsoft at [1]. This doe

Re: Exploring Python for next desktop GUI Project

2014-07-29 Thread pecore
Roy Smith writes: > In article <87mwbtjg9r@pascolo.net>, pec...@pascolo.net wrote: > >> >> 2. Python 2 or 3? Which will serve me better in the future? >> > >> > Long term (7 years), [Python] 3. >> >> I have STRONG suicidal intent and no access to treatment, >> should I better learn Python 2?

Re: lxml and namespaces

2014-07-29 Thread Irmen de Jong
On 29-7-2014 20:35, Marc Aymerich wrote: > Got it! > xml = lxml.builder.ElementMaker( > nsmap = { > None: "urn:iso:std:iso:20022:tech:xsd:pain.008.001.02", > 'xsi': "http://www.w3.org/2001/XMLSchema-instance";, > } > ) > doc = xml.Document() Thanks for taking the tim

Re: lxml and namespaces

2014-07-29 Thread Marc Aymerich
On Tue, Jul 29, 2014 at 8:19 PM, Marc Aymerich wrote: > Hi, I'm desperately trying to construct an XML with the following document > declaration: > > xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”> > > I'm using LXML, and what I'm doing is this > > >>> from lxml import etree > >>>

lxml and namespaces

2014-07-29 Thread Marc Aymerich
Hi, I'm desperately trying to construct an XML with the following document declaration: http://www.w3.org/2001/XMLSchema-instance”> I'm using LXML, and what I'm doing is this >>> from lxml import etree >>> from lxml.builder import E >>> doc = E.Document( ... { ... 'xmlns': "urn:iso:s

Re: Windows Studio 2008 Download

2014-07-29 Thread Chris Angelico
On Tue, Jul 29, 2014 at 10:54 PM, Colin J. Williams wrote: > i. I've seen notes, in various places to say that the Express version is > not acceptable for compiling Python packages. Is it, in fact usable for > this purpose? I'm not 100% sure on the details, but I do believe the intention was al

Re: Windows Studio 2008 Download

2014-07-29 Thread Mark Lawrence
On 29/07/2014 13:54, Colin J. Williams wrote: i. I've seen notes, in various places to say that the Express version is not acceptable for compiling Python packages. Is it, in fact usable for this purpose? All wrong, I've been using the express editions for years with no problems. See here f

Re: Load a CSV with different row lengths

2014-07-29 Thread Ryan de Vera
Hey skip, I should've mentioned that I want to import my csv as a data frame or numpy array or as a table. Best regards, Ryan On Tue, Jul 29, 2014 at 6:29 AM, Skip Montanaro wrote: > > How can I load this into python? I tried using both NumPy and Pandas. > > To add to Peter's response, I wou

Re: Windows Studio 2008 Download

2014-07-29 Thread Colin J. Williams
i. I've seen notes, in various places to say that the Express version is not acceptable for compiling Python packages. Is it, in fact usable for this purpose? ii. The Service Pack 1 has the original studio as a prerequisite. That is no longer available from Microsoft. Any advice would be welco

Re: Load a CSV with different row lengths

2014-07-29 Thread Skip Montanaro
> How can I load this into python? I tried using both NumPy and Pandas. To add to Peter's response, I would be very surprised if numpy or Pandas couldn't be coaxed into loading your CSV file, but you didn't provide any details about what you expected and what you got. I've used Pandas to read CSV

Re: What happens when you 'break' a generator?

2014-07-29 Thread Frank Millman
"Peter Otten" <__pete...@web.de> wrote in message news:lr7ilg$de4$1...@ger.gmane.org... > Frank Millman wrote: > >> Hi all >> >> Python 3.4.1 >> >> Here is a simple generator - >> >> def test(): >> print('start') >> for i in range(5): >> yield i >> print('done') >> >> x = test

Re: What happens when you 'break' a generator?

2014-07-29 Thread Terry Reedy
On 7/29/2014 3:18 AM, Frank Millman wrote: Hi all Python 3.4.1 Here is a simple generator - def test(): print('start') for i in range(5): yield i print('done') x = test() for j in x: print(j) As expected, the output is - start 0 1 2 3 4 done Here I break the lo

Re: What happens when you 'break' a generator?

2014-07-29 Thread Johannes Schneider
On 29.07.2014 09:18, Frank Millman wrote: there's not print 'done' statement at the and. Here I break the loop - x = test() for j in x: print(j) if j == 2: break Now the output is - start 0 1 2 'done' does not appear, so the generator does not actually terminate. What ha

Re: Load a CSV with different row lengths

2014-07-29 Thread Peter Otten
Ryan de Vera wrote: > I am trying to load a csv with different row lengths. For example, > > I have the csv > > a,b > a,b,c,d > a,b,c > > How can I load this into python? I tried using both NumPy and Pandas. The csv module in the standard library can deal with varying row lengths just fine:

Re: rpath alike feature for python scripts

2014-07-29 Thread Olaf Hering
On Mon, Jul 28, Albert-Jan Roskam wrote: > does this help: https://nixos.org/patchelf.html. It is not specific to > Python, though. No, this does not help because its not about patching the result. The questions is how to obtain the value with should be patched into the result. Looks like I hav

Re: What happens when you 'break' a generator?

2014-07-29 Thread Peter Otten
Frank Millman wrote: > Hi all > > Python 3.4.1 > > Here is a simple generator - > > def test(): > print('start') > for i in range(5): > yield i > print('done') > > x = test() > for j in x: > print(j) > > As expected, the output is - > > start > 0 > 1 > 2 > 3 > 4 > don

Load a CSV with different row lengths

2014-07-29 Thread Ryan de Vera
I am trying to load a csv with different row lengths. For example, I have the csv a,b a,b,c,d a,b,c How can I load this into python? I tried using both NumPy and Pandas. -- https://mail.python.org/mailman/listinfo/python-list

Re: TypeError: 'NoneType' object is not callable

2014-07-29 Thread Peter Otten
Satish ML wrote: > Hi, > > TypeError: 'NoneType' object is not callable? Why this error and what is > the solution? Code: > class SuperMeta: > def __call__(self, classname, supers, classdict): > print('In SuperMeta.call: ', classname, supers, classdict, > sep='\n...') Class =

What happens when you 'break' a generator?

2014-07-29 Thread Frank Millman
Hi all Python 3.4.1 Here is a simple generator - def test(): print('start') for i in range(5): yield i print('done') x = test() for j in x: print(j) As expected, the output is - start 0 1 2 3 4 done Here I break the loop - x = test() for j in x: print(j) if j