Re: [Tutor] file opened by open() are closed automaticaly

2017-01-14 Thread ZEMMOURA Khalil Zakaria
Thanks a lot. that helped me to understand that behaviour. Best regards. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] file opened by open() are closed automaticaly

2017-01-14 Thread Ben Finney
ZEMMOURA Khalil Zakaria writes: > The file opened using open() is closed automaticaly after iterationg > over it in the python shell You can interrogate a file to ask whether it is closed; the ‘closed’ attribute will be True when the file is closed. > testfile = open('test.txt') > for line in t

Re: [Tutor] Editing Data in Non Versioned SDE Using python With An Update Cursor

2017-01-14 Thread Steven D'Aprano
On Fri, Jan 13, 2017 at 12:10:25PM -0330, Nicole King wrote: > Hello, > > > > I have a python script that calculates x coordinates , y coordinates for a > point geometry that sits within a feature dataset of an SDE (SQL Express). It looks like you are using arcpy, which is a specialised piece

Re: [Tutor] Editing Data in Non Versioned SDE Using python With An Update Cursor

2017-01-14 Thread Peter Otten
Nicole King wrote: > Hello, > > > > I have a python script that calculates x coordinates , y coordinates for > a point geometry that sits within a feature dataset of an SDE (SQL > Express). The script worked fine on a file geodatabase however when it > runs on the SDE feature class, it stalls

Re: [Tutor] Incorporate an Integer as part of a Label

2017-01-14 Thread Peter Otten
S. P. Molnar wrote: > I am a very new python pseudo-programmer (Fortran II was my first > language eons ago) and have encountered a problem that is giving me fits > (google is no help). > > I have written a python program that takes the output from a quantum > chemistry program, carries out some

Re: [Tutor] file opened by open() are closed automaticaly

2017-01-14 Thread Peter Otten
ZEMMOURA Khalil Zakaria wrote: > Hi, > > I am playing with python3.6 and i noticed a change in the behaviour of the > open() builtin function. > > The file opened using open() is closed automaticaly after iterationg over > it in the python shell > > Here is the dummy code i am using: > > # Beg

[Tutor] file opened by open() are closed automaticaly

2017-01-14 Thread ZEMMOURA Khalil Zakaria
Hi, I am playing with python3.6 and i noticed a change in the behaviour of the open() builtin function. The file opened using open() is closed automaticaly after iterationg over it in the python shell Here is the dummy code i am using: # Beggin testfile = open('test.txt') for line in testfil

[Tutor] Incorporate an Integer as part of a Label

2017-01-14 Thread S. P. Molnar
I am a very new python pseudo-programmer (Fortran II was my first language eons ago) and have encountered a problem that is giving me fits (google is no help). I have written a python program that takes the output from a quantum chemistry program, carries out some calculations and saves two fi

[Tutor] Editing Data in Non Versioned SDE Using python With An Update Cursor

2017-01-14 Thread Nicole King
Hello, I have a python script that calculates x coordinates , y coordinates for a point geometry that sits within a feature dataset of an SDE (SQL Express). The script worked fine on a file geodatabase however when it runs on the SDE feature class, it stalls at the updateCursor function. "