#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    36
    Rep Power
    11

    Question, new here..


    Lets say i have this..

    x = int(form["start"].value)
    y = int(form["end"].value)
    z = 0
    while ((x+z) <= y):
    print (x+z), '&amp#' + str(x+z) + ';', unichr(x+z) + unicodedata.name(unichr(x+z))
    z = z + 1

    and i want to put (x+z), '&amp#' + str(x+z) + ';', unichr(x+z) + unicodedata.name(unichr(x+z)) in a table in html, how would i do that?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    36
    Rep Power
    11
    Maybe i should make it more clear..
    1. Create the query page that asks the user for the range they want to view.
    2.Create a web script that just outputs the two numbers the user entered, like "945 949".
    3. Modify the web script so it counts from the first to last number they entered. That is, create a loop and just output the numbers, like "945 946 947 948 949."
    4. Modify the web script so it outputs the first column of the table. Add in the second and third columns. Check to make sure the output is valid.
    5. Experiment with the unicodedata module in the Python interpreter. Make sure you can manually convert a number to the Unicode character description, as described above. (Your computer may or may not be able to display the actual Unicode character if you try the unichr function. You might see something like \u20ac instead. As long as the function doesn't give an error, it should be fine.)
    6. Add the character name output to your program and test it with a range like 945949 or 3297 where all of the characters are defined.
    7.Add the checking for undefined characters and limit the output to 200 rows.

IMN logo majestic logo threadwatch logo seochat tools logo