Need help Python (school)
Register

We are the best invite forum on the internet! Here you will find free invites, free seedboxes, free bonuses, and much more. Our members know the true meaning of sharing and have created a truly global bittorent community! Our site has the most up to date information on all private trackers and our members will guide you and introduce you to this truly secretive and enlightened club. Ready to get started? Register now!


Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
  1. #1

    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    148

    Default Need help Python (school)

    Ok, I have an assignment in school, to create a simple program in Python. I want to make some kind of computer shut down timer, easy and simple?
    I am not so good in Python and pretty n00b in programming so could someone give me some tips and tricks how to make it?
    Cheers :)



  2. To remove ads become VIP. Inquire about advertising here.
  3. #2

    Join Date
    Jan 2011
    Posts
    40

    Default

    What OS are you planning on running this python code?

    If you are going to run this code on windows, the following lines would help you shut down a computer.

    import os
    #run os based command like opening notepad
    os.system("shutdown -OPTIONS")

    Once you open command prompt and type "shutdown /help" you will get a lot of options. Select the ones you want and replace the "-OPTIONS" part in the last line of the code with the options you want.

    You also mentioned that you would need a timer to shutdown the machine. Have a look at this URL (Remote Shutdown on Windows « Python recipes « ActiveState Code). It has a good python program to shutdown a system with a few options. That should be helpful to you.

  4. #3

    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    148

    Default

    thank you very much :) this should help me a lot i think :))

  5. #4

    Join Date
    Sep 2009
    Location
    Germany
    Posts
    213

    Default

    On Linux you can basically use the same code, but you will have to use other options. "shutdown -h now", would it be if you wanted to shutdown immediately.

  6. #5

    Join Date
    Jan 2011
    Posts
    40

    Default

    Quote Originally Posted by Util1ty View Post
    thank you very much :) this should help me a lot i think :))
    Hi Util1ty,

    I remember reading in one of the rules section that replying with Thanks message might be considered SPAM. Use of Thanks button at the bottom of the someone's message is a recommended way of expressing gratitude.

    Long time members, please correct me if i am wrong.

  7. #6

    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    148

    Default

    Quote Originally Posted by hermit View Post
    Hi Util1ty,

    I remember reading in one of the rules section that replying with Thanks message might be considered SPAM. Use of Thanks button at the bottom of the someone's message is a recommended way of expressing gratitude.

    Long time members, please correct me if i am wrong.
    thanks lol kidding :) Im not so good at remembering all the rules at all sites im in :S
    Gonna run the program on Windows 7, yes :)

  8. #7

    Join Date
    Nov 2010
    Location
    Its sometimes warm, it's sometimes cold. Planet earth.
    Posts
    903

    Default

    I know a little python..
    HHSSSSSSSHSSSS
    SSSSSSSS

    WAT WAT WAT WAT WAT WAT WAT WAT WAT WAT WAT WAT WAT WAT



  9. #8

    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    148

    Default

    I may come with further questions in the future :)

  10. #9

    Join Date
    Feb 2011
    Posts
    45

    Default

    Python is a great language and very easy to learn. Lots of stuff can be found on the python documentation online. If you really want to learn more I recommend the book 'Learning Python', but I can answer small questions regarding it as well.

    Best of luck with your project.

  11. #10

    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    148

    Default

    Thanks maybe check that out :)
    Program is done now very simple but it works :)
    Thanks for the help :)

Page 1 of 2 1 2 LastLast

Similar Threads

  1. i have problem upload need help
    By truong514021 in forum General Discussion
    Replies: 5
    Last Post: January 7th, 2009, 12:51 PM
  2. Need Help with New Seedbox
    By toxic420 in forum Seedbox Discussions
    Replies: 7
    Last Post: October 17th, 2008, 01:44 PM
  3. Need help with image hosting
    By SunSpyda in forum Computers
    Replies: 11
    Last Post: October 12th, 2008, 02:17 PM
  4. Need help with Underground-Gamer
    By smasher7 in forum General Discussion
    Replies: 4
    Last Post: September 5th, 2008, 06:42 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •