Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-02-29 Thread Steven D'Aprano
On Wed, 29 Feb 2012 22:41:53 -0800, John Salerno wrote: >> Yes. You must leave it out. > > Now I'm reading a Tkinter reference at > http://infohost.nmt.edu/tcc/help/pubs/tkinter/minimal-app.html and it > has this example: [...] Could you please stop posting the same message twice? It's very anno

Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-02-29 Thread John Salerno
> Yes. You must leave it out. Now I'm reading a Tkinter reference at http://infohost.nmt.edu/tcc/help/pubs/tkinter/minimal-app.html and it has this example: #!/usr/local/bin/python from Tkinter import * class Application(Frame): def __init__(self, master=None):

Re: lang comparison: in-place algorithm for reversing a list in Perl, Python, Lisp

2012-02-29 Thread WJ
Xah Lee wrote: > fun example. > > in-place algorithm for reversing a list in Perl, Python, Lisp > http://xahlee.org/comp/in-place_algorithm.html > > plain text follows > > > What's “In-place Algorithm”? > > Xah Lee, 2012-02-29 > > This page tells you w

Re: pyusb and microchip mcp2210 interface

2012-02-29 Thread Tim Roberts
jobattle wrote: > >Has anybody out there had any experience in using the PYUSB library with >the new Microchip MCP2210 USB to SPI chip? It appears to the system as a HID device. You don't need to use PyUSB -- it already has a driver. Check libhid -- it has a Python binding. -- Tim Roberts, t..

Re: Re: lang comparison: in-place algorithm for reversing a list in Perl, Python, Lisp

2012-02-29 Thread Evan Driscoll
On 2/29/2012 23:05, Dan Stromberg wrote: > > On Wed, Feb 29, 2012 at 8:07 PM, Xah Lee > wrote: > > This page tells you what's “In-place algorithm”, using {python, perl, > emacs lisp} code to illustrate. > > Aren't in-place reversals rather non-functional? There

Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-02-29 Thread John Salerno
> What exactly is the purpose of doing that? Does Tk do some extra work that a > simple call to Frame won't do? More specifically, what is the benefit of doing: root = tk.Tk() app = Application(master=root) app.mainloop() as opposed to: app = Application() app.mainloop() Also, in the first ex

Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-02-29 Thread John Salerno
On Wednesday, February 29, 2012 11:40:45 PM UTC-6, Terry Reedy wrote: > On 2/29/2012 11:41 PM, John Salerno wrote: > > > window? If you only want the Windows "X" button to close the window, > > then is it okay to leave out any call to destroy()? > > Yes. You must leave it out. > > > the latter,

Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-02-29 Thread John Salerno
> Yes, but i think the REAL problem is faulty code logic. Remove the > last line "root.destroy()" and the problem is solved. Obviously the > author does not have an in-depth knowledge of Tkinter. The faulty code is not my own, which is part of the reason I asked the question. The book I'm reading

Re: lang comparison: in-place algorithm for reversing a list in Perl, Python, Lisp

