On 22/03/12 19:59, ken brockman wrote:
PS maybe time to find a new hobby. I hear that knitting is very relaxing
and no heavy mental lifting.
Nah, I tried that once. programming is much easier! :-)
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
> python fibo.py
> the code in the module will be executed, just as if you imported it, but
> with the __name__ set to "__main__". That means that by adding this code at
> the end of your module:
>
> if __name__ == "__main__":
> import sys
> fib(int(sys.argv[1]))
> you can make the file u
Alan, no need to respond to that last missive of mine. I no sooner had hit the
send key and reopened the apps in question then the answer hit me like a small
mallet in the back of my head. Obviously, what makes the additional code at
the bottom of the secon
On 22/03/12 09:57, ken brockman wrote:
>> PS Another odd bit, was on the python docs page. It had said that using
>> import File_name, without the .py would import it, but not run it. Seems
>> a glaring oversight not to have mentioned, what would have made it
On 22/03/12 09:57, ken brockman wrote:
PS Another odd bit, was on the python docs page. It had said that using
import File_name, without the .py would import it, but not run it. Seems
a glaring oversight not to have mentioned, what would have made it run.
Actually it does run it when you impor
M
On 22/03/12 03:47, ken brockman wrote:
>> None of which had gotten the Qt window to open.
>> Yet when I run it directly, on it's own, it open's
>> and the Qt window is displayed.
>My guess is that there is an if __name__... clause
>at the bottom with some code that doesn't get
>executed when yo
On 22/03/12 03:47, ken brockman wrote:
None of which had gotten the Qt window to open.
> Yet when I run it directly, on it's own, it open's
> and the Qt window is displayed.
My guess is that there is an if __name__... clause
at the bottom with some code that doesn't get
executed when you impor
Evening all;
I am trying to import a Python QT file, that had been generated from a ui file
into another python app.
I have imported it, without generating an error, but the Qt window isn't
opening. I have spent the afternoon googling the issue, have found numerous
articles, but none that have