Question: I'm working on a ArcGIS 9.3.1 ArcEditor and I want to write a python script that will do a Join or Relate. Problem is, that join table\join field are restricted to ARCINFO (higher license), and relate isn't doable by code (or so it seems from the ARCGIS help). As upgrading the license isn't an option, Does anybody have a way I can do a join between two shapefiles in ArcGIS or Opensource tools?

Answer: 
For creating points:

```
ptList =[[20.000,43.000],[25.500, 45.085],[26.574, 46.025], [28.131, 48.124]]
pt = arcpy.Point()
ptGeoms = []
for p in ptList:
    pt.X = p[0]
    pt.Y = p[1]
    ptGeoms.append(arcpy.PointGeometry(pt))

arcpy.CopyFeatures_management(ptGeoms, r"C:\Temp\test.shp")

```

It will return a message like this:

```
<Result 'C:\\Temp\\test.shp'>

```
You can create a shapefile in Python using the [Create Feature Class](http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00170000002p000000) tool. There is an example at the bottom of the page.

To populate the shapefile with your lat & long data, you can use an [Insert Cursor](http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v00000038000000). 

Perhaps you can load your lat & long data as a [list](http://effbot.org/zone/python-list.htm) into Python, then iterate through the array populating the rows of your new shapefile with the insert cursor. 

A python list of coordinates can be constructed like this:

```
latLonList = [[40.000,-75.000],[39.998,-75.432],[39.981,-75.343]]

```

Then to iterate through coordinates in the list (and print them, for example), do this:

```
for coord in latLonList:
    print "lat: " + str(coord[0])
    print "lon: " + str(coord[1])

```

To add a layer to an mxd file, see [Adding shapefile or feature class as layer in ArcGIS Desktop using Python/ArcPy?](https://gis.stackexchange.com/questions/4882)