SQLite database management tool

SQLite is the primary database of python. SQLite is a simple and easy to use database. We can also easy to manage SQLite database by using SQLite Studio, which is a freeware and you can download from https://sqlitestudio.pl/index.rvt?act=download.

SQLiteStudio is a SQLite database manager with the following features:

=&0=& – no need to install or uninstall. Just download, unpack and run. =&1=&, =&2=&, yet =&3=& and =&4=&, All =&5=& and =&6=& features wrapped within =&7=&, =&8=& – runs on Windows 9x/2k/XP/2003/Vista/7, Linux, MacOS X and should work on other Unixes (not tested yet). =&9=& to various formats (SQL statements, CSV, HTML, XML, PDF, JSON), =&10=& data from various formats (CSV, custom text files [regular expressions]), Numerous small additions, like =&11=&, =&12=& executed in editor windows, on-the-fly syntax checking, and more, =&13=&, =&14=& (interface can look native for Windows 9x/XP, KDE, GTK, Mac OS X, or draw widgets to fit for other environments, WindowMaker, etc), =&15=& colors, fonts and shortcuts. =&16=&

Refresh to display a web page using Python

Python Program Example 1.

If you’re going to need a refresh on the same tab, you’ll need selenium webdriver. After installing selenium using pip, you can use the following code:

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
driver = webdriver.Firefox()
driver.get("http://www.python.org")
while True:
   time.sleep(10)
   driver.refresh()

If you are browsing a static page, you can pass a parameter in it and run, for example passing "pycon" to search as below script:

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Firefox()
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()

read more

Reference Info/Link for Python's Django Development

A great document for more complex installations—those that host multiple Django Web sites (projects) using only one instance of Apache—can be found at –>
http://forum.webfaction.com/ -> search for ‘Django’

You can find out more about some of the possible Web server arrangements at –>
http://code.djangoproject.com/wiki/ServerArrangements.

More about Django and database installation at –>
http://docs.djangoproject.com/en/dev/topics/install/#database-installation.

read more

How to setup python 2.7 and 3.5 under same computer

Introduction

Conda treats Python the same as any other package, so it’s very easy to manage and update multiple python installations under one computer. For instance, if you want to install different version of python in the same window env but without wipe out the current version of python, you can create and activate a new virtual environment with specific name and install your required version of Python as follows instruction.

Install Python 3.5 under Python 2.7

1. install new python with command:       $ conda create -n py35 python=3.5 anaconda
2. activate the new setup python with command:    $ activate py35
3. deactivate with command: $ deactivate

read more

Installation of an Open Source Prometeo-ERP System

Introduction

Although Prometeo-ERP System was a phase-out project for any further development, its follow-up project was Django-ERP. However, Django-ERP is still under development, Its function is not ready, and most features are not ready for public use at this moment. Then, I step back to continue to test Prometeo-ERP System. Prometeo-ERP has already provide many useful features, its public release free version had the following features:

  • Authentication & row-level permission system
  • Notification system
  • Custom widgets & dashboards
  • Taxonomy system
  • File browsing
  • Event calendar
  • User tasks & timesheets
  • CRM (Customer Relationship Management)
  • Products management
  • Stock management
  • Human resources management
  • Sales management
  • Project management
  • Knowledge management
  • DMS (Document Management System)

I installed the Prometeo-ERP system to my Raspberry Pi machine, i.e. free OS, free program tools, free application tools, … Great. It is still worth to study it, and I will show the installation installation in the following

read more

Setup Raspberry pi Car camera with Android phone WiFi

Introduction

Raspberry Pi can be widely used for Car computer with many features, such as plays DVDs, GPS, displays TV, Bluetooth (phone calls + music), MP3/MPEG4 player, CD/radio, car camera, reversing camera (comes on automatically when I put the car in reverse gear), etc. This week, I test raspberry pi to connect to android phone’s wireless hotpot, and setup camera and display feature as below. It is interesting.

Connect Raspberry Pi to an Android phone’s camera

Step 1. Install Pi Camera Application in Android Phone, which you can find many from Google Play Store as below screen:

read more

Setup Django WorkFlow Application

Introduction

Recently, I studied how to setup a work flow program using python django. Believe me, Python Diango can provide you a high quality work flow web application. Let’s say I would like a simple workflow application as below diagram. I will show you how to setup the application as below instruction, and I will also show you the screen dump examples of running the application.

Step 1. Prerequisition

This Work Flow Program requires Python 3.3 or greater, and django 1.6 or 1.7. I recommend you to setup under virtual environment. Setup the following python plug-in by running the following command:

read more

Prometeo-ERP System (An Open Source ERP System)

Introduction

Recently, I found a open source ERP application project which was developed by python and django framework. Prometeo is absolutely an open-source and free of charge. It is very user friendly and user-oriented, too.

Installation

1. Checkout sources from the GIT repository:

git clone https://emanuele.bertoldi@code.google.com/p/prometeo-erp/ prometeo

http://code.google.com/p/prometeo-erp

https://code.google.com/archive/p/prometeo-erp/

https://code.google.com/archive/p/prometeo-erp/source/default/source

2. Follow the instructions in the README file from the download.

read more

Steps to Install Django-cms in Raspberry Pi

Introduction

django CMS is a modern web publishing platform built with Django, the web application framework “for perfectionists with deadlines”. Django CMS offers out-of-the-box support for the common features you’d expect from a CMS, but can also be easily customised and extended by developers to create a site that is tailored to their precise needs. The following will show you how step by step of Django CMS installation, and also with screen dump examples.

Installation Steps

start a virtual environment under Raspberry Pi
1.  sudo pip install virtualenv
2.  virtualenv env
3.  sourse env/bin/activate

read more

Conduct a Range of ip Network Address Ping using Python

Intoduction

I would like to conduct a range of ip network address ping using python 3.5 script. It is easy. I will show you the python script and its screen dump result as below.

Python program script

# network ping program run for python3
# Import modules
import subprocess
import ipaddress

# Prompt the user to input a network address
net_addr = input(“Enter a network address in CIDR format(ex.192.168.1.0/24): “)

# Create the network
ip_net = ipaddress.ip_network(net_addr)

# Get all hosts on that network
all_hosts = list(ip_net.hosts())

read more