Click to See Complete Forum and Search --> : Python script examples?


RageAHolic
11-13-2000, 08:38 PM
Heh gang...I was wondering if any Python people can post/e-mail some examples of basic Python scripts. Stuff that you have written for practical, everyday use. I'm reading the tutorials from python.org and Learning Python...but I'd like some examples of real-world python scripts.

I know that indentation/white spaces are important and posting them in the BBS may mung the format...e-mail the best way?

greeeenlantern@hotmail.com

Thank you very much http://www.linuxnewbie.org/ubb/smile.gif

------------------
...your friendly neighborhood RageAHolic (http://www.angelfire.com/electronic/RageAHolic/index.html)

Rage fueled by: AMD Athlon

kmj
11-13-2000, 10:58 PM
Someday, if my glorious vision comes to fruition, you'll be able to find them at the CCAE (currently located at www.geocities.com/bfkester/ccae.html (http://www.geocities.com/bfkester/ccae.html) , check it out. It's pretty!). Til then, bug jemfinch. http://www.linuxnewbie.org/ubb/smile.gif

RageAHolic
11-13-2000, 11:07 PM
KMJ...that's a wicked site. However, the page apparently didn't finish loading but with errors on the page.

I don't know that the entire page finished loading.

I couldn't see any examples of Python...but thanks http://www.linuxnewbie.org/ubb/smile.gif That's a good resource.

Gotta getta hold of jemfinch...klamath...

------------------
...your friendly neighborhood RageAHolic (http://www.angelfire.com/electronic/RageAHolic/index.html)

Rage fueled by: AMD Athlon

JoniMitchellRockedMyWorld
11-13-2000, 11:22 PM
Here's some sourcecode for ya http://www.dabduke.com/Programs/Python_programs

Here's some performance tips http://www.musi-cal.com/~skip/python/fastpython.html

It's not sourcecode but you might find it interesting nonetheless http://www.pythonlabs.com/

kmj
11-14-2000, 12:11 AM
Originally posted by RageAHolic:
KMJ...that's a wicked site. However, the page apparently didn't finish loading but with errors on the page.

I don't know that the entire page finished loading.

I couldn't see any examples of Python...but thanks http://www.linuxnewbie.org/ubb/smile.gif That's a good resource.

Gotta getta hold of jemfinch...klamath...


Yeah, we don't have any python examples yet; I've been buggin' jemfinch for some examples, since he's recently decided to champion python. I haven't seen errors on it myself; If you have any specifics on the erros, let TheLinuxDuck know, it's his site.

RageAHolic
11-14-2000, 12:20 AM
JMRMW...thanks for the linkage bro http://www.linuxnewbie.org/ubb/smile.gif I've got myself some research to do...

kmj...I don't have any specific errors, but the page finished loading, but in the bottom left-hand corner, just above the [cringes]Windows Start button [cringes again] where it usually says done it had a warning sign saying Done with errors on page. This is in IE...don't know which version.

Winmodem... http://www.linuxnewbie.org/ubb/redface.gif

Hey, I thought that jemfinch was rabidly against OOP and that he championed Perl! What's up with the change? Python's power rears it's ugly head? http://www.linuxnewbie.org/ubb/biggrin.gif

------------------
...your friendly neighborhood RageAHolic (http://www.angelfire.com/electronic/RageAHolic/index.html)

Rage fueled by: AMD Athlon

jemfinch
11-14-2000, 12:33 AM
Damn. I spent the last day installing Windows 98 for my mother.

That is one hellish operating system.

Anyway, any python code I've written is at http://jemfinch.shacknet.nu/~jfincher/python/my/ . Most of them are either tiny scripts or unfinished projects.

If there's anything in particular that you'd like to see, just let me know, I'll be happy to whip something up.

Also note (*cough**kmj**cough*) that some things are written (though not heavily documented, since python is so easy to understand) for the CCAE.

Jeremy

kmj
11-14-2000, 09:37 AM
http://www.linuxnewbie.org/ubb/biggrin.gif

I'll probably forget and start bugging you again in a week. http://www.linuxnewbie.org/ubb/smile.gif Thanx!

RageAHolic
11-14-2000, 01:01 PM
Thanks gang http://www.linuxnewbie.org/ubb/smile.gif

jemfinch...I couldn't access your link. Is it on a home-server that isn't always online? Just wondering...I'll keep checking it to see if I can see it. Thanks.

I'm not really looking for anything in particular...I'm a programming newbie struggling through Learning Python and I'd like to see some real-world examples or see this stuff in action. Basically, I want to look at source and figure out why it does what it does. I think that that'll help me out. Thanks for the offer http://www.linuxnewbie.org/ubb/smile.gif

I think that I just need some basic working examples of python code.

Right now, I'm having a hard time with the concept of negative offsets and slicing using them. I understand slicing with positive offsets, but the negative baffle me right now.

Any insights would be very much appreciated.

Thanks again for all of your help gang...

------------------
...your friendly neighborhood RageAHolic (http://www.angelfire.com/electronic/RageAHolic/index.html)

Rage fueled by: AMD Athlon

jemfinch
11-14-2000, 04:13 PM
Oops. No one ever told me that wasn't working before http://www.linuxnewbie.org/ubb/smile.gif

Just had to add a FollowSymLinks line in my httpd.conf. It's all good now (or it should be)

Jeremy

EDIT: Oh yeah, and I gave the wrong link.
http://jemfinch.shacknet.nu/~jfincher/src/python/my/

[This message has been edited by jemfinch (edited 14 November 2000).]

YaRness
11-14-2000, 05:13 PM
that whole blocking-with-whitespace just bugs the snot outta me. yuck.

------------------
"Assembly of Japanese bicycle require great peace of mind."
Registered Linux User #188285 http://counter.li.org/
------------------

jemfinch
11-14-2000, 05:43 PM
Originally posted by YaRness:
that whole blocking-with-whitespace just bugs the snot outta me. yuck.


It only irritates you because you're afraid of it. I've programmed with braces and semicolons, and I dread the day I have to program in C or Perl again because of them.

Believe me, once you try them, you won't want to go back.

Jeremy

kmj
11-14-2000, 06:36 PM
Originally posted by jemfinch:
It only irritates you because you're afraid of it. I've programmed with braces and semicolons, and I dread the day I have to program in C or Perl again because of them.

Believe me, once you try them, you won't want to go back.

Jeremy

Yeah, at first I was a bit perturbed<sp?> about that, but a good programmer damned well better be doing that anyway.