[Tutor] In need for some advice
Klas Marteleur
klas.martelleur at telia.com
Mon Aug 9 19:54:35 CEST 2004
Hi again
I have just gone thrue Alan G's book and i think i am ready for some project
of my own. I stumbled over a little file conversion project at work wich i
thought could be a good start, and i need some help in the "right" direction.
This is what i want to do:
From our CAD system we get output files looking somewhat like file
"output.txt" attached to this mail. It is possible to adjust the column witdh
if nessesary from within the CAD (these values will be "locked" in the CAD
when i found out what is best suited for my program.) It must understand
"swedish" characters å, ä ö.
I want to convert the file to look like "inputToPDM.txt" attached to this
mail, so i can import it to our PDM system (it only supports files formated
like this one). It must understand "swedish" charakters å, ä, ö.
Then ofcourse i want a little GUI which takes a input (a filename) and a
output (a filename) :)
This is how i plan to do it:
1. Create a file named createEbomFromFile.py wich should take care of the
actual work. The file should consist of a "class" "createEbomFromFile(self,
inputFile, ouputFile). A couple of functions, one that reads the file to a
list and splits it to correct portions (a word per list "item"), mayby some
kind of filter function as well to remove unwanted characters, and one that
prints the new formated list to a file that our PDM system understand.
2. Create a file named createEbomFromFileGui.py which imports
createEbomFromFile and creates my slick Tkinter interface.
How does this sound? Am i being to complicated? I want to design this program
myself but i need some Startup tips. Anyone has a example that reminds of
this that he/she could share with me?
Klas
-------------- next part --------------
Parent Name Parent Revision Child Name Child RevisionQuantityFind NumberReference Designator Remark Usage WP PRP
03003365 AB 03003240 AC 1 10 - - -
03003365 AB 03003358 AA 2 9 Mtrl. spec.: 56-3239-47 YES -
03003365 AB 03003359 AB 8 8 - - YES
03003365 AB 03003360 AB 1 7 - YES YES
03003365 AB 03003361 AA 2 6 - - -
03003365 AB 03003362 AB 1 5 - YES YES
03003365 AB 03003363 AB 1 4 - YES YES
03003365 AB 03003364 AB 1 3 - YES YES
03003365 AB 59-0763-00 1 16 2 DIN 934 - -
03003365 AB 59-0781-00 1 16 1 - - -
-------------- next part --------------
Parent Name;Parent Revision;Child Name;Child Revision;Quantity;Find Number;Reference Designator;Remark;Usage;WP;PRP
03002094;AA;03002062;AA;1;10;10;-;;-;-
03002094;AA;03002093;AA;2;20;9;Mtrl. spec.: 56-3239-47;;YES;-
03002094;AA;03002086;AA;8;30;8;-;;-;YES
03002094;AA;03002090;AA;1;40;7;-;;YES;YES
03002094;AA;03002091;AA;2;50;6;-;;-;-
03002094;AA;03002089;AA;1;60;5;-;;YES;YES
03002094;AA;03002087;AA;1;70;4;-;;YES;YES
03002094;AA;03002088;AA;1;80;3;-;;YES;YES
03002094;AA;03002092;AA;16;90;2;DIN 934;;-;-
03002094;AA;03002085;AA;16;100;1;-;;-;-
More information about the Tutor
mailing list