Professional Documents
Culture Documents
JohnAlexisGuerraGmez
PULPAGrupodeUsuariosGNULinuxdePereira
QuesPython?
Unlenguajedeprogramacin
JohnAlexisGuerraGmez
QuesPython?(II)
JohnAlexisGuerraGmez
ParaqusirvePython?
JohnAlexisGuerraGmez
ParaqusirvePython?(II)
JohnAlexisGuerraGmez
ParaqusirvePython?(III)
JohnAlexisGuerraGmez
CundonousarPython?
JohnAlexisGuerraGmez
QuinusaPython?
BitTorrent,NASA,IndustrialLight&Magic, Google,Yahoo,RedHatLinux,GentooLinux, IBM,Disney,RealNetworks,TotallyGames, NationalInstitutesofHealth(USA),National WeatherService(USA),TheUSNavy,GDA, Animazione... Tomadode: http://pbf.strakt.com/success http://pythonology.org/success
JohnAlexisGuerraGmez
PULPAGrupodeUsuariosGNULinuxdePereira
PythonvsPerlvsJavavsC++
Python Perl Java C++ import java.io.*; public class test { public static void main(String[] args) { try { File f = new File("/tmp/scratch"); PrintWriter pw= new PrintWriter( open new BufferedWriter( ($F,">/tmp/scratch"); new FileWriter(f))); for $i (0 .. 1000000for (int i = 0; i < 1000000; i++) { 1) { pw.print(i); print $F "$i\n"; } } pw.close(); close($F); } catch(IOException ioe) { ioe.printStackTrace(); } } } #include <iostream.h> #include <fstream> using namespace std; int main(int argc,char *argv[]) { ofstream out; out.open("/tmp/scratch"); for(int i=0;i<1000000;i++) { out<<i; } out.close(); }
JohnAlexisGuerraGmez
PULPAGrupodeUsuariosGNULinuxdePereira
PythonvsJava
public class Employee { private String myEmployeeName; private int myTaxDeductions = 1; private String myMaritalStatus = "single"; //--------- constructor #1 ------------public Employee(String argEmployeName) { myEmployeeName = argEmployeeName; } //--------- constructor #2 ------------public Employee(String argEmployeName, int argTaxDeductions) { myEmployeeName = argEmployeeName; myTaxDeductions = argTaxDeductions; } //--------- constructor #3 ------------public Employee(String argEmployeName, int argTaxDeductions, String argMaritalStatus) { myEmployeeName = argEmployeeName; myTaxDeductions = argTaxDeductions; myMaritalStatus = argMaritalStatus; } ...
class Employee(): def __init__(self, argEmployeName, argTaxDeductions = 1, argMaritalStatus = "single"): self.EmployeeName = argEmployeeName self.TaxDeductions = argTaxDeductions self.MaritalStatus = argMaritalStatus ...
JohnAlexisGuerraGmez
PULPAGrupodeUsuariosGNULinuxdePereira
PythonvsJava(II)
public Vector aList = new Vector; public int aNumber = 5; public int anotherNumber; aList.addElement(new Integer(aNumber)); anotherNumber = ((Integer)aList.getElement(0)).intValue(); aList = [] aNumber = 5 aList.append(aNumber) anotherNumber = aList[0]
Algunascomparacionesquesalenalbusarpythonvsjavaengoogle
JohnAlexisGuerraGmez
PULPAGrupodeUsuariosGNULinuxdePereira
Tkinter
JohnAlexisGuerraGmez
PULPAGrupodeUsuariosGNULinuxdePereira
WxPython
JohnAlexisGuerraGmez
PULPAGrupodeUsuariosGNULinuxdePereira
BoaConstructor
http://boaconstructor.sourceforge.net/
JohnAlexisGuerraGmez
PULPAGrupodeUsuariosGNULinuxdePereira
pyunit
JohnAlexisGuerraGmez
PULPAGrupodeUsuariosGNULinuxdePereira
Juegos
pygame
soya
JohnAlexisGuerraGmez
jython
JohnAlexisGuerraGmez
PULPAGrupodeUsuariosGNULinuxdePereira
Servidoresweb
zope
webaware
JohnAlexisGuerraGmez
DBAPIv2.0
JohnAlexisGuerraGmez
Msaplicaciones
JohnAlexisGuerraGmez
PULPAGrupodeUsuariosGNULinuxdePereira
CmoaprenderPython?
http://docs.python.org/tut/tut.html http://diveintopython.org/
http://www.python.org/doc/NonEnglish.html#spani
JohnAlexisGuerraGmez
PULPAGrupodeUsuariosGNULinuxdePereira
Unejemplito
defqsort(L): ifL==[]:return[] returnqsort([xforxinL[1:]ifx<L[0]])+L[0:1]+\ qsort([xforxinL[1:]ifx>=L[0]])
JohnAlexisGuerraGmez
PULPAGrupodeUsuariosGNULinuxdePereira
Tutorial
#Comentario a=10033406;#Unentero a=John;#Ahoraunacadena a=1.1;#Ounpuntoflotante a=(10033406,John);#Ounatupla a=[10033406,John];#Ounalista a={10033406:john};#Oundiccionario a=3+2.5j;#Ounimaginario
JohnAlexisGuerraGmez
PULPAGrupodeUsuariosGNULinuxdePereira
Tutorial(II)
di_hola='si' ifdi_hola==si: print'''Holamundo'''
PULPAGrupodeUsuariosGNULinuxdePereira
Tutorial(III)
lista=[uno,'dos',tres] foriinlista: printi,len(i)
JohnAlexisGuerraGmez
PULPAGrupodeUsuariosGNULinuxdePereira
# #AverysimplewxPythonexample.JustawxFrame,wxPanel, #wxStaticText,wxButton,andawxBoxSizer,butitshowsthebasic #structureofanywxPythonapplication. # importwx#Thismoduleusesthenewwxnamespace classMyFrame(wx.Frame): """ ThisisMyFrame.ItjustshowsafewcontrolsonawxPanel, andhasasimplemenu. """ def__init__(self,parent,title): wx.Frame.__init__(self,parent,1,title,size=(350,200)) menuBar=wx.MenuBar() menu=wx.Menu() menu.Append(101,"E&xit\tAltX","Exitdemo") wx.EVT_MENU(self,101,self.OnButton) menuBar.Append(menu,"&File") self.SetMenuBar(menuBar) panel=wx.Panel(self,1) text=wx.StaticText(panel,1,"HelloWorld!") text.SetFont(wx.Font(12,wx.SWISS,wx.NORMAL,wx.BOLD)) text.SetSize(text.GetBestSize()) btn=wx.Button(panel,1,"Close") btn.SetDefault() sizer=wx.BoxSizer(wx.VERTICAL) sizer.Add(text,0,wx.ALL,10) sizer.Add(btn,0,wx.ALL,10) panel.SetSizer(sizer) panel.Layout()
JohnAlexisGuerraGmez
PULPAGrupodeUsuariosGNULinuxdePereira