From nounou__nounou at hotmail.fr  Wed Nov  7 14:16:53 2012
From: nounou__nounou at hotmail.fr (nou nou)
Date: Wed, 7 Nov 2012 14:16:53 +0100
Subject: [Python-porting] =?windows-1256?q?help_python2=2E6_ubuntu_10=2E04?=
 =?windows-1256?q?=FE?=
Message-ID: <COL103-W21F1F2A3F7F07CE9DA239ABA6A0@phx.gbl>


Hi everyone,I use ubuntu 10.04 and tinyos-2.1.1
I have a problem when i want run "make micaz sim"The problem is the following :
mkdir -p simbuild/micazmake: python2.6.5-config: Command not foundmake: python2.6.5-config: Command not foundmake: python2.6.5-config: Command not found

I try to update and install "python2.6-dev"
I add also "export PYTHONPATH=$PYTHONPATH:/usr/include/python2.6"
I also modified PYTHON_VERSION=2.6.5
in 'sim-fast.extra', 'sim-sf.extra' and 'sim.extra' files located in <TOS_root>/support/make
Have you any idea??
Cordially,Nounou 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-porting/attachments/20121107/b418df55/attachment.html>

From rdmurray at bitdance.com  Wed Nov  7 14:41:34 2012
From: rdmurray at bitdance.com (R. David Murray)
Date: Wed, 07 Nov 2012 08:41:34 -0500
Subject: [Python-porting]
	=?windows-1256?q?help_python2=2E6_ubuntu_10=2E04?=
	=?windows-1256?q?=FE?=
In-Reply-To: <COL103-W21F1F2A3F7F07CE9DA239ABA6A0@phx.gbl>
References: <COL103-W21F1F2A3F7F07CE9DA239ABA6A0@phx.gbl>
Message-ID: <20121107134134.CAD0825006F@webabinitio.net>

On Wed, 07 Nov 2012 14:16:53 +0100, nou nou <nounou__nounou at hotmail.fr> wrote:
> 
> Hi everyone,I use ubuntu 10.04 and tinyos-2.1.1
> I have a problem when i want run "make micaz sim"The problem is the following :
> mkdir -p simbuild/micazmake: python2.6.5-config: Command not foundmake: python2.6.5-config: Command not foundmake: python2.6.5-config: Command not found

I would suggest posting to either a mailing list dealing with tinyos,
or perhaps to the python-list mailing list.  The topic for this list is
helping people port programs from Python2 to Python3, so you are much
more likely to find people who will answer your question on those other
mailing lists than you are to find them on this one.

--David

From glez_b at comunidad.unam.mx  Thu Nov 15 10:20:50 2012
From: glez_b at comunidad.unam.mx (Boris Vladimir Comi)
Date: Thu, 15 Nov 2012 09:20:50 +0000
Subject: [Python-porting] Plot multiple lines using python / basemap
Message-ID: <9D6FC4172EA6B64B9044B9B8196DBB250DF7AB63@BL2PRD0710MB373.namprd07.prod.outlook.com>



Hi all:

I have begun to learn about python / matplolib / basemap and really need some help.

  My data is in an Excel workbook with the following structure:

Evento                     Fecha                        Latitud                                 Longitud                  Hora (UTC)
    1                          02/mayo                         19,7                                        -95,2                          0045
                                                                       19,3                                       -95.3                          0115
                                                                       19,8                                       -95,6                           0145
                                                                       19,9                                       -96,6                           0215
                                                                     

    2                           03/mayo                         20,2                                       -99,6                             0815
                                                                        21,5                                       -99,8                            0845
                                                                        22,5                                       -99,9                            0915
                                                                        23,5                                       -100,0                           0945

    3                          15/mayo                          21,3                                        -118,9                            2215
                                                                        21,5                                         -118,7                          2245
                                                                        22,8                                         -120,3                           2315
 
     .                              .                                    .                                                   .                                   .
     .                              .                                    .                                                   .                                   .
     .                              .                                    .                                                   .                                   .






How to open excel file in python?

I would like to plot multiple line joining the positions of each of the events, it is possible to do this? Have any idea how to do it?

The idea is to plot the trajectories on a particular region, for my case is Mexico.

From d at davea.name  Thu Nov 15 11:29:46 2012
From: d at davea.name (Dave Angel)
Date: Thu, 15 Nov 2012 10:29:46 -0000
Subject: [Python-porting] [Tutor] Plot multiple lines using python /
	basemap
In-Reply-To: <9D6FC4172EA6B64B9044B9B8196DBB250DF7AB63@BL2PRD0710MB373.namprd07.prod.outlook.com>
References: <9D6FC4172EA6B64B9044B9B8196DBB250DF7AB63@BL2PRD0710MB373.namprd07.prod.outlook.com>
Message-ID: <50A4C3FF.1020701@davea.name>

On 11/15/2012 04:20 AM, Boris Vladimir Comi wrote:
>
> Hi all:
>
> I have begun to learn about python / matplolib / basemap and really need some help.
>
>   My data is in an Excel workbook with the following structure:
>
> Evento                     Fecha                        Latitud                                 Longitud                  Hora (UTC)
>     1                          02/mayo                         19,7                                        -95,2                          0045
>                                                                        19,3                                       -95.3                          0115
>                                                                        19,8                                       -95,6                           0145
>                                                                        19,9                                       -96,6                           0215
>                                                                      
>
>     2                           03/mayo                         20,2                                       -99,6                             0815
>                                                                         21,5                                       -99,8                            0845
>                                                                         22,5                                       -99,9                            0915
>                                                                         23,5                                       -100,0                           0945
>
>     3                          15/mayo                          21,3                                        -118,9                            2215
>                                                                         21,5                                         -118,7                          2245
>                                                                         22,8                                         -120,3                           2315
>  
>      .                              .                                    .                                                   .                                   .
>      .                              .                                    .                                                   .                                   .
>      .                              .                                    .                                                   .                                   .
>
>
>
>
>
>
> How to open excel file in python?

>From Excel, save the file as a csv file, rather than a proprietary
format.  Then, within Python program, use the csv module,
    http://docs.python.org/2/library/csv.html


The essential parts:
import csv
def  getdata(filename):
    with open(filename, "rb") as infile:
        csvreader = csv.reader(infile, delimiter ="\t", quotechar='"')
            for row in csvreader:
                ---- process row ----

where row comes back as a list of items.

You may have to play with the delimiter and quotechar, as I don't use
Excel itself, to know what it defaults to.  But a csv file is a text
file, so it should be pretty obvious if you just look at the file with a
text editor or viewer, what the separator and quote characters are.  The
quote character generally only matters if some field has an embedded
separator or newline in it.

>
> I would like to plot multiple line joining the positions of each of the events, it is possible to do this? Have any idea how to do it?

Try matplotlib:    http://pypi.python.org/pypi/matplotlib/1.1.0
It depends on numpy:   http://numpy.scipy.org/


>
> The idea is to plot the trajectories on a particular region, for my case is Mexico.
>

-- 

DaveA