Showing posts from 2022

how to save image in database using python

You are working with python and writing code for web programs, here is a solution how to upload image using python, how to save image in database using python   import mysql . connector def convertToBinaryData ( filename ) : # Convert digital …

form validation using python

web form validation is quit easy in python create an html file. <!DOCTYPE html>   <html lang= "en" >   <head>       <meta charset= "UTF-8" >       <title>Index page</title>   </head>   <…

How to define a function in python

Defining a function in python is quit easy as c, c++, c#. Here is the code how to define function in python. def  my_function(fname, lname):    print (fname +  " "  + lname) my_function( "webhealer" ,  "Refsnes" )

How to use For in python

Like c, c#, c++ for loop sytax is very simple in python, see the below code how to use python. name = [ "web" ,  "healer " ,  "blog" ] for   x  in  name:    print (x)

how to print a page using python

printing current page using python is quit easy. we can use following code to do so. def PrintOnePage ( self , cp , pageNumber ): """ Print the current page on the given device context. Return true if there …

how to read, write and print a file using python

as many other interpreted languages, python has a verity of builtin functions to perform different tasks. here are some ways to write, read and print a file using python. # Program to show various ways to read and write data in a text file. file1 = …

Load More
That is All