[Tutor] ArcGis 10 support materials for Python

2011-01-24 Thread saxon piggott
Hello, I was wondering if there is any information anywhere on the use of Python scripts (How to..) for ESRIs ArcGIS 10? or alternatively, if ESRI press or perhaps some other publisher has released a book that details obect oriented programming (presumably with Python scripting) for ArcGIS 10

[Tutor] Weave - how to find the compiler on windows

2011-01-24 Thread CS
Hello! I want to use weave.biltz(), but it doesn´t find the compiler. I installed minGW on windows in the path C:\MinGW\bin (so no spaces here) and added it to the path variable (and it works on the command line). I already installed python and scipy. Okay, now the question : How do I tell sci

Re: [Tutor] ArcGis 10 support materials for Python

2011-01-24 Thread Vern Ceder
I do know that ArgGIS and Python are used together a fair amount, but I'm not aware of a book. I'm assuming that you've already checked out pages like this? http://gisweb.apsu.edu/blogs/arcgis-10-and-python Cheers, Vern On Mon, Jan 24, 2011 at 4:28 AM, saxon piggott wrote: > Hello, > > I was

[Tutor] Help listing directory timestamps and deleting directories

2011-01-24 Thread bsd...@gmail.com
Hi, hoping for some help here. I've been trying to write a python script (complete newb) and have spent several days trying to get this right with no success. I am trying to list timestamps in a directory and if they are older than x amount of days delete the directories. It seems that in my for l

Re: [Tutor] Help listing directory timestamps and deleting directories

2011-01-24 Thread Vince Spicer
On Mon, Jan 24, 2011 at 11:25 AM, bsd...@gmail.com wrote: > Hi, hoping for some help here. I've been trying to write a python script > (complete newb) and have spent several days trying to get this right with no > success. > > I am trying to list timestamps in a directory and if they are older th

Re: [Tutor] Help listing directory timestamps and deleting directories

2011-01-24 Thread Japhy Bartlett
I would check that os.path.join(r,dir) is giving you the directory you think it is. - japhy On Mon, Jan 24, 2011 at 12:25 PM, bsd...@gmail.com wrote: > Hi, hoping for some help here. I've been trying to write a python script > (complete newb) and have spent several days trying to get this right

Re: [Tutor] Help listing directory timestamps and deleting directories

2011-01-24 Thread Karim
Hello, Also working w/o external module just the standard one: *>>> import datetime >>> remove_after = datetime.datetime.now() - datetime.timedelta(days=31) >>> remove_after datetime.datetime(2010, 12, 24, 23, 21, 10, 11315) * Regards Karim On 01/24/2011 08:02 PM, Vince Spicer wrote: On Mon

[Tutor] Not understanding a bit of code behavior

2011-01-24 Thread Bill Allen
This is a bit embarrassing, but I have crafted a bit of code that does EXACTLY what I what, but I am now a bit baffled as to precisely why. I have written a function to do a bit of webscraping by following links for a project at work. If I leave the code as is, it behaves like it is recursively p

Re: [Tutor] Not understanding a bit of code behavior

2011-01-24 Thread Bill Allen
By the way, my guess as to why this is working for me the way it does is that the statement out_list = part_list is actually linking these two objects, making them one. My intention had been to just assign values from one to the other, but I think I have done far more than that. In this case,

Re: [Tutor] Not understanding a bit of code behavior

2011-01-24 Thread Bill Allen
Ok, I have definately verified this to myself. The following works perfectly and is a little easier to understand. In this version, I am plainly modifying my parts_list iterator thus producing the effect of an iterator that is growing over the course of the operation of the code. So, I am convi

Re: [Tutor] Not understanding a bit of code behavior

2011-01-24 Thread Alan Gauld
"Bill Allen" wrote I am convinced that I had previously assigned part_list to out_list by reference, not value as I mistaken thought when I first wrote the code, In Python variables are names which refer to objects. So your assignment made both names refer to the same object. Question, is

Re: [Tutor] Not understanding a bit of code behavior

2011-01-24 Thread David Hutto
On Tue, Jan 25, 2011 at 2:42 AM, Alan Gauld wrote: > > "Bill Allen" wrote > >> I am convinced that I had previously assigned part_list to out_list by >> reference, not value as I mistaken thought when I first wrote the code, > > In Python variables are names which refer to objects. > So your assi