0

>>> import g4
>>> g4.systs()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'systs'

Why is that ?
The code works ok from shell
>>> import time
>>> def systs(): return str(time.localtime()[5])
>>> systs()
'18'
g4.py
-------

import os
import sys
import time 
def systs(): return str(time.localtime()[5])
2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by JosDuchIt
0

Write the script to file and save it in same directory as g4. Run the file and it works by double clicking in file manager (add line input('Ready') to see output from program) or F5 in IDLE, but it is only for simple testing.

Edited by pyTony: n/a

0

Sorry, solved
The above works OK

I just was editing the wrong .py file

0

Write the script to file and save it in same directory as g4. Run the file and it works by double clicking in file manager (add line input('Ready') to see output from program) or F5 in IDLE, but it is only for simple testing.

Thanks for the suggestion, but IDLE is not working yet for me under AOS.

This question has already been answered. Start a new discussion instead.
Be sure to adhere to our posting rules.