python script for .dat file
Muhammad Ali
muhammadaliaskari at gmail.com
Tue Apr 5 12:27:49 EDT 2016
On Tuesday, April 5, 2016 at 9:07:54 AM UTC-7, Oscar Benjamin wrote:
> On 5 April 2016 at 16:44, Muhammad Ali <muhammadaliaskari at gmail.com> wrote:
> > On Tuesday, April 5, 2016 at 8:30:27 AM UTC-7, Joel Goldstick wrote:
> >> On Tue, Apr 5, 2016 at 11:23 AM, Muhammad Ali
> >> <muhammadaliaskari at gmail.com> wrote:
> >> >
> >> > Could any body tell me a general python script to generate .dat file after the extraction of data from more than 2 files, say file A and file B?
> >> >
> >> > Or could any body tell me the python commands to generate .dat file after the extraction of data from two or more than two files?
> >> >
> >> > I have to modify some python code.
> >>
> >> What exactly is a .dat file? and how is it different from any other
> >> file? Is it binary or text data?
> >
> > It is text data.
>
> You haven't provided enough information for someone to answer your
> question. This is a text mailing list so if a .dat file is text then
> you can paste here an example of what it would look like. What would
> be in your input files and what would be in your output files? What
> code have you already written?
>
> If the file is large then don't paste its entire content here. Just
> show an example of what the data would look like if it were a smaller
> file (maybe just show the first few lines of the file).
>
> Probably what you want to do is easily achieved with basic Python
> commands so I would recommend to have a look at a tutorial. There are
> some listed here:
> https://wiki.python.org/moin/BeginnersGuide/NonProgrammers
>
> Also the tutor mailing list is probably more appropriate for this
> level of question:
> https://mail.python.org/mailman/listinfo/tutor
>
> --
> Oscar
Input and outout files are text files. e.g:
#KptCoord #E-E_Fermi #delta_N
0.0000 -22.0000 0.000E+00
0.0707 -22.0000 0.000E+00
0.1415 -22.0000 0.000E+00
0.2122 -22.0000 0.000E+00
0.2830 -22.0000 0.000E+00
0.3537 -22.0000 0.000E+00
0.4245 -22.0000 0.000E+00
0.4952 -22.0000 0.000E+00
0.5660 -22.0000 0.000E+00
0.6367 -22.0000 0.000E+00
0.7075 -22.0000 0.000E+00
0.7782 -22.0000 0.000E+00
0.8490 -22.0000 0.000E+00
0.9197 -22.0000 0.000E+00
0.9905 -22.0000 0.000E+00
More information about the Python-list
mailing list