2012-02-29 Thread Xah Lee
On Feb 29, 9:01 pm, Steven D'Aprano wrote: > You don't need a temporary variable to swap two values in > Python. A better way to reverse a list using more Pythonic idioms is: > > for i in range(len(list_a)//2): >     list_a[i], list_a[-i-1] = list_a[-i-1], list_a[i] forgive me sir, but i haven't

Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-02-29 Thread Terry Reedy
On 2/29/2012 11:41 PM, John Salerno wrote: window? If you only want the Windows "X" button to close the window, then is it okay to leave out any call to destroy()? Yes. You must leave it out. the latter, then where in the code do you put the call to destroy so it won't conflict with the user

Re: Help needed: dynamically pull data from different levels of a dict

2012-02-29 Thread Terry Reedy
On 2/29/2012 11:04 PM, Peter Rubenstein wrote: I'd appreciate a bit of help on this problem. I have some data that I've converted to a dict and I want to pull out individual pieces of it. Simplified version-- a={'1':'a', '2':'b', '3':{4:'d'}, '5':{'6': {'7': [ {'8':'e'}, {'9':'f'} ] } } } I'

Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-02-29 Thread Terry Reedy
On 2/29/2012 10:22 PM, Rick Johnson wrote: I do not know what book the OP is referring to, but the current doc example is http://docs.python.org/py3k/library/tkinter.html#a-simple-hello-world-program My current replacement (see below) can be downloaded from the tracker: http://bugs.python.org/issu

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots Af

2012-02-29 Thread Chiron
On Wed, 29 Feb 2012 23:10:48 -0500, Shmuel (Seymour J.) Metz wrote: > ROTF,LMAO! You obviously don't have a clue as to what Mathematics means. > Free hint: it doesn't mean Arithmetic. You're as bigoted as Xah Lee, Hmm... maybe, instead of just ridiculing him, you could explain where he is mista

Re: lang comparison: in-place algorithm for reversing a list in Perl, Python, Lisp

2012-02-29 Thread Dan Stromberg
On Wed, Feb 29, 2012 at 8:07 PM, Xah Lee wrote: > fun example. > > in-place algorithm for reversing a list in Perl, Python, Lisp > http://xahlee.org/comp/in-place_algorithm.html > > plain text follows > > > What's “In-place Algorithm”? > > Xah Lee, 2012-02

Re: lang comparison: in-place algorithm for reversing a list in Perl, Python, Lisp

2012-02-29 Thread Steven D'Aprano
On Wed, 29 Feb 2012 20:07:49 -0800, Xah Lee wrote: > Here's in-place algorithm for reversing a list: > > # python > # in-place algorithm for reversing a list > > list_a = ["a", "b", "c", "d", "e", "f", "g"] > list_length = len(list_a) > for i in range(list_length/2): > x = list_a[i] > li

Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-02-29 Thread John Salerno
> It is not necessarily to call Tk explicitly, which i think is a bug > BTW. Sure, for simple scripts you can save one line of code but only > at the expense of explicitness and intuitiveness. Observe > > ## START CODE ## > import Tkinter as tk > > root = tk.Tk() > root.title('Explicit Root') > r

Re: New Science Discovery: Perl Detracters Remain Idiots After A Decade!

2012-02-29 Thread Chiron
On Wed, 29 Feb 2012 23:06:42 -0500, Shmuel (Seymour J.) Metz wrote: > In , on 02/29/2012 >at 11:43 AM, Chiron said: > >>Sure, mathematically it *should* go a particular way, > > No. Mathematically it should go the way that it is defined to go. There > is nothing in Mathematics that either r

Re: Help needed: dynamically pull data from different levels of a dict

2012-02-29 Thread Chris Rebert
On Wed, Feb 29, 2012 at 7:56 PM, Peter Rubenstein wrote: > Hi, > > I'd appreciate a bit of help on this problem.  I have some data that I've > converted to a dict and I want to pull out individual pieces of it. > > Simplified version-- > > a={'1':'a', '2':'b', '3':{4:'d'}, '5':{'6': {'7': [ {'8':'

Re: New Science Discovery: Perl Detracters Remain Idiots After A Decade!

2012-02-29 Thread Seymour J.
In , on 02/29/2012 at 11:43 AM, Chiron said: >Sure, mathematically it *should* go a particular way, No. Mathematically it should go the way that it is defined to go. There is nothing in Mathematics that either requires or prohibits infix notation in programming languages, or even in Mathemati

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots Af

2012-02-29 Thread Seymour J.
In <87aa41k6x5@sapphire.mobileactivedefense.com>, on 02/29/2012 at 03:15 PM, Rainer Weikusat said: >'mathematics' (an essentially outdated write-only programming >language dating back to the times when humans had to perform >computations themselves) ROTF,LMAO! You obviously don't have

lang comparison: in-place algorithm for reversing a list in Perl, Python, Lisp

2012-02-29 Thread Xah Lee
fun example. in-place algorithm for reversing a list in Perl, Python, Lisp http://xahlee.org/comp/in-place_algorithm.html plain text follows What's “In-place Algorithm”? Xah Lee, 2012-02-29 This page tells you what's “In-place algorithm”, using {python,

Re: Help needed: dynamically pull data from different levels of a dict

2012-02-29 Thread Peter Rubenstein
--Reposting in plan text, apologies-- Hi, I'd appreciate a bit of help on this problem.  I have some data that I've converted to a dict and I want to pull out individual pieces of it. Simplified version-- a={'1':'a', '2':'b', '3':{4:'d'}, '5':{'6': {'7': [ {'8':'e'}, {'9':'f'} ] } } } I'd lik

Help needed: dynamically pull data from different levels of a dict

2012-02-29 Thread Peter Rubenstein
Hi, I'd appreciate a bit of help on this problem. I have some data that I've converted to a dict and I want to pull out individual pieces of it. Simplified version-- a={'1':'a', '2':'b', '3':{4:'d'}, '5':{'6': {'7': [ {'8':'e'}, {'9':'f'} ] } } } I'd like to be able to code something like: data_

PyTut: Tkinter #1

2012-02-29 Thread Rick Johnson
PyTut: Tkinter #1 Graciously donated by the benevolent professor Richard Johnson The first step to creating a Tkinter GUI is to create a blank window. Tkinter has two classes that represent a GUI window: Toplevel and Tk. Both the classes are basically the same, but since a GUI can have an unlimite

Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-02-29 Thread Rick Johnson
On Feb 29, 6:17 pm, Terry Reedy wrote: > On 2/29/2012 9:24 AM, Rick Johnson wrote: > > On Feb 28, 11:06 pm, John Salerno  wrote: > >> However, in the Python documentation, I see this: > > >> root = Tk() > >> app = Application(master=root) > >> app.mainloop() > >> root.destroy() > >> I tried the a

Re: python scripts solution for euler projects

2012-02-29 Thread scripts examples
On Feb 29, 4:21 am, alister wrote: > On Tue, 28 Feb 2012 19:59:40 -0800, scripts examples wrote: > > Got a web site setup for solving euler problems in python, perl, > > ruby and javascript. > > >    Feel free to give me any feedback, thanks. > > Failing to give a link to the site is a pretty fund

Re: Any Advice Would Be Greatly Appreciated

2012-02-29 Thread Rodrick Brown
LinkedIn is an excellent resource for finding great candidates, However your problem might be because your searching for Python Developers why not hire great programmers and have them learn Python? Sent from my iPhone On Feb 29, 2012, at 6:08 PM, Greg Harezlak wrote: > Hello Python Community

Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-02-29 Thread Terry Reedy
On 2/29/2012 9:24 AM, Rick Johnson wrote: On Feb 28, 11:06 pm, John Salerno wrote: However, in the Python documentation, I see this: root = Tk() app = Application(master=root) app.mainloop() root.destroy() I tried the above and I got the following error: Traceback (most recent call last)

Re: Any Advice Would Be Greatly Appreciated

2012-02-29 Thread Philipp Hagemeister
If you're looking for skilled developers, the best way to find them is probably to search their current work. http://careers.stackoverflow.com/ and the more experimental http://githire.com/ are two excellent developer-friendly solutions for that. - Philipp On 03/01/2012 12:08 AM, Greg Harezlak w

Re: Any Advice Would Be Greatly Appreciated

2012-02-29 Thread Greg Harezlak
Thank you so much for the help, Philipp! On Wed, Feb 29, 2012 at 3:48 PM, Philipp Hagemeister wrote: > If you're looking for skilled developers, the best way to find them is > probably to search their current work. > > http://careers.stackoverflow.com/ and the more experimental > http://githire.c

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots After A Decade!

2012-02-29 Thread Xah Lee
i missed a point in my original post. That is, when the same operator are adjacent. e.g. 「3 ▲ 6 ▲ 5」. This is pointed out by Kiuhnm 〔kiuhnm03.4t.yahoo.it〕 and Tim Bradshaw. Thanks. though, i disagree the way they expressed it, or any sense this is different from math. to clarify, amend my origin

Any Advice Would Be Greatly Appreciated

2012-02-29 Thread Greg Harezlak
Hello Python Community, I work for a mobile gaming startup in San Francisco, and we're heavily staffing around skilled Python Developers. I've already submitted a job posting to the Python.org website, but I was curious if anyone else had some suggestions on where I could go to find some really aw

Re: list comprehension question

2012-02-29 Thread Terry Reedy
On 2/29/2012 8:52 AM, Johann Spies wrote: Please post plain text, the standard for all python.org mailing lists and corresponding newsgroups, and not html. Some readers print the html as plain text, which is confusing and obnoxious. Other like mine, do skip the plain text version and print the

RE: Listing children processes

2012-02-29 Thread Prasad, Ramit
>>> I've been told of by the BDFL for stating that >>> people should not top post on any Python mailing list/news group. >> He's the BDFL of Python, not of mailing list etiquette. >Incorrect, I was told off for this >http://code.activestate.com/lists/python-ideas/14065/ Why the link? If that is

RE: Question about PyXML and python's stdlib xml

2012-02-29 Thread Prasad, Ramit
>>I'm forwarding this message to python-list, since I didn't get answer on >>xml-sig ML. >>Hopefully this is right list to question. >>Please keep me in CC. Original message is below. >>>I have concerns about PyXML and stdlib xml included directly in python. >>>Currently (in Fedora) python is try

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots After A Decade!

2012-02-29 Thread namekuseijin
On Feb 29, 5:09 am, Xah Lee wrote: > New Science Discovery: Perl Idiots Remain Idiots After A Decade! > > A excerpt from the new book 〈Modern Perl〉, just published, chapter 4 > on “Operators”. Quote: > > «The associativity of an operator governs whether it evaluates from > left to right or right t

Re: list comprehension question

2012-02-29 Thread Chris Rebert
On Wed, Feb 29, 2012 at 5:52 AM, Johann Spies wrote: > I understand the following: > > In [79]: instansie > instansie > Out[79]: 'Mangosuthu Technikon' > > In [80]: t = [x.alt_name for x in lys] > t = [x.alt_name for x in lys] > > In [81]: t > t > Out[81]: [] > > In [82]: t.append(instansie) > t.a

Re: list comprehension question

2012-02-29 Thread John Gordon
In James Broadhead writes: > On 29 February 2012 13:52, Johann Spies wrote: > > In [82]: t.append(instansie) > > t.append(instansie) > > > > In [83]: t > > t > > Out[83]: ['Mangosuthu Technikon'] > > In [84]: t = [x.alt_name for x in lys].append(instansie) > > t = [x.alt_name for x in lys].ap

Re: list comprehension question

2012-02-29 Thread James Broadhead
On 29 February 2012 13:52, Johann Spies wrote: > In [82]: t.append(instansie) > t.append(instansie) > > In [83]: t > t > Out[83]: ['Mangosuthu Technikon'] > In [84]: t = [x.alt_name for x in lys].append(instansie) > t = [x.alt_name for x in lys].append(instansie) > > In [85]: t > t > > In [86]: t

list comprehension question

2012-02-29 Thread Johann Spies
I understand the following: In [79]: instansie instansie Out[79]: 'Mangosuthu Technikon' In [80]: t = [x.alt_name for x in lys] t = [x.alt_name for x in lys] In [81]: t t Out[81]: [] In [82]: t.append(instansie) t.append(instansie) In [83]: t t Out[83]: ['Mangosuthu Technikon'] But then why d

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots After A Decade!

2012-02-29 Thread Kiuhnm
On 2/29/2012 16:15, Rainer Weikusat wrote: [...] 'mathematics' (an essentially outdated write-only programming language dating back to the times when humans had to perform computations themselves) [...] Theoretical Computer Science is a branch of mathematics. Are you saying it is outdated? K

Re: On u'Unicode string literals' reintroduction (Py3)

2012-02-29 Thread jmfauth
On 29 fév, 14:45, jmfauth wrote: > For those who do not know: > The u'' string literal trick has never worked in Python 2. > > >>> sys.version > > '2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]'>>> print > u'Un oeuf à zéro EURO uro' > > Un  uf à zéro  uro > > > > jmf Sorry,

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots After A Decade!

2012-02-29 Thread Rainer Weikusat
Xah Lee writes: > A excerpt from the new book 〈Modern Perl〉, just published, chapter 4 > on “Operators”. Quote: > > «The associativity of an operator governs whether it evaluates from > left to right or right to left. Addition is left associative, such > that 2 + 3 + 4 evaluates 2 + 3 first, then

Re: On u'Unicode string literals' (Py3)

2012-02-29 Thread Dave Angel
Just who are you replying to? On 02/29/2012 08:45 AM, jmfauth wrote: For those who do not know: The u'' string literal trick has never worked in Python 2. No trick there. If you have something explicit to say, then say it. sys.version '2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32

Re: Fwd: Question about PyXML and python's stdlib xml

2012-02-29 Thread Stefan Behnel
Roman Rakus, 29.02.2012 15:33: > I'm forwarding this message to python-list, since I didn't get answer on > xml-sig ML I didn't see a message from you on that list. > I have concerns about PyXML and stdlib xml included directly in python. > Currently (in Fedora) python is trying to import PyXML,

Re: Listing children processes

2012-02-29 Thread Giampaolo Rodolà
Il 28 febbraio 2012 22:47, Arnaud Delobelle ha scritto: > On 28 February 2012 21:39, Mihai Badoiu wrote: >> On Tue, Feb 28, 2012 at 4:35 PM, Chris Rebert wrote: >>> >>> On Tue, Feb 28, 2012 at 10:33 AM, Mihai Badoiu wrote: >>> > I'm trying to compute the total CPU load of an external process an

Fwd: Question about PyXML and python's stdlib xml

2012-02-29 Thread Roman Rakus
I'm forwarding this message to python-list, since I didn't get answer on xml-sig ML. Hopefully this is right list to question. Please keep me in CC. Original message is below. RR Original Message Subject:Question about PyXML and python's stdlib xml Date: Mon, 27 Feb

Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-02-29 Thread Rick Johnson
On Feb 28, 11:06 pm, John Salerno wrote: > The book I'm reading about using Tkinter only does this when creating the > top-level window: > > app = Application() > app.mainloop() > > and of course the Application class has subclassed the tkinter.Frame class. > > However, in the Python documentatio

Looking for a simple, generic Python module to provide a secure web service

2012-02-29 Thread David Shi
We are looking for a very simple, generic Python module to provide a secure web service.   Ideally, it can be put onto the computer and make it available via IIS.   Off we go.   Your help will be gratefully received.   Regards.   David-- http://mail.python.org/mailman/listinfo/python-list

On u'Unicode string literals' (Py3)

2012-02-29 Thread jmfauth
For those who do not know: The u'' string literal trick has never worked in Python 2. >>> sys.version '2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]' >>> print u'Un oeuf à zéro EURO uro' Un uf à zéro uro >>> jmf -- http://mail.python.org/mailman/listinfo/python-list

building GNU debugger (was: Re: Python-list Digest, Vol 101, Issue 164)

2012-02-29 Thread Ulrich Eckhardt
Three things up front: 1. Do not reply to digests. If you want to only read, you can use the digests, but they are not usable for replying, because it is completely unclear where in a discussion you are entering and what you are relating your answers to. 2. Do not start new threads by using the re

Re: python scripts solution for euler projects

2012-02-29 Thread alister
On Tue, 28 Feb 2012 19:59:40 -0800, scripts examples wrote: > Got a web site setup for solving euler problems in python, perl, > ruby and javascript. > >Feel free to give me any feedback, thanks. Failing to give a link to the site is a pretty fundamental failure -- Please take note: --

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots After A Decade!

2012-02-29 Thread Devin Jeanpierre
On Wed, Feb 29, 2012 at 6:43 AM, Chiron wrote: > Personally, I think this whole issue of precedence in a programming > language is over-rated.  It seems to me that grouping of any non-trivial > set of calculations should be done so as to remove any possible confusion > as to intent. Some language

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots After A Decade!

2012-02-29 Thread Kiuhnm
On 2/29/2012 9:09, Xah Lee wrote: New Science Discovery: Perl Idiots Remain Idiots After A Decade! A excerpt from the new book 〈Modern Perl〉, just published, chapter 4 on “Operators”. Quote: «The associativity of an operator governs whether it evaluates from left to right or right to left. Addi

CrowdFinch Technologies

2012-02-29 Thread CrowdFinch
CrowdFinch Technologies is a leading professional custom web design and web development company specialized in Outsourced Web Development Services, Mobile Application Development, Web design, SEO Services. -- http://mail.python.org/mailman/listinfo/python-list

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots After A Decade!

2012-02-29 Thread Chiron
On Wed, 29 Feb 2012 00:09:16 -0800, Xah Lee wrote: Personally, I think this whole issue of precedence in a programming language is over-rated. It seems to me that grouping of any non-trivial set of calculations should be done so as to remove any possible confusion as to intent. It is one more

RE: Python-list Digest, Vol 101, Issue 164

2012-02-29 Thread Shambhu Rajak
Hi, I want building GNU debugger for mingw. Need the GDB to support python How should I go about it? Thanks, Shambhu This message contains information that may be privileged or confidential and is the property of the KPIT Cummins Infosystems Ltd. It is intended only for the person to whom it i

Re: use CTRL+L for clearing the screen

2012-02-29 Thread Ben Finney
Jabba Laci writes: > I would like to add a clear screen feature, which would be activated > with CTRL+L. How to do that? > Another thing: raw_input waits until but I'd like to clear the > screen at the moment when CTRL+L is pressed. That sounds like a job for the standard library ‘readline’ mod

Re: Why this fails??

2012-02-29 Thread Dave Angel
On 02/29/2012 04:07 AM, Smiley 4321 wrote: Why below fails - #!/usr/bin/python import pickle class MyClass(object): Field1 = None Field2 = None def __init__(self, dictionary): self.__dict__.update(dictionary) my_List = {'Field1': 'Apple', 'Field2': 'Orange'

Re: Problem using s.strip() to remove leading whitespace in .csv file

2012-02-29 Thread Dave Angel
On 02/29/2012 04:05 AM, Guillaume Chorn wrote: Thanks, the suggestion print name.decode("utf-8").strip() worked like a charm. When I did the print repr(name) I got exactly what you predicted. I'm not yet sure what all of this means, but I'm going to read this

use CTRL+L for clearing the screen

2012-02-29 Thread Jabba Laci
Hi, I'm working on an interactive script. With raw_input user input is read and the script produces some output and offers the prompt again. I would like to add a clear screen feature, which would be activated with CTRL+L. How to do that? Another thing: raw_input waits until but I'd like to clear

Re: Problem using s.strip() to remove leading whitespace in .csv file

2012-02-29 Thread Guillaume Chorn
Thanks, the suggestion print name.decode("utf-8").strip() worked like a charm. When I did the print repr(name) I got exactly what you predicted. I'm not yet sure what all of this means, but I'm going to read this in the hopes of finding out. Anyway t

Why this fails??

2012-02-29 Thread Smiley 4321
Why below fails - #!/usr/bin/python import pickle class MyClass(object): Field1 = None Field2 = None def __init__(self, dictionary): self.__dict__.update(dictionary) my_List = {'Field1': 'Apple', 'Field2': 'Orange'} myInst = MyClass(my_List) with open('/t

Re: Problem using s.strip() to remove leading whitespace in .csv file

2012-02-29 Thread Karim
Le 29/02/2012 10:01, Karim a écrit : Le 29/02/2012 09:25, Guillaume Chorn a écrit : Hello All, I have a .csv file that I created by copying and pasting a list of all the players in the NBA with their respective teams and positions (http://sports.yahoo.com/nba/players?type=lastname&first=1&que

Re: Problem using s.strip() to remove leading whitespace in .csv file

2012-02-29 Thread Karim
Le 29/02/2012 09:25, Guillaume Chorn a écrit : Hello All, I have a .csv file that I created by copying and pasting a list of all the players in the NBA with their respective teams and positions (http://sports.yahoo.com/nba/players?type=lastname&first=1&query=&go=GO!

Re: Problem using s.strip() to remove leading whitespace in .csv file

2012-02-29 Thread Peter Otten
Guillaume Chorn wrote: > Hello All, > > I have a .csv file that I created by copying and pasting a list of all the > players in the NBA with their respective teams and positions ( > http://sports.yahoo.com/nba/players?type=lastname&first=1&query=&go=GO!). > Unfortunately, when I do this I have no

Problem using s.strip() to remove leading whitespace in .csv file

2012-02-29 Thread Guillaume Chorn
Hello All, I have a .csv file that I created by copying and pasting a list of all the players in the NBA with their respective teams and positions ( http://sports.yahoo.com/nba/players?type=lastname&first=1&query=&go=GO!). Unfortunately, when I do this I have no choice but to include a single lead

New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots After A Decade!

2012-02-29 Thread Xah Lee
New Science Discovery: Perl Idiots Remain Idiots After A Decade! A excerpt from the new book 〈Modern Perl〉, just published, chapter 4 on “Operators”. Quote: «The associativity of an operator governs whether it evaluates from left to right or right to left. Addition is left associative, such that