#1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2003
    Location
    Canada
    Posts
    543
    Rep Power
    24

    Writing simple examples


    http://www.python.org/doc/current/lib/genindex.html

    The above link takes you to the index of everything Python. I'm wanting to start a project. This project involves me writing very simple examples for each thing you see there (I know, there is an awful lot!)

    EDIT: I already know that some of them already have examples. If needed, I could always make a new example. I doubt that I will need to make many new ones for the ones that already have one.

    This way, I can learn how to use the stuff myself. Also, I can use it as a handy guide if I forget something I haven't used in a while.

    Feel free to offer your own examples. If you do send me example(s), please include your first and last (surname) name and your e-mail address (if you want people to contact you) This way, I can add you to the contributors list.

    You will be able to view my progress when ever you would like. Just go to my Apache server, go to 'projects', go to 'Python', and you will be at the index page.

    Once I am done, I will be putting the work under the GNU Free Documentation License.

    You can read about the GNU Free Documentation License here

    The GNU Free Documentation License is a form of copyleft intended for use on a manual, textbook or other document to assure everyone the effective freedom to copy and redistribute it, with or without modifications, either commercially or noncommercially.
    Last edited by MasterChief; January 30th, 2004 at 05:47 PM.
  2. #2
  3. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Mmmmm, i'm not usually the one too shoot down project ideas but i have to say thats a little ambitious Chief...

    You’re telling me you want to write an example for each and every statements, factions, classes and methods in Python.

    This really isn't something you can do on you're own mate; Pythons docs as they are today are the product of many many people working over many many years...

    Although i think you'd be very interested in the doc-sig group:

    http://www.python.org/sigs/doc-sig/

    Anyway enough of this realism crap, if you're serious about the project then as always i'll help any way i can!

    Mark.
    programming language development: www.netytan.com – Hula

  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2003
    Location
    Canada
    Posts
    543
    Rep Power
    24
    I think I'm just an over-ambitious person.

    I'm still going to work on writing examples for everything found on that index page. I know I'm not going to finish it in a day or two.

    I have a lot of free time. I'm sure they don't.

    netytan, thanks for your help. I will ask for help when I don't understand something, and after I've searched it to death. I don't want to come to you each time I find something that's new to me.

    Anyone can help! This isn't just helping me, this is helping the whole Python community!
  6. #4
  7. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    There's no such thing. Can do anything you put you're mind to! You should set up a web app on you're server so everyone can add there examples to it

    Mark.
    programming language development: www.netytan.com – Hula

  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2003
    Location
    Canada
    Posts
    543
    Rep Power
    24
    That's a cool ( ) idea. Only, I don't know how to accomplish this task. Mind giving me a push in the right direction?
  10. #6
  11. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Yeah no problem. You're gonna need a db, probably MySQL... you then write a program to exctract the names from the index page and insert them into the db. Then with a display page you can retrieve the examples for each and update them with a form.

    You might also wana back this up now and again incase somone desides to attack it.

    Mark.
    programming language development: www.netytan.com – Hula

  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    133
    Rep Power
    12
    MasterChief, are you aware that you want to write more than 12500 examples by yourself?

    Say that you take 10 minutes to write each example, on average. That means you work 8 days and nights, 16 hours and 28 minutes doing nothing else to complete your task. If you work, say, 20 minutes a day, the task will take you 1 year, 260 days and eight minutes.

    It's pretty daunting, wouldn't you agree?
  14. #8
  15. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Originally posted by MasterChief
    Anyone can help! This isn't just helping me, this is helping the whole Python community!
    I think he's counting on a little help from other people perc... now if this was perl he'd have no chance but the Python community's pretty friendly in general

    But yeah i agree, it is a huge undertaking! and on his own.. i'm very proud

    Mark.
    Last edited by netytan; January 31st, 2004 at 01:03 PM.
    programming language development: www.netytan.com – Hula

  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2003
    Location
    Canada
    Posts
    543
    Rep Power
    24
    Wow. This is a lot of work. But boy is it worth it! I'm gaining a lot of knowledge out of this. I'm making a subjects list right now.

    Then, I will be adding all of the files to the pages. Then, I'll have a working program so that people can help submit descriptions, examples, corrections, updates, etc.

    I'll help you out with understanding the subjects.

    specialattrs #### __dict__ (object attribute)

    will be the example.

    First, I take the URL of the file found on the Python index, page.

    The URL for my example is:
    http://www.python.org/doc/current/li...s.html#l2h-266

    I get rid of the http:// to the /lib/. Then the .html to the end.

    This leaves me with:
    specialattrs

    I then just copy the thing found there. This is:
    __dict__ (object attribute)

    This leaves me with:
    specialattrs #### __dict__ (object attribute)

    The four number signs are there to seperate the two.

    You can check my progress here:
    http://24.125.59.73/projects/Python/

    You can also go there by going to the main Apache Web server (the link is in my signature at all times)

    http://24.125.59.73/

    Then going to 'projects'

    Then going to 'Python'

    I will tell you when I finish doing what I need to do before me and others can write stuff.

    Have a great day!
  18. #10
  19. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Looking good chief!

    One, small thing though, you should definatly go for more of a web application approch with a batadase, not only does this make things faster but also cuts down trafic on Python.org and allows you to easily add new features like search, members, backups etc.

    I'd also use a table to seperate the two aswell i dont know but #### doesnt look very pythonic

    Take care,

    Mark.
    programming language development: www.netytan.com – Hula

  20. #11
  21. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2003
    Location
    Canada
    Posts
    543
    Rep Power
    24
    Off topic: I see you updated your avatar.


    On topic: I'm not very good at all with databases. I have login/register/logout scripts. You guys can register right now.

    If you want to write the database stuff, that would be cool. I was going to use all of the files at python.org and update the files when ever I get an example, or whatever. That actually does seem like a lot of work. You never know, a lot of people might be interested in helping. There would be too much for me to do.

    I would have used tables to seperate the two, but they are used to easily copy and paste. Those are the subjects I want people to use for when they send something in.
  22. #12
  23. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Yeah drew it the other day, what ya think?

    Anyway i'd be happy to help design the web application, but i think that would require more direct communication than this .

    You're welcome to add me to MSN messenger, Yahoo or IRC. Email me for the handles if you need them. Just signing up now .

    I take it you're storing usernames/passwords in a file then?

    Mark.
    programming language development: www.netytan.com – Hula

  24. #13
  25. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2003
    Location
    Canada
    Posts
    543
    Rep Power
    24
    I like the new avatar.

    Nope, I'm storing the user names, passwords, etc. in a database.

    Talking on IRC would be the best way to communicate.

    I'll PM you with my IRC name.
  26. #14
  27. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2003
    Location
    Canada
    Posts
    543
    Rep Power
    24
    This project is in a very simple state.

    View this page: http://24.125.59.73/projects/Python/
  28. #15
  29. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2003
    Location
    Canada
    Posts
    543
    Rep Power
    24
    I know a lot of you don't really like this project, but one of the forum members (I don't want to mention the member's name. Just in case they wouldn't like to be mentioned. You know who you are, though. You sent me an E-mail.) gave a wonderful suggestion.

    Take the complicated things, easily misunderstood, commonly used in the wrong way, hard to explain, not very well-written examples available, etc., and work on those as a team.

    Maybe some of you are misunderstanding what I'm asking. Just throwing in a simple example for a print statement would help out.

    Project (home): http://24.125.59.73/projects/python/

IMN logo majestic logo threadwatch logo seochat tools logo