Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Editting txt file
#1
hello,
I would like to separate the in txt file but there is no space between columns. I did not get how to upload the file. So i am going to put a simple example of the file.If you look closely there should be 13 separate columns based on the titles. Please pay attention to width of each part. Only the width of 'nodal point' consists of 10 columns and the rest hsas the width of 12 columns in a line. How can I do that? thank you.

nodal point x-disp y-disp z-disp x-vel y-vel z-vel x-accl y-accl z-accl x-coor y-coor z-coor
6000 1.28403E-03-3.24947E-03 0.00000E+00-2.26290E-02-1.19560E-02 0.00000E+00-1.06940E+00-2.67490E+00 0.00000E+00 2.95513E+01 8.39675E+00 0.00000E+00
6001 1.19853E-03-3.29378E-03 0.00000E+00-2.24782E-02-1.39476E-02 0.00000E+00-8.40659E-01-2.75136E+00 0.00000E+00 2.95512E+01 8.19671E+00 0.00000E+00
6002 1.19008E-03-3.27726E-03 0.00000E+00-2.10368E-02-1.50427E-02 0.00000E+00-9.82155E-01-1.44342E+00 0.00000E+00 2.95512E+01 7.99672E+00 0.00000E+00
6003 1.12513E-03-3.24679E-03 0.00000E+00-1.73326E-02-1.15935E-02 0.00000E+00-2.25696E+00-1.28769E+00 0.00000E+00 2.95511E+01 7.79675E+00 0.00000E+00
6004 1.07466E-03-3.20675E-03 0.00000E+00-1.69112E-02-1.21906E-02 0.00000E+00-2.15492E+00 3.66086E-01 0.00000E+00 2.95511E+01 7.59679E+00 0.00000E+00
6005 1.01320E-03-3.13263E-03 0.00000E+00-1.39944E-02-9.26766E-03 0.00000E+00-1.32388E+00-3.82603E-02 0.00000E+00 2.95510E+01 7.39687E+00 0.00000E+00
6006 9.48647E-04-3.05597E-03 0.00000E+00-1.44646E-02-8.38187E-03 0.00000E+00-1.40907E+00 1.23504E+00 0.00000E+00 2.95509E+01 7.19694E+00 0.00000E+00
6007 8.85903E-04-2.95333E-03 0.00000E+00-1.27204E-02-5.49422E-03 0.00000E+00 1.49626E-01 9.06790E-01 0.00000E+00 2.95509E+01 6.99705E+00 0.00000E+00
6008 8.12200E-04-2.84560E-03 0.00000E+00-1.24943E-02-5.13839E-03 0.00000E+00-6.06144E-01 2.37943E+00 0.00000E+00 2.95508E+01 6.79715E+00 0.00000E+00
6009 7.54015E-04-2.71980E-03 0.00000E+00-1.12431E-02-2.51882E-03 0.00000E+00-9.16694E-01 2.24073E+00 0.00000E+00 2.95508E+01 6.59728E+00 0.00000E+00
6010 6.81588E-04-2.60371E-03 0.00000E+00-1.14631E-02-2.57489E-03 0.00000E+00-9.40017E-01 2.49151E+00 0.00000E+00 2.95507E+01 6.39740E+00 0.00000E+00
6011 6.27836E-04-2.46679E-03 0.00000E+00-1.05504E-02 4.59373E-04 0.00000E+00-2.92736E-01 2.02190E+00 0.00000E+00 2.95506E+01 6.19753E+00 0.00000E+00
6012 5.65892E-04-2.33391E-03 0.00000E+00-1.05454E-02-8.70450E-05 0.00000E+00-3.97478E-01 2.87375E+00 0.00000E+00 2.95506E+01 5.99767E+00 0.00000E+00
6013 5.20693E-04-2.18806E-03 0.00000E+00-9.38509E-03 2.47265E-03 0.00000E+00-4.43511E-01 2.00480E+00 0.00000E+00 2.95505E+01 5.79781E+00 0.00000E+00
6014 4.69833E-04-2.04523E-03 0.00000E+00-8.89576E-03 2.91519E-03 0.00000E+00-1.07431E-01 2.09896E+00 0.00000E+00 2.95505E+01 5.59795E+00 0.00000E+00
6015 4.29652E-04-1.89813E-03 0.00000E+00-7.46945E-03 5.55568E-03 0.00000E+00-2.87285E-01 1.93713E+00 0.00000E+00 2.95504E+01 5.39810E+00 0.00000E+00
6016 3.80327E-04-1.75164E-03 0.00000E+00-6.77496E-03 5.49461E-03 0.00000E+00-3.01855E-01 1.75250E+00 0.00000E+00 2.95504E+01 5.19825E+00 0.00000E+00
6017 3.40919E-04-1.60056E-03 0.00000E+00-5.67025E-03 8.00584E-03 0.00000E+00-2.27148E-01 2.10710E+00 0.00000E+00 2.95503E+01 4.99840E+00 0.00000E+00
6018 2.96914E-04-1.44683E-03 0.00000E+00-4.62168E-03 7.30899E-03 0.00000E+00-1.40161E-01 1.34875E+00 0.00000E+00 2.95503E+01 4.79855E+00 0.00000E+00
6019 2.62750E-04-1.30132E-03 0.00000E+00-3.69431E-03 8.93300E-03 0.00000E+00-1.29424E-01 1.12608E+00 0.00000E+00 2.95503E+01 4.59870E+00 0.00000E+00
6020 2.28180E-04-1.15778E-03 0.00000E+00-3.18653E-03 7.88581E-03 0.00000E+00-4.41126E-01 9.34947E-01 0.00000E+00 2.95502E+01 4.39884E+00 0.00000E+00
6021 1.98378E-04-1.02328E-03 0.00000E+00-2.19533E-03 8.93209E-03 0.00000E+00 1.18022E-01 1.47233E+00 0.00000E+00 2.95502E+01 4.19898E+00 0.00000E+00
6022 1.73392E-04-8.94784E-04 0.00000E+00-2.48349E-03 7.27540E-03 0.00000E+00-7.74400E-01 4.29480E-01 0.00000E+00 2.95502E+01 3.99911E+00 0.00000E+00
6023 1.47810E-04-7.76176E-04 0.00000E+00-1.53367E-03 7.61353E-03 0.00000E+00-8.22209E-02 7.12992E-01 0.00000E+00 2.95501E+01 3.79922E+00 0.00000E+00
6024 1.28678E-04-6.62623E-04 0.00000E+00-1.95532E-03 5.80315E-03 0.00000E+00-8.20924E-02 5.31625E-01 0.00000E+00 2.95501E+01 3.59934E+00 0.00000E+00
6025 1.06069E-04-5.59772E-04 0.00000E+00-9.45175E-04 6.11427E-03 0.00000E+00-2.60260E-01 6.06516E-01 0.00000E+00 2.95501E+01 3.39944E+00 0.00000E+00
6026 8.96906E-05-4.60312E-04 0.00000E+00-9.02148E-04 4.68633E-03 0.00000E+00-1.42468E-01 3.43671E-02 0.00000E+00 2.95501E+01 3.19954E+00 0.00000E+00
6027 6.96937E-05-3.71779E-04 0.00000E+00-7.09436E-04 4.31467E-03 0.00000E+00-1.74249E-01 3.25648E-01 0.00000E+00 2.95501E+01 2.99963E+00 0.00000E+00
6028 5.50085E-05-2.87074E-04 0.00000E+00-3.28184E-04 3.21905E-03 0.00000E+00-3.90265E-01-3.24212E-01 0.00000E+00 2.95501E+01 2.79971E+00 0.00000E+00
6029 3.82648E-05-2.11207E-04 0.00000E+00-3.61708E-04 2.61636E-03 0.00000E+00 1.72393E-01 4.45897E-01 0.00000E+00 2.95500E+01 2.59979E+00 0.00000E+00
6030 2.54675E-05-1.38665E-04 0.00000E+00-1.67079E-04 1.65165E-03 0.00000E+00-4.80644E-01 9.47771E-02 0.00000E+00 2.95500E+01 2.39986E+00 0.00000E+00
6031 1.23007E-05-7.18537E-05 0.00000E+00-1.05629E-04 1.18883E-03 0.00000E+00 1.71887E-01-2.09403E-01 0.00000E+00 2.95500E+01 2.19993E+00 0.00000E+00
6032 1.00965E-06-8.14235E-06 0.00000E+00-3.03979E-05 1.38452E-04 0.00000E+00-1.05392E-01-4.44715E-01 0.00000E+00 2.95500E+01 1.99999E+00 0.00000E+00
6033 7.82702E-07-6.70334E-06 0.00000E+00-7.34207E-05 8.24313E-05 0.00000E+00-2.66645E-01 6.78411E-02 0.00000E+00 2.95500E+01 1.59999E+00 0.00000E+00
6034 5.84909E-07-5.06756E-06 0.00000E+00-1.27161E-05 7.73102E-05 0.00000E+00-1.20816E-01-3.83151E-01 0.00000E+00 2.95500E+01 1.19999E+00 0.00000E+00
6035 3.89695E-07-3.48309E-06 0.00000E+00-2.06166E-05 4.38646E-05 0.00000E+00-5.24263E-02 2.27947E-03 0.00000E+00 2.95500E+01 7.99997E-01 0.00000E+00
6036 2.03733E-07-1.75249E-06 0.00000E+00-7.18774E-07 1.80417E-05 0.00000E+00-3.79820E-02-1.45955E-01 0.00000E+00 2.95500E+01 3.99998E-01 0.00000E+00
6037 2.21320E-08 0.00000E+00 0.00000E+00 5.57123E-07 0.00000E+00 0.00000E+00 7.11758E-06 0.00000E+00 0.00000E+00 2.95500E+01 0.00000E+00 0.00000E+00
Reply


