I think the problem is that people aren't really sure what you need/want/expect.

your code is not spectacular either - you have ignored most of the decent features of python - like functions, classes etc.

For a start - those long chains of if/elses - there has to be a better way of coding that - i would go with a list (storing the limit and text), and a tight loop which compares the value to the limit.

if you want to do a regular check for your internet connection - you need something like a timer that fires regularly - and tries to fetch the data.

simeon87

May 20th, 2011, 09:16 PM

You haven't gotten a response so far so consider it from our perspective: why would someone finish your weather indicator, if we could work on our own programming projects?

Why don't you just post the specific things you're having difficulty with and we can help you with that?

juancarlospaco

May 20th, 2011, 09:38 PM

the problem is that people aren't really sure what you need/want/expect.

The missing part is a Loop to refresh the info if Internet connection is available

your code is not spectacular either - you have ignored most of the decent features of python - like functions, classes etc.

as well any improvement are welcome too, as i said its not finished.

For a start - those long chains of if/elses - there has to be a better way of coding that - i would go with a list (storing the limit and text),

I try, but it didnt work.

juancarlospaco

May 20th, 2011, 09:47 PM

why would someone finish your weather indicator, if we could work on our own programming projects?

why would someone post on this forum, if we could work on our own forum?

Why don't you just post the specific things you're having difficulty with and we can help you with that?

I do that on the Past, and people reply :
Why don't you just post the code and we can help you with that? :(

cgroza

May 20th, 2011, 09:51 PM

why would someone post on this forum, if we could work on our own forum?

I do that on the Past, and people reply :
Why don't you just post the code and we can help you with that?

You analogy does not apply, posting on a forum is not working on a forum. You could work on your own forum if that gives the solution to your problem.

You can't expect people to implement a whole feature for you. We help with specific clear problems, like design difficulties, ways to do things, how and with what.

juancarlospaco

May 20th, 2011, 09:54 PM

I think that this is Programming Talk where people Talk about Programming,
to help and share, just for the idea of help and share itself, because they can.

juancarlospaco

May 20th, 2011, 09:59 PM

You analogy does not apply

I dont say that my analogy apply.

You can't expect people to implement a whole feature for you.

ok, 1 loop is too much whole feature, thank you very much.

juancarlospaco

May 20th, 2011, 10:01 PM

Thanks to all people participating here.
ʘ‿ʘ

cgroza

May 20th, 2011, 10:15 PM

I dont say that my analogy apply.

ok, 1 loop is too much whole feature, thank you very much.
You got the idea, a loop, put it in thread which has a timer and what you need in it.

juancarlospaco

May 20th, 2011, 10:24 PM

You got the idea, a loop,

No.
Just someone tell me thats what i need to do.
I just copied the script into /etc/cron.hourly/ and keep looking for help somewhere.

Tony Flury

May 21st, 2011, 06:07 AM

You have now 3 methods of implementing your internet check. why not actually try one ?

Also - when you said you tried a list and it did not work (as an alternative to your if/else chains), do you have an example of the code you tried - i can assure you that the technique does work.

Although none of us has corrected your code, or finished your application, if you read what people has written - we are trying to help you by helping you learn and improve. You would not learn much if someone just handed you a re-written program.

simeon87

May 21st, 2011, 12:05 PM

I do that on the Past, and people reply :
Why don't you just post the code and we can help you with that? :(

Well, yes, because we need to see code to see what's going wrong. If someone posts that something is wrong with their code and that "it's showing the wrong numbers!!" then we really have to see the code.

ok, 1 loop is too much whole feature, thank you very much.

Then why ask others to implement it? Although the forum rules say that we don't do homework for students, the same reasoning applies here: if you want to learn how to do it, then try it yourself first and if it's still not working then ask for help.

juancarlospaco

May 21st, 2011, 03:45 PM

You have now 3 methods of implementing your internet check

i didnt know that

Also - when you said you tried a list and it did not work (as an alternative to your if/else chains)

Yes

do you have an example of the code you tried

No
I have to erase the lines to get my program back to work.

On the past i posted some code with lots of commented out non-working lines,
and people say thats too dirty and hard to read, so i try to erase all unnecessary lines :(

i can assure you that the technique does work.

No

You would not learn much if someone just handed you a re-written program.

Yes

juancarlospaco

May 21st, 2011, 03:58 PM

"it's showing the wrong numbers!!"

"it's not Updating the Info!!"

Then why ask others to implement it?

Because i can, because this is the place to share programming help i think.

Although the forum rules say that we don't do homework for students

I didnt say thats homework, im 27
still not working then im asking for help.

Tony Flury

May 21st, 2011, 04:00 PM

I can assure you it took me 3 minutes to write a python list that works the way your if/else chain works.

And if you read through the replies you will see three different options for getting internet updates.

A timer,
A 2nd Thread with a loop
A regular update that runs as a cron job

any of those three would work - although some would be more complex.

Anyway - I have contributed all I can to this - good luck.

simeon87

May 21st, 2011, 04:18 PM

Because i can, because this is the place to share programming help i think.

Exactly, it's about helping others with programming, not doing programming work for others.

I didnt say thats homework, im 27
still not working then im asking for help.

I didn't say it was homework but it's the same attitude of a student who expects others to do it for him. People won't do work for you but we can help with your own efforts. If you try any of the mentioned approaches, such as timers or threads, and it doesn't work then we can help out with where it goes wrong.

juancarlospaco

May 21st, 2011, 04:32 PM

/solved

Lots of words no one post an example of loop or checking internet or something.