htmlgen latest update!

PLEASE READ THIS POST FOR THE MOST UP TO DATE NEWS ON htmlgen AS OF APRIL 26, 2011

You can access information and the latest version from htmlgen’s wiki page here:

http://wiki.sunjay.ca/Python:Contents/Htmlgen:Contents

And if you’re into shorter URLs, you can also use this one!

http://sunjay.ca/u/htmlgen-latest

Thanks!
-Sunjay03

Please post comments for any thing you want to say! =D

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • Twitter
  • Technorati
  • Live
  • LinkedIn
  • MySpace

htmlgen UPDATE: Version 2.4 release!

Hello!

Are you ready for instant, easy, super dependable HTML generation?! Well get read (continue reading…)

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • Twitter
  • Technorati
  • Live
  • LinkedIn
  • MySpace

Python htmlgen (Python 2.7/3 only!)

htmlgen: Welcome to the new world of Python HTML generation!

I give you…htmlgen! The new, completely made from scratch, easily expandable, highly hierarchy based super HTML generation system!

This very simple concept of making HTML primarily through Python objects is amazing!

Demo: (continue reading…)

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • Twitter
  • Technorati
  • Live
  • LinkedIn
  • MySpace

Python Dynamic Properties!

Hello everyone!

Have you ever wished that instead of having to have your users use annoying function names like getSelection() or setSelection(), they could just use a property that did it all for them? No more user function calling. Welcome to the future, or at least the unknown past.

Here is a demo of the built-in property function:

class Vector:
	def __init__(self, x, y, z):
		self.x = x
		self.y = y
		self.z = z

	def __repr__(self):
		return "(%.2f, %.2f, %.2f)"%(self.x, self.y, self.z)

	def get_mag(self):
		return (self.x**2+self.y**2+self.z**2)

	magnitude = property(get_mag)

vec = Vector(1,2,3)

print('vec initialized at:')
print(vec)
print('magnitude=', vec.magnitude, '\n') # == 14

vec.x = 10
print('vec.x = 10')
print(vec)
print('magnitude=', vec.magnitude, '\n') # == 113

vec.y = -5
print('vec.y = -5')
print(vec)
print('magnitude=', vec.magnitude, '\n') # == 134

See more at this AMAZING tutorial!

http://adam.gomaa.us/blog/2008/aug/11/the-python-property-builtin/

I’m glad I could share this with you, and sorry for not posting in so long.

Happy coding! :)

-Sunjay Varma

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • Twitter
  • Technorati
  • Live
  • LinkedIn
  • MySpace

BEWARE: Gridding and Packing! Never mix sweet and salty together.

Watch out!
I made this simple mistake in one of my Tkinter apps and for the longest time, I was stumpped about what the problem could be! Also, because this was a commercial project, I couldn’t even post the source code for someone else to figure out!

Signs that say that you are gridding and packing at the same time:

  1. Only the console shows up, and it seems like it is loading forever!
  2. When something shows up, it gives you a silly error that couldn’t be possible
  3. After you pack some thing new (or grid) the program suddenly stops working.

If you experience any of these troubles, go back and check! See if you might have accidentally mixed things up.

Happy Programming!

-Sunjay Varma

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • Twitter
  • Technorati
  • Live
  • LinkedIn
  • MySpace

  • Login:




    Forgot?
    Register
  • Poll:

    What type of tutorials would you like next?

    • More BGE (Blender Game Engine) (50%, 3 Votes)
    • Advanced (17%, 1 Votes)
    • Blender 3D (17%, 1 Votes)
    • Python (17%, 1 Votes)
    • Simple (0%, 0 Votes)

    Total Voters: 6

    Loading ... Loading ...
  • Categories:

  • Date:

    February 2012
    S M T W T F S
    « Apr    
     1234
    567891011
    12131415161718
    19202122232425
    26272829  
  • Copyright © 1996-2010 blog.sunjay-varma.com. All rights reserved.
    Jarrah theme by Templates Next | Powered by WordPress

    Switch to our mobile site