[Tutor] reading and writing with csv then appending some data to a specific line

2007-11-04 Thread pierre cutellic
Hi, I wrote this script to select some data from a csv file. Actually it writes it into a file but i would like to append it into an existing one to a specific line without removing existing code. does the open('filename.csv','a+') can do that? here is the existing code: *import csv import sys

[Tutor] how to read from a csv file?

2007-10-22 Thread pierre cutellic
Hi, this is a module i wrote to catch some data from a csv file: ## #module csv data reader # open a csv file and return its data import csv import sys def __init__(self): rawdata = [] f = open('datalisting_000.csv','r') try: reader = csv.reader(f) for row

[Tutor] how to read from an excel file?

2007-10-21 Thread pierre cutellic
Hi, I'm actually trying to understand how to read data from an excel file but i'm pretty stuck here: I have already used makepy to generate the excel modules and its ID, which looks like : 00020813---C000-0046 But i don't really know what are the next steps. I presume that it sh

[Tutor] ZeroDivisionError: float division

2007-10-06 Thread pierre cutellic
Hi, i'm actually stuck with a stupid syntax problem. here is a a piece of code i can't debug: kx = (neighbor[1]+agent[1])/(dx-(neighbor[1]+agent[1])) in this line, 'neighbor[1]' and 'agent[1]' are both integers and 'dx' is a float so it gives me the following error: 'ZeroDivisionError: float div

[Tutor] Need some help about pywin32.

2007-08-18 Thread pierre cutellic
Hi, I'm actually working with many softwares for 3D-CAD-modeling, like Blender and Rhino, and i have heard about pywin32 and makepy which can define Rhinoscript command but really don't know how to do. This is something which could be really usefull (and a super saving-time tip!!) for me to command

[Tutor] launching mayavi2 via SPE?

2007-07-08 Thread pierre cutellic
hi, i just started to work with scipy and i would like to know the basic example code to launch or script mayavi2 because i can't get anything with the documentation given on the scipy.orgsite :( cheers pierre ___ Tutor maillist - Tutor@python.o

[Tutor] editing macros for catia V5

2007-06-17 Thread pierre cutellic
I am new to Python and trying to get my head around catia V5 I would like to start to write some automated process in python for catia, does anybody know the way to or some docs maybe? cheers Pierre ___ Tutor maillist - Tutor@python.org http://mail.py