Messages In This Thread
Editting txt file - by muhsin - Oct-13-2017, 04:41 PM
RE: Editting txt file - by wavic - Oct-13-2017, 06:28 PM
RE: Editting txt file - by buran - Oct-13-2017, 06:49 PM
RE: Editting txt file - by muhsin - Oct-13-2017, 06:56 PM
RE: Editting txt file - by buran - Oct-13-2017, 07:45 PM
RE: Editting txt file - by buran - Oct-13-2017, 07:57 PM
RE: Editting txt file - by muhsin - Oct-13-2017, 08:00 PM
RE: Editting txt file - by buran - Oct-13-2017, 08:01 PM
RE: Editting txt file - by muhsin - Oct-13-2017, 08:15 PM
RE: Editting txt file - by buran - Oct-13-2017, 08:29 PM
RE: Editting txt file - by Larz60+ - Oct-13-2017, 08:40 PM
RE: Editting txt file - by muhsin - Oct-13-2017, 08:44 PM
RE: Editting txt file - by buran - Oct-13-2017, 08:45 PM
RE: Editting txt file - by buran - Oct-13-2017, 09:15 PM
RE: Editting txt file - by muhsin - Oct-13-2017, 09:31 PM
RE: Editting txt file - by buran - Oct-13-2017, 09:37 PM
RE: Editting txt file - by buran - Oct-13-2017, 09:38 PM
RE: Editting txt file - by buran - Oct-13-2017, 09:47 PM
RE: Editting txt file - by wavic - Oct-13-2017, 10:00 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020