Hello Petter!!
Thank you for answer to my question. I apologize for the writing of my code,
won't happen again. I added the lines you suggested me, and the script work
fine. Than you!! Here's the code corrected and indented.
from Tkinter import * #Llamo las librerias graficas de Tk
import tkSimple
HI, I have two files, one is reference file, another is waiting for adjust one,
File 1:
1 C1
2 O1
3 C2
4 C3
5 H3
6 C7
7 O2
8 H22
9 C6
10 H61
11 C5
12 H5
13 C4
14 C8
15 C9
16 C10
17 O3
18 C11
19 C12
20 O4
21 C13
22 C14
23 C15
24 C20
25 H20
26 C16
27 H16
28 C17
29 H17
30 C18
31 O6
32 H62
33 C19
34
Perhaps a little more information on what is going on and what the
expected outcome is. In order for the tutors to be able to better help
you as I am not sure what you expect to get from these two lists. IE
there is no field 2 in file 2, so what should it be? Also what should
happen to the rest of
I was assuming that the numbers were field 1, and the letter/number
combinations were field 2. If I understand him correctly, he wants the
lines in file 2 to be arranged such that the order of field two is the
same as it is in file 1. In that case, you can do it with one sexy
sort() call (and a lit
I'm also slightly confused. Why does file one start at 1, but file 2 starts at
3. Why not just duplicate file2?
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: lina
Sender: tutor-bounces+bodsda=googlemail@python.org
Date: Wed, 7 Sep 2011 12:46:37
To: tutor
For file 1,
1 C1
2 O1
3 C2
4 C3
5 H3
This one is much more like dictionary,
; nr atom cgnr charge mass
1 C1 10.062 15.0350
2 O1 1 -0.139 15.9994
3 C2 10.064 12.0110
4 C3 1 -0.001 12.0110
forgot to forward this to list, sorry.
-- Forwarded message --
From: Hugo Arts
Date: Wed, Sep 7, 2011 at 8:24 AM
Subject: Re: [Tutor] how to sort the file out
To: lina
On Wed, Sep 7, 2011 at 8:16 AM, lina wrote:
> On Wed, Sep 7, 2011 at 1:28 PM, Hugo Arts wrote:
>> I was ass