Skip to main content

Posts

Showing posts with the label Jython/Python

The os module in python

This module represents generic  o perating  s ystem functionality. This module is especially important if you want to make your programs platform-independent i.e. it allows the program to be written such that it will run on Linux as well as Windows without any problems and without requiring changes. An example of this is using the  os.sep  variable instead of the operation system-specific path separator. Some of the more useful parts of the  os  module are listed below Most of them are self-explanatory. The  os.name  string specifies which platform you are using, such as  'nt'  for Windows and  'posix'  for Linux/Unix users. The  os.getcwd()  function gets the current working directory i.e. the path of the directory from which the curent Python script is working. The  os.getenv()  and  os.putenv()  functions are used to get and set environment variables respectively. The  os.listdir()  function returns the name of all files and directories in the specified di

Most Usable Python Module.

50 awesome modules for Pytho Graphical interface wxPython http://wxpython.org Graphical interface pyGtk http://www.pygtk.org Graphical interface pyQT http://www.riverbankcomputing.co.uk/pyqt/ Graphical interface Pmw http://pmw.sourceforge.net/ Graphical interface Tkinter 3000 http://effbot.org/zone/wck.htm Graphical interface Tix http://tix.sourceforge.net/ Database MySQLdb http://sourceforge.net/projects/mysql-python Database PyGreSQL http://www.pygresql.org/ Database Gadfly http://gadfly.sourceforge.net/ Database SQLAlchemy http://www.sqlalchemy.org/ Database psycopg http://www.initd.org/pub/software/psycopg/ Database kinterbasdb http://kinterbasdb.sourceforge.net/ Database cx_Oracle http://www.cxtools.net/default.aspx?nav=downloads Database pySQLite http://initd.org/tracker/pysqlite MSN Messenger msnlib http://auriga.wearlab.de/~alb/msnlib/ MSN Messenger pymsn http://telepathy.freedesktop.org/wiki/Pymsn MSN Messenger msnp http://msnp.sourceforge.net/ Net

List OF GUI toolkit For Python

Most Popular GUI Tool kit: Tkinter = Uses the Tk platform. Readily available. Semistandard. wxPython = Based on wxWindows. Increasingly popular. PythonWin = Windows only. Uses native Windows GUI capabilities. Java Swing = Jython only. Uses native Java GUI capabilities. PyGTK = Uses the GTK platform. Especially popular on Linux. PyQt = Uses the Qt platform. Especially popular on Linux. You can also find some other toolkit 

How to Connect Jython And Mysql .?

def mysql_connect(self):         from java.sql import DriverManager         mysqlLog_server="localhost"         mysqlLog_database="mysql"         mysqlLog_username="root"         mysqlLog_password=""         url = "jdbc:mysql://" \                + mysqlLog_server + "/" \                + mysqlLog_database + "?user=" \                + mysqlLog_username + "&password=" \                + mysqlLog_password         conn = DriverManager.getConnection(url)         return conn def mysql_select(conn):         stmt = conn.createStatement()         rs = stmt.executeQuery("SELECT * FROM db")         rs.next();         return rs.getString(4);     conn=mysql_connect("__self__") rs=mysql_select(conn) print rs you can change this code according to your self...