"Wayne Watson" 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 make the old environment as h
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
--
--
AnotherNet
Wayne Watson wrote:
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
Maybe one simple test at a time will get better responses. Since you
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 parameters
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
fi
"Karim Liateni" 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 check before you add c
"Giorgio" wrote
It's talking from fileitem attributes like filename and file.
Where is the complete list of those attributes or methods?
Probably on a web page somewhere but you are probably
better using the help() function and dir() to examine an
instance from the >>> prompt.
HTH,
--
Alan, i don't know how to use it in this case.
import cgi
form = cgi.FieldStorage()
fileitem = form['file']
fileitem.file.read()
Function dir() lists all functions in a module, i could only use it for
"cgi" O_O.
Thankyou
2010/2/28 Alan Gauld
>
> "Giorgio" wrote
>
> It's talking from fileite
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
>
Hello Alan,
Alan Gauld wrote:
"Karim Liateni" 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 na
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 abov
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
>>>
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
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 adva
On Sun, Feb 28, 2010 at 8:39 PM, AG 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, so am happy to
> specific
On Mon, 1 Mar 2010 06:39:10 am AG wrote:
> After importing the math module and running
>
> math.cos( x )
>
> the result is in radians.
It certainly is not. The *result* of cos is a unitless number, not an
angle.
What you mean is that the *input* to cos, x, has to be supplied in
radians. No, you
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
class
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
> func
"Karim Liateni" 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 point?
Sure, the l
"James Reynolds" 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 tighten up on the te
I just posted the details a moment ago to Steven.
On 2/28/2010 3:46 AM, Dave Angel wrote:
Wayne Watson wrote:
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
Kent Johnson wrote:
It's not really about keeping score :-), but once again I've compiled
a list of the top 20 posters to the tutor list for the last year. For
2009, the rankings are
2009 (7730 posts, 709 posters)
Alan Gauld 969 (12.5%)
Kent Johnson 804 (10.4%)
Dave Angel 254 (3.3%)
spir 25
Wayne Watson wrote:
(I sent the msg below to Steven and the list a moment ago, since msgs
going to the list with attachments either don't post or take lots of
time to post, I'm sending both of you this copy.)
Steven, attached are three jpg files showing the properties of the two
py files. The
24 matches
Mail list logo