Select to view content in your preferred language

I NEED TO EXTRACT THE FIRST LETTER AND THE MIDDLE LETTER OF A STRING ATTRIBUTE VALUE

6196
20
Jump to solution
05-23-2013 01:57 PM
OLANIYANOLAKUNLE
Frequent Contributor
I NEED TO EXTRACT THE FIRST LETTER AND THE MIDDLE LETTER OF A STRING ATTRIBUTE VALUE I.E "FIGURINE" , I WANT TO EXTRACT LETTER "F" & "R" TO FORM "FR". PLEASE HELP ME
Tags (2)
0 Kudos
20 Replies
RhettZufelt
MVP Notable Contributor

Please how can i handle the issue of schema Lock? This schema lock issue is really getting on my nerves.


Best way I have found is to have each script spawned in a separate python process.  So, I have code similar to the following as my main "control" script:

import os

buildings = r"C:\arcgisserver\python\buildings.bat"
mapping = r"C:\arcgisserver\python\mapping.bat"
MRs = r"C:\arcgisserver\python\MRs.bat"
finish = r"C:\arcgisserver\python\finish.bat"

os.system(mapping)
os.system(buildings)
os.system(MRs)
os.system(finish)


Then, the respective .bat files would be similar to:

cd C:\Python27\ArcGIS10.1

Python C:\arcgisserver\python\buildings.py

Exit


This way, a sepratate python process is spawned to run each script.  When it hits the "Exit" in the batch file, it closes that python process and releases ALL lock files.  then it moves on to the next script.

Hope this helps,

R_
0 Kudos