Archive

Posts Tagged ‘python’

Python 3.0 Final Released

December 4th, 2008

Python 3.0 Final Released

Python 3.0 (a.k.a. “Python 3000″ or “Py3k”) is a new version of the language that is incompatible with the 2.x line of releases. The language is mostly the same, but many details, especially how built-in objects like dictionaries and strings work, have changed considerably, and a lot of deprecated features have finally been removed. Also, the standard library has been reorganized in a few prominent places.

What’s New and download.

develop

TODO LIST 2009

December 1st, 2008

TODO LIST 2009

Read/Learn/Practice:

Python 2.6 (What’s New)

Perl 5 (Modules, Packages)

PHP (Changes, and news)

COBOL

.NET (C#, LINQ, (ok VB but not much))

Java (Im interested on Mobil Applications)

Haskell

Ruby (Im interested on Rails)

Parrot and Pugs

Gnu/Linux (Services and Bash)

BSD and OpenSolaris

Personal Projects 2009:

BSE (Blog’s Search Engine) (http://BSE.AyalaSoft.com)

Invoices PHP (Now is part of a Intranet) (http://valuacion.com.mx)

Forming one’s own business

And others ….

Lambda Functions on PHP 5.3.0:

 $lambda = function () { echo "Hello World!\n"; };

Parrot “Hello World” example:

.sub main
      print "Hello World!\n";
.end

COBOL “Hello World” example:

* Hello World Program
* GPL Copyleft Jonathan Riddell 2001
	IDENTIFICATION DIVISION.
	PROGRAM-ID.    hello.
	ENVIRONMENT DIVISION.
	DATA DIVISION.
 
	PROCEDURE DIVISION.
		DISPLAY "Hello ," WITH NO ADVANCING
		DISPLAY "World!"
		STOP RUN.

Haskell “Hello World” example:

putStrLn "Hello World!"

develop, unix/linux, web, windows , , , , , ,

Google App Engine

November 5th, 2008

Google App Engine

Downloads (http://code.google.com/appengine/downloads.html)

Google App Engine use Django, webob, yaml.

You need Python (http://www.python.org) (Python 2.5)

The configuration file app.yaml

There are two main Python scripts:

Video from the The Google Code Channel:

See the applications gallery

Google App Engine

database, develop, hardware, network, projects, web , ,

Using Windows ? Don’t kill Yourself

October 27th, 2008

Using Windows ? Don’t Kill Yourself

Supose you are Linux user and you have a Windows system.

Alternatives: Cygwin, Mingw or Colinux

You need some (or all) of this interpreters:

Perl, PHP, Python and Ruby

Modify the %PATH%

Example you have a bin dir, on C:\ to include the executables on the %PATH% do this:

set PATH=%PATH%;C:\bin\

On Windows Vista, you can use your mouse:

computer > properties > Advances system settings > (continue) > Advanced > Enviroment Variables > System Variables > Path (edit)

Example run Kompozer on cmd.exe but no modify %PATH%

: kompozer.bat save on %WINDIR%
@"C:\Program Files\Kompozer\kompozer.exe"

Doble click on your scripts to run:

: Perl Scripts
 assoc .pl=Perl.File
 ftype Perl.File=C:\strawberry\perl\bin\perl.exe "%1" %*
 set PATHEXT=%PATHEXT%;.pl
: Python Scripts
 assoc .py=Python.File
 ftype Python.File=C:\Python26\python.exe "%1" %*
 set PATHEXT=%PATHEXT%;.py

Note:

On Windows Vista you need run cmd.exe as Administrator don’t work as normal user

Apache, PHP and MySQL ?

XAMPP and Server2Go

Notes:

XAMPP: simple, quick and easy install.

Server2Go: is great to make CD demo of a Web Application.

Using Perl or Python as CGI on Windows ?

Using Python 2.6

#!\python26\python.exe

Using Strawberry Perl:

#!\strawberry\perl\bin\perl.exe

Now your script works on http://localhost/cgi-bin/script.cgi

develop, unix/linux, windows , , , , ,

PDF Libraries

October 2nd, 2008

PDF Libraries

Sometimes we need create or export data into a PDF:

.NET:

http://www.pdfsharp.com, http://www.codeplex.com/Print2Pdf

C++:

http://libharu.org

Perl:

http://search.cpan.org/~markusb/PDF-Create/lib/PDF/Create.pm

sudo perl -MCPAN -e 'install PDF::Create'

PHP:

http://www.fpdf.org, http://www.digitaljunkies.ca/dompdf, http://pear.php.net/package/File_PDF

Python:

http://www.reportlab.org

wget -c http://www.reportlab.org/ftp/ReportLab_2_2.tgz
tar xvzf ReportLab_2_2.tgz
cd ReportLab_2_2
sudo python setup.py install

Java:

http://www.lowagie.com/iText, http://www.pdfbox.org

Ruby:

http://ruby-pdf.rubyforge.org/pdf-writer

sudo gem install pdf-writer

develop , , , , , ,

PunBB + Python = PynBB (Linked)

September 30th, 2008

PunBB + Python = PynBB (Linked)

I say:

Is a great honor to me, you linked my python script (PynBB) to the wiki of PunBB

I will continue learing python and punbb source code to give more options to this script

Thanks.

http://punbb.informer.com/wiki/doku.php?id=links

develop, network, projects, web

PunBB + Python = PynBB

September 22nd, 2008

PunBB + Python = PynBB

I made this Python script interface of PunBB forums

Download this script: [pynbb.py]

Edit this vars:

# BEGIN OF EDITABLE OPTIONS #
###################################################################
 
HOST = ""	# PunBB WebSite without http:// and slashes
PATH = ""	# Example: domain.com/forum PATH ="/forum"
USER = ""	# Your Username (Important: case sensitive)
PASS = ""	# Your Password
 
###################################################################
# END OF EDITABLE OPTIONS #

Run:

python pynbb.py

Note: Does’t work when the forum uses clean urls (maybe in the next release)

develop, network, projects, web