Sinisterly
problem with my code - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Python (https://sinister.li/Forum-Python)
+--- Thread: problem with my code (/Thread-problem-with-my-code)



problem with my code - samo_mybb_import15280 - 03-03-2014

Hi all.
can any one tell me if something false with my code.
Because i dont know why it dosn't work.

Code:
from os import system def code(): while True: time.sleep(60) fp = file('folder/filename.txt', 'r') p = fp.read() fp.close() if p == str(1): try: system("python2.7 folder/filename.py") except KeyboardInterrupt: print 'Exiting...' cnx.RegisterDisconnectHandler(code)



RE: problem with my code - Ligeti - 03-03-2014

you are reading a file, and checking if it has "1", if yes you run a script that has the same name and path... your code is ... idk

OK, could you please tell us what exactly are you trying to do here? What should it do exactly? and is there error messages? You should provide more information so we can help you ... I guess


Happy debugging!


RE: problem with my code - pixle_ - 03-06-2014

Man i swear, i feel like there is an indentation problem here, something is not aligning here with me. What was the error?

When you ask for coding help, providing us with the error is trivial in solving your problem.

pixle_


RE: problem with my code - Ligeti - 03-06-2014

(03-06-2014, 01:24 AM)pixle_ Wrote: When you ask for coding help, providing us with the error is trivial in solving your problem.

I think this thread is dead... I asked her/him for more information a while ago... and nothing!


RE: problem with my code - pixle_ - 03-06-2014

(03-06-2014, 01:45 AM)Ligeti Wrote:
(03-06-2014, 01:24 AM)pixle_ Wrote: When you ask for coding help, providing us with the error is trivial in solving your problem.

I think this thread is dead... I asked her/him for more information a while ago... and nothing!

Awh man, my bad, i dont mean to grave digg..


RE: problem with my code - Ligeti - 03-06-2014

(03-06-2014, 01:58 AM)pixle_ Wrote: Awh man, my bad, i dont mean to grave digg..

lol, I didn't mean that!

I really hate it when people ask for help then they simply turn their back and walk away!

Smile


RE: problem with my code - Deque - 03-06-2014

(03-06-2014, 02:03 AM)Ligeti Wrote:
(03-06-2014, 01:58 AM)pixle_ Wrote: Awh man, my bad, i dont mean to grave digg..

lol, I didn't mean that!

I really hate it when people ask for help then they simply turn their back and walk away!

Smile

That's probably because they cross post the question in other forums too.
But yeah, it sucks.