Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread Steven D'Aprano
On Mon, 09 May 2011 15:09:32 -0400, James Wright wrote: > Thank you Steven, > > I will take your advice :) In this particular case though, I do not > think a lack of underscore is the issue, at least as far as I can > understand the issue. Please see my reply to Ethan. In your reply to Ethan,

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread Terry Reedy
On 5/9/2011 2:10 PM, James Wright wrote: Hello, I have been using a script on several boxes that have been around for a while, and everything works just fine. I am finding though, that on some new OS installs the script fails with: Traceback (most recent call last): File "render4.py", line

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread Ethan Furman
James Wright wrote: On Mon, May 9, 2011 at 4:04 PM, Ethan Furman wrote: James Wright wrote: On Mon, May 9, 2011 at 3:36 PM, Ethan Furman wrote: Change your print line to: print("D4[%s] = %s" % (report, each_value)) After that, you'll have to track down how D4 is being created to see

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread James Wright
Sorry Alex, and thank you. On Mon, May 9, 2011 at 4:02 PM, Alex Willmer wrote: > (Direct reply to me, reposted on Jame's behalf) > > > > Hi Alex, > > On Mon, May 9, 2011 at 3:21 PM, Alex Willmer > wrote: >> On May 9, 8:10 pm, James Wright wrote: >>> Hello Ian, >>> >>> It does indeed to seem tha

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread James Wright
Hello Ethan, On Mon, May 9, 2011 at 4:04 PM, Ethan Furman wrote: > James Wright wrote: >> >> On Mon, May 9, 2011 at 3:36 PM, Ethan Furman wrote: >>> >>> Change your print line to: >>> >>>   print("D4[%s] = %s" % (report, each_value)) >>> >>> After that, you'll have to track down how D4 is being

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread Alex Willmer
(Direct reply to me, reposted on Jame's behalf) Hi Alex, On Mon, May 9, 2011 at 3:21 PM, Alex Willmer wrote: > On May 9, 8:10 pm, James Wright wrote: >> Hello Ian, >> >> It does indeed to seem that way. However the script works just fine >> on other machines, with the same input file. > > Ho

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread Ethan Furman
James Wright wrote: On Mon, May 9, 2011 at 3:36 PM, Ethan Furman wrote: Change your print line to: print("D4[%s] = %s" % (report, each_value)) After that, you'll have to track down how D4 is being created to see where 'vsr' is coming from. It does not appear to show a key: D4[] = vsr

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread Ian Kelly
On Mon, May 9, 2011 at 1:29 PM, James Wright wrote: > It does not appear to show a key: > > D4[] = vsr > Traceback (most recent call last): >  File "render4.py", line 115, in >    create_report_index(each_item) >  File "render4.py", line 26, in create_report_index >    [clean_name, _] = each_valu

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread James Wright
On Mon, May 9, 2011 at 3:36 PM, Ethan Furman wrote: > James Wright wrote: >> >> Thank you Ethan, >> >> This is what I see now: >> >> # python render4.py >> current each_value is: vsr >> Traceback (most recent call last): >>  File "render4.py", line 115, in >>    create_report_index(each_item) >>

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread MRAB
On 09/05/2011 20:10, James Wright wrote: On Mon, May 9, 2011 at 2:41 PM, Ian Kelly wrote: On Mon, May 9, 2011 at 12:10 PM, James Wright wrote: Hello, I have been using a script on several boxes that have been around for a while, and everything works just fine. I am finding though, that on s

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread Ethan Furman
James Wright wrote: Thank you Ethan, This is what I see now: # python render4.py current each_value is: vsr Traceback (most recent call last): File "render4.py", line 115, in create_report_index(each_item) File "render4.py", line 26, in create_report_index [clean_name, _] = each_va

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread James Wright
Hello Ian, It does indeed to seem that way. However the script works just fine on other machines, with the same input file. Thanks, James On Mon, May 9, 2011 at 2:41 PM, Ian Kelly wrote: > On Mon, May 9, 2011 at 12:10 PM, James Wright wrote: >> Hello, >> >> I have been using a script on sev

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread James Wright
>> Traceback (most recent call last): >>   File "render4.py", line 114, in >>     create_report_index(each_item) >>   File "render4.py", line 25, in create_report_index >>     [clean_name, _] = each_value.split('_', 1) >> ValueEr

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread James Wright
Thank you Ethan, This is what I see now: # python render4.py current each_value is: vsr Traceback (most recent call last): File "render4.py", line 115, in create_report_index(each_item) File "render4.py", line 26, in create_report_index [clean_name, _] = each_value.split('_', 1) Valu

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread Steven D'Aprano
most recent call last): > File "render4.py", line 114, in > create_report_index(each_item) > File "render4.py", line 25, in create_report_index > [clean_name, _] = each_value.split('_', 1) > ValueError: need more than 1 value to unpack It

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread Ethan Furman
James Wright wrote: Hello, Howdy! def create_report_index(report): #Here we are creating a simple index.html file from data in a text file newfile = open(report + '.html', 'w') #Create the index file using report name for each_value in D4[report]: [clean_name, _] = each_value

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread Ian Kelly
On Mon, May 9, 2011 at 12:10 PM, James Wright wrote: > Hello, > > I have been using a script on several boxes that have been around for > a while, and everything works just fine.  I am finding though, that on > some new OS installs the script fails with: > > Traceback (most recent call last): >  F

Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread James Wright
Hello, I have been using a script on several boxes that have been around for a while, and everything works just fine. I am finding though, that on some new OS installs the script fails with: Traceback (most recent call last): File "render4.py", line 114, in create_report_index(each_item)

Re: Package problem

2009-05-19 Thread David Lyon
On Tue, 19 May 2009 13:29:47 +0100, "A. Cavallo" wrote: > You could try: > > http://download.opensuse.org/repositories/home:/cavallo71:/python-opt/ > > This is a python interpreter installed under /opt/opt-python-2.7a0. > All you have to do is sourcing /opt/opt-python-2.7a0/opt-python-env.sh > f

Re: Package problem

2009-05-19 Thread David Lyon
On Wed, 20 May 2009 00:40:28 +0900, David Cournapeau wrote: > The discussion has nothing to do with setuptools, or even python for > that matter. It has everything to do with python > on any system (including windows). That's why you should avoid > installing from sources into the location

Re: Package problem

2009-05-19 Thread David Cournapeau
On Tue, May 19, 2009 at 9:29 PM, A. Cavallo wrote: >> > It is solved in other languages.. for example perl.. and delphi >> I don't know much about perl, and even less about delphi, but I am >> pretty sure it does not solve the problem of overwriting files from a >> package with an installation out

Re: Package problem

2009-05-19 Thread David Lyon
On Tue, 19 May 2009 15:45:42 +0900, David Cournapeau wrote: > There is no simple solution to the following situation: >- install setuptools from ubuntu... When I have a ubuntu system I will try it > But still, the whole > value of ..(python).. is to have a whole set of packages which > a

Re: Package problem

2009-05-19 Thread Benjamin Kaplan
On Tue, May 19, 2009 at 2:45 AM, David Cournapeau wrote: > On Tue, May 19, 2009 at 2:35 PM, David Lyon > wrote: > > On Tue, 19 May 2009 13:53:18 +0900, David Cournapeau > > > wrote: > >> Given that nobody has managed to solve this problem, I doubt you will > >> find a solution. > > > > It is sol

Re: Package problem

2009-05-19 Thread A. Cavallo
> > It is solved in other languages.. for example perl.. and delphi > I don't know much about perl, and even less about delphi, but I am > pretty sure it does not solve the problem of overwriting files from a > package with an installation outside the control of the package > manager. On a sytem a

Re: Package problem

2009-05-18 Thread David Cournapeau
On Tue, May 19, 2009 at 2:35 PM, David Lyon wrote: > On Tue, 19 May 2009 13:53:18 +0900, David Cournapeau > wrote: >> Given that nobody has managed to solve this problem, I doubt you will >> find a solution. > > It is solved in other languages.. for example perl.. and delphi I don't know much ab

Re: Package problem

2009-05-18 Thread David Lyon
On Tue, 19 May 2009 13:53:18 +0900, David Cournapeau wrote: > Given that nobody has managed to solve this problem, I doubt you will > find a solution. It is solved in other languages.. for example perl.. and delphi > If there was a reasonable solution, it would have > already been developed.

Re: Package problem

2009-05-18 Thread David Cournapeau
On Tue, May 19, 2009 at 1:31 PM, David Lyon wrote: > > Hi David, > > I guess paraphrased you are saying "don't touch your packages".. > > To my point of view, the needs of the developer override the > priorities of the O/S house... > > We should expect "old" packages on our systems from the O/S >

Re: Package problem

2009-05-18 Thread David Lyon
Hi David, I guess paraphrased you are saying "don't touch your packages".. To my point of view, the needs of the developer override the priorities of the O/S house... We should expect "old" packages on our systems from the O/S and have an easier way to update them to whatever we want.. That's

Re: Package problem

2009-05-18 Thread David Cournapeau
On Tue, May 19, 2009 at 1:15 PM, David Cournapeau wrote: > something like virtualenv for packages using autotools. ^^^ Sorry, I meant setuptools here, not autotools David -- http://mail.python.org/mailman/listinfo/python-list

Re: Package problem

2009-05-18 Thread David Cournapeau
On Tue, May 19, 2009 at 4:52 AM, Sverre wrote: > I'm using Ubuntu and some of the packages in the repository are too > old. So I got the thought to remove nearly  all packages downloaded > from the repository and install them with easy_install. Is this a way > to go without greater problems? This

Re: Package problem

2009-05-18 Thread A. Cavallo
On Monday 18 May 2009 20:52:52 Sverre wrote: > I'm using Ubuntu and some of the packages in the repository are too > old. So I got the thought to remove nearly all packages downloaded > from the repository and install them with easy_install. Is this a way > to go without greater problems? If you'

Package problem

2009-05-18 Thread Sverre
I'm using Ubuntu and some of the packages in the repository are too old. So I got the thought to remove nearly all packages downloaded from the repository and install them with easy_install. Is this a way to go without greater problems? -- http://mail.python.org/mailman/listinfo/python-list