?

Log in

No account? Create an account
Littlescripts
 
[Most Recent Entries] [Calendar View] [Friends]

Below are the 7 most recent journal entries recorded in littlescripts' LiveJournal:

Thursday, August 19th, 2004
4:14 pm
[toomanywhispers]
Hi. Been doing 8 thousand things lately, none of them coding. I've a couple of ideas in my head so I may put them down here. New posts soon.
Friday, March 26th, 2004
8:45 am
[sfubc]
Python Hates Me
Hello :) My name is Monika and I *thought/hoped* that I could be a "computer geek", but I am failing miserably. I am taking a course on web programming and we just started python and already I am totally lost. I have a project due on April 4th and an exercise due tonight and I need some serious help. Here is the problem:

Yes, I know. Don't laugh.Collapse )

Current Mood: drained
Friday, March 12th, 2004
4:10 pm
[toomanywhispers]
A question for my fellow coders/webheads. Whats your development environment like? Not the program, the overal "Area" physicaly and electronicly.

For web development at the moment I'm using Vim and the Linux Galeon browser, clicking back and forth between the two.

10 Tinker, minimize, refresh, restore, tinker
20 GOTO 10

I'm on a 17 inch CRT. I'd like to use double monitors, when my finances get better I plan on cobbling together a little system, maybe 450mz with 128 megs ram, I could probably even get away with 64, Linux is EXTREMELY ram friendly. Pop 3 4meg pci video cards in it and go to town.

I have more monitors sitting around at the moment than I do systems or video cards. I have a good 17 inch that I'm on now, a good 15 inch, an okay 15 inch, and a little fish bowl 13 inch. I figure keep the 17 inch on my main machine, then use the rest on the code box. Maybe in the future get a 17 inch LCD and use that (My eyes are baaaad)
So I'd have a 15" crt on the left, 17 inch LCD in the middle, 15"crt on the right, and maybe the 13" sitting somewhere for AIM and such.
Tuesday, January 27th, 2004
2:38 am
[toomanywhispers]
A program to figure sales tax.
I took the groundwork I laid for my converter program and used it to write a program for calculating sales tax. Very little of the converter code survived the rewriting I did to incoporate grid managing of the different widgets. It looks a heck of alot more polished than Converter because of the grid managing.

SalesTaxCollapse )

What gave me migranes was getting the button to work after adding the grid code.
I was lumping things together like this

"b1 = Button(root,text="Calculate sales tax",command=but1).grid(row=3,columnspan=3)"

Instead of using two lines like this,

"b1 = Button(root,text="Calculate sales tax",command=but1)
b1.grid(row=3,columnspan=3)"


To modify this scipt for your own state sales tax, just change "a2 = a*.08" (Line 11) to whatever the rate for sales tax is in your area. New Yorks is 8%, so the mulitplyer is .08
Saturday, January 24th, 2004
10:30 am
[toomanywhispers]
Hello! Sorry it's been a while since the last update, I've been looking for work. Here's the latest version of the converter, with Celc.->Fare. converting, Fare.->Celc. converting, and the Tkinter GUI implemented.

ConverterCollapse )

As usual, the periods represent spacing.

A look at the code:

"
def but1():
....a = ((v.get()*9)/5)+32
....w.delete(1.0,END)
....print w.insert(INSERT,a)
"

Is the conversion function,
"b1.configure(command=but1)" makes the gui button for converting to celsius activate the function.
"a = ((v.get()*9)/5)+32" Makes the variable "a" equal the entry in the entry box
"e = Entry(win,textvariable=v)" converted to celcius. (Multiplying it by nine, then dividing it by 5, then adding 32.)

"w.delete(1.0,END)" Clears the text box before "print w.insert(INSERT,a)" prints the converted temperature "a" to the text box. This is so the program can be used multiple times without having to restart it each time.


Todo:
Arrange the GUI components so they're not just thrown into the frame.
Make the buttons equal length.
Shrink the entry and text boxes.
Make the gui more presentable.



Edit: Fixed the lj-cut. Fixed some spelling errors.
Sunday, January 4th, 2004
2:59 pm
[toomanywhispers]
IntVar, I love you.

After banging my head on the desk trying to get the gui for my celcius conversion program to run I
finaly found IntVar, which is a variable for an interger pulled from an input box. I was using StringVar to hold the input from the programs input box, then using Int() to convert it to an interger, which was an unneeded step. So I simplified the program a bit and learned some too.
Wednesday, December 31st, 2003
12:00 am
[toomanywhispers]
Hello! I'm Jason, the creator and mod of this community. To kick things off I'm going to offer a bit of my code. It's a Celcius to farenheit converter, Yeah I know it's not groundbreaking or anything but I have a friend in Canada and it's reduced the level of confusion in our IM conversations considerably.

(Note: Lj fouls up the whitespace so the periods are placeholders for spaces)

Celcius.pyCollapse )


Future plans:

Make the conversion go either way (Cel.-->Far. and Far.-->Cel.)
Build a Tkinter gui.
Make it less finiky.




Edit: Lj messes up the whitespace formatting so I changed things around abit.
Python   About LiveJournal.com