Hello,
I'va read a text file into variable "a"
a=open('FicheroTexto.txt','r')
a.read()
"a" contains all the lines of the text separated by '\n' characters.
Now, I want to work with each line separately, without the '\n'
character.
How can I get variable "b" as a list of such lines?
On 25 ene, 14:36, "Diez B. Roggisch" wrote:
> vsoler schrieb:
>
> > Hello,
>
> > I'va read a text file into variable "a"
>
> > a=open('FicheroTexto.txt','r')
> > a.read()
>
> > "a" cont
Hi,
My foo.txt file contains the following:
1,"house","2,5"
2,"table","6,7"
3,"chair","-4,5"
... as seen with notepad.
This file was created with the OpenOffice Calc spreadsheet, but since
I use comma as the decimal separator for numbers, the last value in
each line appears sorrounded by quotes
On 1 feb, 19:02, Stephen Hansen wrote:
> On Sun, Feb 1, 2009 at 9:24 AM, vsolerwrote:Hi,
> My foo.txt file contains the following:
> 1,"house","2,5"
> 2,"table","6,7"
> 3,"chair","-4,5"
> ... as seen with notepad.
> This file was created with the OpenOffice Calc spreadsheet, but since
> I use comm
On 1 feb, 23:57, John Machin wrote:
> On Feb 2, 6:18 am, vsoler wrote:
>
>
>
> > r: in the open statement, why do you use 'rb' as 2nd argument? b is
> > supposed to be binary, and my file is text!
>
> Because unlike Stephen, r has read the csv manual. Bina
Hi you all,
I just discovered the csv module here in the comp.lang.python group.
I have found its manual, which is publicly available, but since I am
still a newby, learning techniques, I was wondering if the source code
for this module is available.
Is it possible to have a look at it?
Thanks
On 2 feb, 21:51, Jon Clements wrote:
> On 2 Feb, 20:46, vsoler wrote:
>
> > Hi you all,
>
> > I just discovered the csv module here in the comp.lang.python group.
>
> > I have found its manual, which is publicly available, but since I am
> > still a newby, lea
On Dec 6, 11:53 pm, "Martin P. Hellwig"
wrote:
> Edward A. Falk wrote:
>
>
>
> > For development purposes, you should stick with the oldest version that will
> > actually run your code. Every time you move to a more modern version,
> > you're
> > leaving potential users/customers out in the col
I take the example from Mark Lutz's excellent book "Learning Python".
*** In nested1.py I have:
X=99
def printer(): print X
*** In nested2.py I have:
from nested1 import X, printer
X=88
printer()
What is amazing is that running nested2.py prints 99 and not 88.
My questions are:
1. Using stat
On Dec 7, 5:39 pm, Benjamin Kaplan wrote:
> On Mon, Dec 7, 2009 at 11:10 AM, vsoler wrote:
> > I take the example from Mark Lutz's excellent book "Learning Python".
>
> > *** In nested1.py I have:
> > X=99
> > def printer(): print X
>
> >
I'm learning Python, and I am very fond of it.
Using Python 2.6
I am able to list all the names in a class namespace:
class abc: pass
abc.a1=7
abc.a2='Text'
print abc.__dict__.keys()
a) However, I do not know how to read the __main__ namespace
print __main__.__dict__.keys()# Just does not
On Dec 13, 12:34 pm, Chris Rebert wrote:
> On Sun, Dec 13, 2009 at 3:20 AM, vsoler wrote:
> > I'm learning Python, and I am very fond of it.
>
> > Using Python 2.6
>
> > I am able to list all the names in a class namespace:
>
> > class abc: pass
>
I'm using Python 2.6.4 on Windows (Vista & 7)
I usually start Python by clicking on Start Menu the Python IDLE
(Python GUI).
However, if I want to save a new source *.py file, the default
directory proposed for saving is not the one that I want.
What can I do if I want that the change of default
On 22 dic, 18:22, "Gabriel Genellina" wrote:
> En Tue, 22 Dec 2009 14:04:23 -0300, vsoler
> escribió:
>
> > I'm using Python 2.6.4 on Windows (Vista & 7)
>
> > I usually start Python by clicking on Start Menu the Python IDLE
> > (Python GUI).
&
hello,
I'm learning Python and OOP, and I am confronted with a rather
theoretical problem.
If I run the following script:
class stepper:
def __getitem__(self, i):
return self.data[i]
X=stepper()
X.data="Spam"
for item in X:
print item,
... what I get is S p a m which se
On 2 ene, 14:21, Ulrich Eckhardt wrote:
> vsoler wrote:
> > class stepper:
> > def __getitem__(self, i):
> > return self.data[i]
>
> > X=stepper()
> > X.data="Spam"
> > for item in X:
> > print item,
>
> > ..
Hi,
Not sure this is the best group to post, but I cannot think of any
other.
My application would contain a limited set of "cells" represented by
the instances of a Cell class:
class Cell:
...
A1=Cell(7)
A2=Cell(2*A1)
A3=Cell(3*A1+A2)
A4=Cell(A3*4)
Of course, A1 = 7, A2 = 14, A3 = 35 and A4 =
On Jan 3, 1:28 pm, Steven D'Aprano wrote:
> On Sun, 03 Jan 2010 03:27:46 -0800, vsoler wrote:
> > My application would contain a limited set of "cells" represented by the
> > instances of a Cell class:
>
> > class Cell:
> > ...
>
> > A1=Cell
Hello,
I am acessing an Excel file by means of Win 32 COM technology.
For a given cell, I am able to read its formula. I want to make a map
of how cells reference one another, how different sheets reference one
another, how workbooks reference one another, etc.
Hence, I need to parse Excel formul
On 5 ene, 19:35, MRAB wrote:
> vsoler wrote:
> > Hello,
>
> > I am acessing an Excel file by means of Win 32 COM technology.
> > For a given cell, I am able to read its formula. I want to make a map
> > of how cells reference one another, how different sheets
> Here is a sample controller that shows you how to embed the
> spreadsheet in web
> page:http://code.google.com/p/web2py/source/browse/applications/examples/c...
>
> Massimo
>
> On Jan 3, 5:27 am, vsoler wrote:
>
> > Hi,
>
> > Not sure this is the best gro
On 5 ene, 20:05, Mensanator wrote:
> On Jan 5, 12:35 pm, MRAB wrote:
>
>
>
> > vsoler wrote:
> > > Hello,
>
> > > I am acessing an Excel file by means of Win 32 COM technology.
> > > For a given cell, I am able to read its formula. I want to mak
On 5 ene, 20:21, vsoler wrote:
> On 5 ene, 20:05, Mensanator wrote:
>
>
>
> > On Jan 5, 12:35 pm, MRAB wrote:
>
> > > vsoler wrote:
> > > > Hello,
>
> > > > I am acessing an Excel file by means of Win 32 COM technology.
> > > &
Hi all,
I just download Numpy, and tried to install it using "numpy-1.4.0-
win32-superpack-python2.6.exe"
I get an error: "Python version 2.6 required, which was not found in
the Registry"
However, I am using Python 2.6 every day. I'm running Windows 7.
What can I do?
--
http://mail.python.or
Say that a have:
# file test.py
a=7
At the prompt:
import test
dir()
I would like to see the variables created in the test namespace.
However, variable "a" does not appear in the list, only "test". Since
I know that var "a" is reachable from the prompt by means of test.a,
how can I list this so
On Oct 25, 12:01 pm, Tim Chase wrote:
> > Say that a have:
>
> > # file test.py
> > a=7
>
> > At the prompt:
> > import test
> > dir()
>
> > I would like to see the variables created in the test namespace.
> > However, variable "a" does not appear in the list, only "test". Since
> > I know that va
On Oct 25, 1:32 pm, Tim Chase wrote:
> > If I just input dir(test) I don't get "a" in my list.
>
> import test
> dir(test)
> > ['__builtins__', '__doc__', '__file__', '__name__', '__package__',
> > '__path__']
>
> > I am using python 2.6
>
> > Am I doing anything wrong?
>
> Are you impor
On Oct 25, 5:07 pm, Tim Chase wrote:
> >> t...@rubbish:~/tmp$ rm test.py test.pyc
> >> t...@rubbish:~/tmp$ python2.5
> >> >>> import test
> >> >>> dir(test)
> >> ['__builtins__', '__doc__', '__file__', '__name__', '__path__']
> >> >>> test.__file__
> >> '/usr/lib/python2.5/test/__init__.pyc'
>
In the accounting department I am working for we are from time to time
confronted to the following problem:
A customer sends us a check for a given amount, but without specifying
what invoices it cancels. It is up to us to find out which ones the
payment corresponds to.
For example, say that the
On Nov 8, 1:27 pm, Ozz wrote:
> Robert P. J. Day schreef:
>
> > does your solution allow for the possibility of different invoices
> > of equal amounts? i would be reluctant to use the word "subset" in a
> > context where you can have more than one element with the same value.
>
> I think it ha
Ever since I installed my Python 2.6 interpreter, I've been saving my
*.py files in the C:\Program Files\Python26 directory, which is the
default directory for such files in my system.
However, I have realised that the above is not the best practice.
Therefore I created the C:\Program Files\Python
Oops!!! something went wrong with my keyboard. Here you have my full
post:
Ever since I installed my Python 2.6 interpreter (I use IDLE), I've
been saving my
*.py files in the C:\Program Files\Python26 directory, which is the
default directory for such files in my system.
However, I have realised
On Nov 16, 2:35 am, "Gabriel Genellina"
wrote:
> En Sun, 15 Nov 2009 09:04:06 -0300, vsoler
> escribió:
>
> > Ever since I installed my Python 2.6 interpreter (I use IDLE), I've
> > been saving my
> > *.py files in the C:\Program Files\Python26 directo
On Nov 16, 8:45 pm, Chris Rebert wrote:
> On Mon, Nov 16, 2009 at 11:36 AM, vsoler wrote:
> > On Nov 16, 2:35 am, "Gabriel Genellina"
> > wrote:
> >> En Sun, 15 Nov 2009 09:04:06 -0300, vsoler
> >> escribió:
>
> >> > Ever sinc
On Jan 18, 9:08 pm, Robert Kern wrote:
> On 2010-01-18 14:02 PM, vsoler wrote:
>
> > Hi all,
>
> > I just download Numpy, and tried to install it using "numpy-1.4.0-
> > win32-superpack-python2.6.exe"
>
> > I get an error: "Python version 2.
On Feb 14, 2:28 am, "Alf P. Steinbach" wrote:
> * vsoler:
>
> > Hi,
>
> > My python script needs to work with a .txt file in a directory. I
> > would like to give the user the possibility to choose the file he
> > needs to work on in as much the same w
On Feb 14, 2:45 am, rantingrick wrote:
> On Feb 13, 7:28 pm, "Alf P. Steinbach" wrote:
>
>
>
> > * vsoler:
>
> > > Hi,
>
> > > My python script needs to work with a .txt file in a directory. I
> > > would like to give the user the p
Hello everyone!
I have a tuple of tuples, coming from an Excel range, such as this:
((None, u'x', u'y'),
(u'a', 1.0, 7.0),
(u'b', None, 8.0))
I need to build a dictionary that has, as key, the row and column
header.
For example:
d={ (u'a',u'x'):1.0, (u'a',u'y'): 7.0, (u'b',u'y'):8.0 }
As you c
On Feb 20, 7:00 pm, MRAB wrote:
> vsoler wrote:
> > Hello everyone!
>
> > I have a tuple of tuples, coming from an Excel range, such as this:
>
> > ((None, u'x', u'y'),
> > (u'a', 1.0, 7.0),
> > (u'b', None, 8.0))
>
On Feb 20, 8:54 pm, MRAB wrote:
> vsoler wrote:
> > On Feb 20, 7:00 pm, MRAB wrote:
> >> vsoler wrote:
> >>> Hello everyone!
> >>> I have a tuple of tuples, coming from an Excel range, such as this:
> >>> ((None, u'x', u'y'
Hi everyone,
When I run a python script, I know that I can print the results of my
calculations on the Interactive Window. Once the scripts ends, I can
copy/pate these results on an OpenOffice Writer document.
However, I would like to know if I can somehow add some lines to my
script, so that it
I'm trying to print .7 as 70%
I've tried:
print format(.7,'%%')
.7.format('%%')
but neither works. I don't know what the syntax is...
Can you help?
Thank you
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 21, 7:11 pm, TomF wrote:
> On 2010-02-21 09:53:45 -0800, vsoler said:
>
> > I'm trying to print .7 as 70%
> > I've tried:
>
> > print format(.7,'%%')
> > .7.format('%%')
>
> > but neither works. I don't kno
On Feb 22, 8:32 pm, Hans Mulder wrote:
> Günther Dietrich wrote:
> > vsoler wrote:
>
> >> I'm trying to print .7 as 70%
> >> I've tried:
>
> >> print format(.7,'%%')
> >> .7.format('%%')
>
> >> but
Hi,
I have two dicts
n={'a', 'm', 'p'}
v={1,3,7}
and I'd like to have
a=1
m=3
p=7
that is, creating some variables.
How can I do this?
--
http://mail.python.org/mailman/listinfo/python-list
I have a class that is a wrapper:
class wrapper:
def __init__(self, object):
self.wrapped = object
def __getattr__(self, attrname):
print 'Trace: ', attrname
#print arguments to attrname, how?
return getattr(self.wrapped, attrname)
I can run it this way:
>
On Feb 28, 4:00 pm, "Alf P. Steinbach" wrote:
> * vsoler:
>
>
>
> > I have a class that is a wrapper:
>
> > class wrapper:
> > def __init__(self, object):
> > self.wrapped = object
> > def __getattr__(self, attrname):
&
Hello,
My script starts like this:
book=readFromExcelRange('book')
house=readFromExcelRange('house')
table=readFromExcelRange('table')
read=readFromExcelRange('read')
...
But I would like to have something equivalent, like...
ranges=['book','house','table','read']
for i in ranges:
var[i]=re
On 7 mar, 16:23, Andreas Waldenburger wrote:
> On Sun, 7 Mar 2010 07:05:26 -0800 (PST) vsoler
>
>
>
> wrote:
> > Hello,
>
> > My script starts like this:
>
> > book=readFromExcelRange('book')
> > house=readFromExcelRange('house')
On 7 mar, 16:23, John Posner wrote:
> On 3/7/2010 10:05 AM, vsoler wrote:
>
>
>
> > Hello,
>
> > My script starts like this:
>
> > book=readFromExcelRange('book')
> > house=readFromExcelRange('house')
> > table=readFromExcelRa
Hello,
My code snippet reads data from excel ranges. First row and first
column are column headers and row headers respectively. After reding
the range I build a dict.
'A'..'B'
'ab'35
'cd'72
'cd'9.
On 7 mar, 17:53, Steven D'Aprano wrote:
> On Sun, 07 Mar 2010 08:23:13 -0800, vsoler wrote:
> > Hello,
>
> > My code snippet reads data from excel ranges. First row and first column
> > are column headers and row headers respectively. After reding
Hello,
My script contains a print statement:
print '%40s %15d' % (k, m)
However,
1- the string is right adjusted, and I would like it left
adjusted
2- the number is a decimal number, and I would like it with
the thousands separator and 2 decimals
If possible, the
Say that "m" is a tuple of 2-tuples
m=(('as',3), ('ab',5), (None, 1), ('as',None), ('as',6))
and I need to build a "d" dict where each key has an associated list
whose first element is the count, and the second is the sum. If a 2-
tuple contains a None value, it should be discarded.
The expected
On 13 mar, 18:16, ru...@yahoo.com wrote:
> On Mar 13, 9:26 am, ru...@yahoo.com wrote:> That should be:
> > d = {}
> > for item in m:
>
> key = item[0]; value = item[1]
>
> > if key is None or value is None: continue
> > if key not in dict:
> > d[key] = [1, value]
> > else
Hello,
I am still learning python, thus developnig small scripts.
Some of them consist only of the main module. While testing them
(debugging) I sometimes want to stop the script at a certain point,
with something likestop, break, end or something similar.
What statement can I use?
Vicent
I am working on a script that reads data from an excel workbook. The
data is located in a named range whose first row contains the headers.
It works!!! I find it superb that python is able to do such things!!!
Now my questions.
a. My ranges can in practice be quite big, and although I am happy
w
Hi,
Is there a way to erase/delete/clear memory before a piece of code is
run?
Otherwise, the objects of the previous run are re-usable, and may
bring confusion to the tester.
Thank you
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Still learning Python, now decorators.
Before diving deeply into decorators, I'd like to apply a function to
another function.
My "extremely simple function" should print number 3, then the sum of
its 2 arguments.
Say that I call f(5,7)
I'd like to get, somehow, 3 then 12.
I've tried the
On 27 mar, 17:06, Patrick Maupin wrote:
> On Mar 27, 10:24 am, vsoler wrote:
>
>
>
> > Hi,
>
> > Still learning Python, now decorators.
>
> > Before diving deeply into decorators, I'd like to apply a function to
> > another function.
>
> &
On 27 mar, 17:21, vsoler wrote:
> On 27 mar, 17:06, Patrick Maupin wrote:
>
>
>
> > On Mar 27, 10:24 am, vsoler wrote:
>
> > > Hi,
>
> > > Still learning Python, now decorators.
>
> > > Before diving deeply into decorators, I'd lik
Still learning python, especially OOP.
While testing classes, I sometimes think of them as "ordinary
containers" of values and functions (methods). That is, values and
functions can be grouped together inside "namespaces" calles classes.
class Uno:
a=1
def m():
print "mouse"
Say
On Mar 21, 5:18 pm, Jon Clements wrote:
> On 21 Mar, 15:02, vsoler wrote:
>
> > Hi,
>
> > Is there a way to erase/delete/clear memory before a piece of code is
> > run?
>
> > Otherwise, the objects of the previous run are re-usable, and may
> > brin
On Apr 10, 4:46 pm, Duncan Booth wrote:
> vsoler wrote:
> > I get the following error message:
>
> > TypeError: m() takes no arguments (1 given)
>
> > Since I have not created any instances of Uno, there is no self
> > object, and I do not understa
On Apr 10, 4:46 pm, Duncan Booth wrote:
> vsoler wrote:
> > I get the following error message:
>
> > TypeError: m() takes no arguments (1 given)
>
> > Since I have not created any instances of Uno, there is no self
> > object, and I do not understa
On Apr 10, 5:28 pm, Laszlo Nagy wrote:
> > class Uno:
> > a=1
> > def m():
> > print "mouse"
>
> > Say that I have this "silly" class.
>
> > While I can then write
>
> > print Uno.a
>
> > I cannot write
> > Uno.m()
>
> > I get the following error message:
>
> > Typ
Hi everyone,
say that 'db' is a list of values
say 'i' is a list of indexes
I'd like to get a list where each item is i-th element of db.
For example:
db=[10,20,30,40,50,60,70,80,90] #undefined length
i=[3,5,7] #undefined length
then result=[30,50,70]
On 12 abr, 22:11, Patrick Maupin wrote:
> On Apr 12, 3:05 pm, vsoler wrote:
>
> > Hi everyone,
>
> > say that 'db' is a list of values
> > say 'i' is a list of indexes
> > I'd like to get a list where each item is i-th element of d
I have the following script:
class TTT(object):
def duplica(self):
self.data *= 2
def __init__(self, data):
self.data = data
TTT.duplica(self.data)
def __str__(self):
return str(self.data)
print
obj=TTT(7)
print obj
And I want 14 printed (twice 7)
I g
Taken from www.python.org, FAQ 2.3 How do I share global variables
across modules?
config.py:
x = 0 # Default value of the 'x' configuration setting
mod.py:
import config
config.x = 1
main.py:
import config # try removing it
import mod
print config.x
The example, such as shown in t
On 17 mayo, 00:05, Patrick Maupin wrote:
> On May 16, 4:42 pm, vsoler wrote:
>
>
>
> > Taken fromwww.python.org, FAQ 2.3 How do I share global variables
> > across modules?
>
> > config.py:
>
> > x = 0 # Default value of the 'x' con
On 17 mayo, 00:38, James Mills wrote:
> On Mon, May 17, 2010 at 8:26 AM, vsoler wrote:
> > However, can I be 100% sure that,no matter how I access variable
> > 'x' (with config.x or mod.config.x) it is always the same 'x'. I mean
> > that either refe
On 17 mayo, 00:52, Patrick Maupin wrote:
> On May 16, 5:38 pm, James Mills wrote:
>
> > On Mon, May 17, 2010 at 8:26 AM, vsoler wrote:
> > > However, can I be 100% sure that,no matter how I access variable
> > > 'x' (with config.x or mod.config.x) it i
Hi all,
I just installed python 3.1.2 where I used to have python 2.6.4. I'm
working on Win7.
The IDLE GUI works, but I get the following message when trying to
open *.py files written for py 2.6
The Application cannot locate win32ui.pyd (or Python) (126)
Should I change the PATH in Win
On Aug 4, 5:41 pm, Alex Willmer wrote:
> On Aug 4, 2:35 pm, vsoler wrote:
>
> > Hi all,
>
> > I just installed python 3.1.2 where I used to have python 2.6.4. I'm
> > working on Win7.
>
> > The IDLE GUI works, but I get the following message when trying
On Aug 4, 7:52 pm, Alex Willmer wrote:
> On Aug 4, 5:19 pm, vsoler wrote:
>
>
>
> > On Aug 4, 5:41 pm, Alex Willmer wrote:
>
> > > On Aug 4, 2:35 pm, vsoler wrote:
>
> > > > Hi all,
>
> > > > I just installed python 3.1.2 wh
Hello everyone!
I need to read, for each of the directories in a shared file server
unit, who has access to the directories and what type of access
privileges.
This is something that I can easily do interactively in my Windows
Document Explorer by right clicking a single directory, clicking on
Pr
On Aug 19, 8:55 pm, Tim Golden wrote:
> On 19/08/2010 4:55 PM, vsoler wrote:
>
> > I need to read, for each of the directories in a shared file server
> > unit, who has access to the directories and what type of access
> > privileges.
>
> > This is something that
On Aug 19, 10:59 pm, Tim Golden wrote:
> On 19/08/2010 9:17 PM, vsoler wrote:
>
>
>
> > On Aug 19, 8:55 pm, Tim Golden wrote:
> >> On 19/08/2010 4:55 PM, vsoler wrote:
>
> >>> I need to read, for each of the directories in a shared file server
> &g
On Aug 20, 9:36 am, Tim Golden wrote:
> > I currently do not have subversion access in my PC. I could try to
> > install a free copy of it. But it you could ptovide an installer, it
> > certainly would do things easier. Please let me know if it is
> > possible.
>
> Vicente, can you just confirm th
On Aug 20, 9:36 am, Tim Golden wrote:
> > I currently do not have subversion access in my PC. I could try to
> > install a free copy of it. But it you could ptovide an installer, it
> > certainly would do things easier. Please let me know if it is
> > possible.
>
> Vicente, can you just confirm th
On Aug 20, 4:26 pm, vsoler wrote:
> On Aug 20, 9:36 am, Tim Golden wrote:
>
> > > I currently do not have subversion access in my PC. I could try to
> > > install a free copy of it. But it you could ptovide an installer, it
> > > certainly would do things ea
On Aug 20, 5:10 pm, Tim Golden wrote:
> On 20/08/2010 15:49, vsoler wrote:
>
>
>
> > On Aug 20, 4:26 pm, vsoler wrote:
> >> On Aug 20, 9:36 am, Tim Golden wrote:
>
> >>>> I currently do not have subversion access in my PC. I could try to
>
On Aug 20, 5:10 pm, Tim Golden wrote:
> On 20/08/2010 15:49, vsoler wrote:
>
>
>
> > On Aug 20, 4:26 pm, vsoler wrote:
> >> On Aug 20, 9:36 am, Tim Golden wrote:
>
> >>>> I currently do not have subversion access in my PC. I could try to
>
On Aug 20, 7:42 pm, Tim Golden wrote:
> On 20/08/2010 5:10 PM, vsoler wrote:
>
>
>
> > On Aug 20, 5:10 pm, Tim Golden wrote:
> >> To decode the permission bit-strings to vaguely meaningful
> >> names:
>
> >>
> >> import os, sys
> &g
On Aug 21, 8:10 am, Tim Golden wrote:
> On 20/08/2010 11:54 PM, vsoler wrote:
>
> > I'am testing your library. I am mainly interested in knowing the
> > access attributes of directories in the local(C:\) or shared unit(W:\)
> > of my system.
>
> > Using
On Aug 21, 8:10 am, Tim Golden wrote:
> On 20/08/2010 11:54 PM, vsoler wrote:
>
> > I'am testing your library. I am mainly interested in knowing the
> > access attributes of directories in the local(C:\) or shared unit(W:\)
> > of my system.
>
> > Using
On Aug 21, 8:10 am, Tim Golden wrote:
> On 20/08/2010 11:54 PM, vsoler wrote:
>
> > I'am testing your library. I am mainly interested in knowing the
> > access attributes of directories in the local(C:\) or shared unit(W:\)
> > of my system.
>
> > Using
I started learning python with ver 2.6. Then I switched to 3.1 after
uninstalling the previous version.
Now I find that many of the code snippets that I would need are
written for py 2.6. Sometimes the automatic converter 2to3 doesn't
help, because it is not able to complete its objective and req
On 24 ago, 00:55, "Martin v. Loewis" wrote:
> > I tried to change file associations, first manually, in a CMD window.
> > But the system was responding "access denied" even when I used an
> > Administrator account (I was using FTYPE python.file="C:
> > \Python26\python.exe" "%1" %*).
>
> That work
On Aug 24, 1:33 am, "Martin v. Loewis" wrote:
> > When I am logged-in in a session as an administrator, the BAT file on
> > the Desktop, and I double-click on it, it does not work.
>
> This is not what I meant. Instead, right-click on the BAT file,
> and select "run as administrator".
>
> > When y
I am trying to read a csv file generated by excel.
Although I succeed in reading the file, the format that I get is not
suitable for me.
I've done:
>>> import csv
>>> spamReader = csv.reader(open('C:\\abc.csv', 'r'))
>>> print spamReader
<_csv.reader object at 0x01022E70>
>>> for row in spamRe
On Aug 27, 9:42 pm, Andreas Waldenburger
wrote:
> On Thu, 27 Aug 2009 21:36:28 +0200 Andreas Waldenburger
>
> wrote:
> > [snip]
>
> > Might I humbly suggest
>
> > >>> sheet = list(spamReader) # ?
>
> Oh, and while I'm humbly suggesting:
>
> spam_reader instead of spamReader or SpamReader or Spam
On Aug 28, 5:43 pm, Steven Rumbalski
wrote:
> On Aug 27, 3:06 pm, vsoler wrote:
>
>
>
> > I am trying to read a csv file generated by excel.
>
> > Although I succeed in reading the file, the format that I get is not
> > suitable for me.
>
> > I'v
Everything that I see in IDLE is in black.
I have tried to add colors, without success.
I've tried: /Options/Configure IDLE/Highlighting/IDLE Classic
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 28, 8:58 pm, vsoler wrote:
> Everything that I see in IDLE is in black.
>
> I have tried to add colors, without success.
>
> I've tried: /Options/Configure IDLE/Highlighting/IDLE Classic
Couldn't finish writing... sorry
---
Ever
On Aug 28, 9:55 pm, Chris Rebert wrote:
> On Fri, Aug 28, 2009 at 12:00 PM, vsoler wrote:
> > On Aug 28, 8:58 pm, vsoler wrote:
> >> Everything that I see in IDLE is in black.
>
> >> I have tried to add colors, without success.
>
> >> I've tr
On Aug 29, 1:27 am, r wrote:
> Have you tried saving the files as MYScriptName.py? notice the py
> extension, very important ;)
That was it!!!
I see the colors again. Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 29, 1:34 pm, Thorsten Kampe wrote:
> * vsoler (Sat, 29 Aug 2009 04:01:46 -0700 (PDT))
>
> > On Aug 29, 1:27 am, r wrote:
> > > Have you tried saving the files as MYScriptName.py? notice the py
> > > extension, very important ;)
>
> > That was it!!!
Hi,
After simplifying my problem, I can say that I want to get the sum of
the product of two culumns:
Say
m= [[ 'a', 1], [ 'b', 2],[ 'a', 3]]
r={'a':4, 'b':5, 'c':6}
What I need is the calculation
1*4 + 2*5 + 3*4 = 4 + 10 + 12 = 26
That is, for each row list in varia
1 - 100 of 109 matches
Mail list logo