Wayne Watson sierra_mtnv...@sbcglobal.net wrote
incoherency. For what it's worth, and that's about zero, I'm working
with my old XP and W7 machine's keyboards, mice and monitors
side-by-side. I have several times found my self using the wrong device.
In that situation I find it useful to
Hi,
today i need some help with the python manual.
I've found this fileupload example
http://webpython.codepoint.net/cgi_file_upload on that site.
It's taking from fileitem attributes like filename and file.
Where is the complete list of those attributes or methods?
Thankyou
--
--
Wayne Watson wrote:
snip
You tell us to try this and give a folder structure:
Folder1
track1.py
data1.txt
data2.txt
data3.txt
Folder2
track1.py
dset1.txt
dset2.txt
...
dset8.txt
snip
Maybe one simple test at a time will get better responses.
Hello Tutor,
Since Friday I get no answers to my first post.
So I re-post it was missed by the numerous arriving email:
This is my first program in python.
I am doing electrical simulation in spectre (spice like).
I have a models file which holds many parameters and
include files of
One formatting detail: there is a blank line after each line
printed, how do I ged rid of the extra blank lines?
lines = [line.strip() for line in infile if line[146:148] not in
omit_states]
print '\n'.join(lines)
This approach stripped leading blank spaces introducing errors into my
Karim Liateni karim.liat...@free.fr wrote
It concatenates both parameters and include files with the same
parameters definitions. That trigs errors during simulation and
it complains about parameters double definition.
I'd suggest you construct a dictionary based on the param names
You can
On 03/01/10 01:12, Alan Gauld wrote:
def getLines(file):
Get the content of a file in a lines list form.
f = open(file, 'r')
lines = f.readlines()
f.close()
return lines
I'm not sure these functions add enough value to ghave them. I';d
probably just use
try:
Lie Ryan wrote:
On 03/01/10 01:12, Alan Gauld wrote:
def getLines(file):
Get the content of a file in a lines list form.
f = open(file, 'r')
lines = f.readlines()
f.close()
return lines
I'm not sure these functions add enough value to ghave them. I';d
probably just use
Alan, i don't know how to use it in this case.
import cgi
form = cgi.FieldStorage()
fileitem = form['file']
Function dir() lists all functions in a module, i could only use it for cgi
It will list all the names in any kind of object not just a module.
If you type the code above at
On 03/01/10 02:49, Karim Liateni wrote:
Lie Ryan wrote:
On 03/01/10 01:12, Alan Gauld wrote:
def getLines(file):
Get the content of a file in a lines list form.
f = open(file, 'r')
lines = f.readlines()
f.close()
return lines
I'm not sure these functions add enough
Lie Ryan wrote:
On 03/01/10 02:49, Karim Liateni wrote:
Lie Ryan wrote:
On 03/01/10 01:12, Alan Gauld wrote:
def getLines(file):
Get the content of a file in a lines list form.
f = open(file, 'r')
lines = f.readlines()
f.close()
return lines
I'm
After importing the math module and running
math.cos( x )
the result is in radians.
Is there a way of setting this so that it results in degrees? I don't
want to over-ride this permanently for my Python settings, so am happy
to specifically do it per equation or per program.
Thanks in
On Sun, Feb 28, 2010 at 8:39 PM, AG computing.acco...@googlemail.com wrote:
After importing the math module and running
math.cos( x )
the result is in radians.
Is there a way of setting this so that it results in degrees? I don't want
to over-ride this permanently for my Python settings,
I have another question related to OOD. What I have is a module with one
parent class and two child classes. Some stuff is done to the object that is
passed to the function in one of the child classes and this then calls a
function from the global class passing local variables (from the child
On Sun, Feb 28, 2010 at 06:24:09PM -0500, James Reynolds wrote:
I have another question related to OOD. What I have is a module with one
parent class and two child classes. Some stuff is done to the object that is
passed to the function in one of the child classes and this then calls a
Karim Liateni karim.liat...@free.fr wrote
def getLines(file):
try: lines = open(filename).readlines() ; return lines
except IOError: #handle error
but in the second 'lines = open(filename).readlines()'
I don't hold indirectly a reference to the file? Please, could you
explain more this
James Reynolds eire1...@gmail.com wrote
parent class and two child classes. Some stuff is done to the object that
is
passed to the function in one of the child classes and this then calls a
function from the global class passing local variables (from the child
class).
You really need to
17 matches
Mail list logo