Re: file open default location

2007-06-12 Thread T. Crane
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > En Tue, 12 Jun 2007 11:48:32 -0300, <[EMAIL PROTECTED]> escribió: >> On Jun 12, 9:09 am, "Richard Brodie" <[EMAIL PROTECTED]> wrote: > >>> If you open a DOS window and run Python from there, it will write the >>> f

Re: file open default location

2007-06-12 Thread T. Crane
>> As an aside, I forgot to mention above that I'm using Windows XP. Any >> other ideas or possible reasons that it would not choose my script >> location as the default location to save something? > > If you open a DOS window and run Python from there, it will write the > files > in whatever d

Re: file open default location

2007-06-12 Thread T. Crane
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Jun 12, 8:42 am, "T. Crane" <[EMAIL PROTECTED]> wrote: >> Hi, >> >> How is the default path chosen in this instance: >> >> myFile = file('test.txt','w') >

file open default location

2007-06-12 Thread T. Crane
Hi, How is the default path chosen in this instance: myFile = file('test.txt','w') Here I'm opening/creating a file but I have not specified the exact path, so how does Python determine where to 'put' this file? More to the point, how do I change what the default path is? Right now it's a ne

Re: interating over single element array

2007-06-08 Thread T. Crane
> >> any suggestions are appreciated, > > Yes, don't try iterating over objects that are not iterable. ;-) Ah, yes... I hadn't thought of that :) thanks, trevis > > What you *can* do is iterating over lists, tuples or other iterables with > just one element in them. Try ``a = [1]``. > > Ciao,

interating over single element array

2007-06-08 Thread T. Crane
Hi all, Can someone please explain to me why I can't do something like this: a = 1 for value in a: print str(value) If I run this I get the error: 'int' object is not iterable Obivously this is an absurd example that I would never do, but in my application the length of 'a' can be anythi

Re: namespace question

2007-05-18 Thread T. Crane
"Robert Kern" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > T. Crane wrote: >> Hi, >> >> If I define a class like so: >> >> class myClass: >> import numpy >> a = 1 >> b = 2 >> c = 3 >&g

namespace question

2007-05-18 Thread T. Crane
Hi, If I define a class like so: class myClass: import numpy a = 1 b = 2 c = 3 def myFun(self): print a,b,c return numpy.sin(a) I get the error that the global names a,b,c,numpy are not defined. Fairly straightforward. But if I am going to be writing seve

preferred windows text editor?

2007-05-09 Thread T. Crane
Right now I'm using Notepad++. What are other people using? trevis -- http://mail.python.org/mailman/listinfo/python-list

re-importing modules

2007-04-30 Thread T. Crane
Hi, When troubleshooting code that's saved in a text file, I often find that I want to make a change to it, re-save it, then reimport it. However, just typing import myTestCode doesn't always seem to import the newer version. Is it supposed to? I find that right now I often have to close my i