Find the answer to your Linux question:
Results 1 to 1 of 1
I've been battling this for a few days and it's created a lot of interest. As a result, I've been going through "Learn Python the Hard Way". It's not the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2009
    Posts
    39

    Any help with .py script is appreciated!


    I've been battling this for a few days and it's created a lot of interest. As a result, I've been going through "Learn Python the Hard Way". It's not the hard way and is the best programming instruction I've reviewed. It all started due to this problem... scripting. I can usually edit enough times to eventually get something to work but I am stumped here.

    It seems support on this project is closed so hopefully, someone will be able to help...

    I've attached a picture and my script to go with my problem below. I loaded "Screenlets" and was disappointed it wouldn't hold any of my InfoPanel settings so I decided I would edit the .py file to get it to do what I wanted. That way, when the program loaded, it would load from my script. After many edits, booting up, trial and error, I finally got it the way I wanted it... with a few small problems...

    In the picture, notice there are no green bars for "/" and "/Storage" but there are for "/home".

    -How can I get the bars to show up?

    -How can I get "/home to change to /home/USER (but just say home on the panel) so when I click on the applet, it takes me to the /home/USER folder and not the /home folder?

    -Network is always at 100%. Sometimes, the bar is green and sometimes there is nothing. Is this a bug or some bad code?

    -I've noticed some changes don't write to the .py file under /usr/share/Screenlets/screenlets-pack-all/InfoPanel. I can make changes (with GUI) to font color, save it, open to edit and nothing is changed. Upon rebooting, everything went back to default, hence me editing the .py file so the program reads from it... I've edited the color in the .py file under what I thought was CMYK color code to no avail. I edited the .py file with several random numbers like 1.0, 2.5, .3, 1.2 and varied it several times. Why does the font color not seem to write to the .py file? It doesn't change. Is it saving this information somewhere else? If you look at my screen, the text is yellow and after many edits and opening, changing, and saving in the GUI, it finally started with the right color. The color in the script for font color is the same as if I changed it to something completely different...

    -This window WILL NOT lock. It says it is but upon reboot, it doesn't stay. It used to stay in the middle of the screen no matter what but after changing and rebooting several times, it's as if it learned the window position and now goes there (but still doesn't lock).

    -Can I change BAT0 to display BATTERY and wlan0 to display NETWORK?

    This has fascinated me for hours over the weekend and have tried and tried and googled many times. If you would look at the picture I've posted and the script printout below, I'd greatly appreciate it! Any advice is helpful!

    Screenshot from 2012-11-21 10:22:23.jpg

    Script is as follows:

    (It won't post because of URL references, so it's attached as .zip)
    Attached Images Attached Images
    Attached Files Attached Files

Posting Permissions

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