Retroceder   Foros del Web > Temas generales de computación > Programación > Python

Respuesta
 
Herramientas Desplegado
Antiguo 09-oct-2008, 18:38   #1 (permalink)
iozk ha deshabilitado el karma
 
Fecha de Ingreso: mayo-2008
Mensajes: 321
hacer .exe a los archivos .py

como hago los archivos .py a exe?
iozk está desconectado   Responder Citando
Antiguo 09-oct-2008, 20:18   #2 (permalink)
import fdw.mod.py
alvlin es realmente agradablealvlin es realmente agradablealvlin es realmente agradablealvlin es realmente agradablealvlin es realmente agradablealvlin es realmente agradablealvlin es realmente agradable
 
Avatar de alvlin
 
Fecha de Ingreso: julio-2005
Ubicación: Canelones, Uruguay
Mensajes: 4.413
Enviar un mensaje por MSN a alvlin Enviar un mensaje por Yahoo  a alvlin Enviar un mensaje por Skype™ a alvlin
Respuesta: hacer .exe a los archivos .py

buscando encontré esto, creo que es suficiente
http://mundogeek.net/archivos/2008/0...ciones-python/
http://www.py2exe.org/


Saludos.
__________________
El Codiguero.com

"Luke yo soy tu padre, Obi Wan es un ca*ón;
Leia es tu hermana, Han Solo es Harrison Foooooooooord"
alvlin está desconectado   Responder Citando
Antiguo 10-oct-2008, 07:48   #3 (permalink)
Colaborador
David el Grande llegará a ser famoso muy prontoDavid el Grande llegará a ser famoso muy prontoDavid el Grande llegará a ser famoso muy prontoDavid el Grande llegará a ser famoso muy prontoDavid el Grande llegará a ser famoso muy pronto
 
Avatar de David el Grande
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 7.170
Respuesta: hacer .exe a los archivos .py

Jeje, ¿para qué te fuiste tan lejos alvlin? .

Aquí lo tenemos:
FAQ's de Python
__________________
"En la vida muchas veces tenemos que ser aprendices, y muchas veces maestros"
P.S.: Pregunta siempre en el foro correcto.
David el Grande está desconectado   Responder Citando
Antiguo 10-oct-2008, 16:16   #4 (permalink)
iozk ha deshabilitado el karma
 
Fecha de Ingreso: mayo-2008
Mensajes: 321
Respuesta: hacer .exe a los archivos .py

no funciona mi codigo

Código python:
Ver originalCopiar
  1. import wx
  2.  
  3. class SketchWindow(wx.Window):
  4.     def __init__(self, parent, ID):
  5.         wx.Window.__init__(self, parent, ID)
  6.  
  7.        
  8.        
  9.         self.SetBackgroundColour("blue")
  10.         self.color = "white"
  11.         self.thickness = 1
  12.         self.pen = wx.Pen(self.color, self.thickness, wx.SOLID)
  13.         self.lines = []
  14.         self.curLine = []
  15.         self.pos = (0, 0)
  16.         self.InitBuffer()
  17.         self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
  18.         self.Bind(wx.EVT_LEFT_UP, self.OnLeftUp)
  19.         self.Bind(wx.EVT_MOTION, self.OnMotion)
  20.         self.Bind(wx.EVT_SIZE, self.OnSize)
  21.         self.Bind(wx.EVT_IDLE, self.OnIdle)
  22.         self.Bind(wx.EVT_PAINT, self.OnPaint)
  23.  
  24.  
  25.     def InitBuffer(self):
  26.         size = self.GetClientSize()
  27.         self.buffer = wx.EmptyBitmap(size.width, size.height)
  28.         dc = wx.BufferedDC(None, self.buffer)
  29.         dc.SetBackground(wx.Brush(self.GetBackgroundColour()))
  30.         dc.Clear()
  31.         self.DrawLines(dc)
  32.         self.reInitBuffer = False
  33.  
  34.     def GetLinesData(self):
  35.         return self.lines[:]
  36.  
  37.     def SetLinesData(self, lines):
  38.         self.lines = lines[:]
  39.         self.InitBuffer()
  40.         self.Refresh()
  41.  
  42.     def OnLeftDown(self, event):
  43.         self.curLine = []
  44.         self.pos = event.GetPositionTuple()
  45.         self.CaptureMouse()
  46.  
  47.     def OnLeftUp(self, event):
  48.         if self.HasCapture():
  49.             self.lines.append((self.color, self.thickness, self.curLine))
  50.             self.curLine = []
  51.             self.ReleaseMouse()
  52.  
  53.     def OnMotion(self, event):
  54.         if event.Dragging() and event.LeftIsDown():
  55.             dc = wx.BufferedDC(wx.ClientDC(self), self.buffer)
  56.             self.drawMotion(dc, event)
  57.             event.Skip()
  58.  
  59.     def drawMotion(self, dc, event):
  60.         dc.SetPen(self.pen)
  61.         newPos = event.GetPositionTuple()
  62.         coords = self.pos + newPos
  63.         self.curLine.append(coords)
  64.         dc.DrawLine(*coords)
  65.         self.pos = newPos
  66.  
  67.     def OnSize(self, event):
  68.         self.reInitBuffer = True
  69.  
  70.     def OnIdle(self, event):
  71.         if self.reInitBuffer:
  72.             self.InitBuffer()
  73.             self.Refresh(False)
  74.  
  75.     def OnPaint(self, event):
  76.         dc = wx.BufferedPaintDC(self, self.buffer)
  77.  
  78.     def DrawLines(self, dc):
  79.         for colour, thickness, line in self.lines:
  80.             pen = wx.Pen(colour, thickness, wx.SOLID)
  81.             dc.SetPen(pen)
  82.             for coords in line:
  83.                 dc.DrawLine(*coords)
  84.  
  85.     def SetColor(self, color):
  86.         self.color = color
  87.         self.pen = wx.Pen(self.color, self.thickness, wx.SOLID)
  88.  
  89.     def SetThickness(self, num):
  90.         self.thickness = num
  91.         self.pen = wx.Pen(self.color, self.thickness, wx.SOLID)
  92.  
  93.  
  94. class SketchFrame(wx.Frame):
  95.     def __init__(self, parent, id, title):
  96.         wx.Frame.__init__(self, parent, id, size=(800,600))
  97.         self.sketch = SketchWindow(self, -1)
  98.         menubar = wx.MenuBar()
  99.         file = wx.Menu()
  100.         file.Append(file, '&File')
  101.         self.SetMenuBar(menubar)
  102.  
  103.         self.Show(True)
  104.  
  105. app = wx.App()
  106. SketchFrame(None, -1, "Sketch Frame",)
  107. app.MainLoop()

Última edición por iozk; 10-oct-2008 a las 16:29. Razón: highlight
iozk está desconectado   Responder Citando
Antiguo 10-oct-2008, 16:23   #5 (permalink)
Colaborador
David el Grande llegará a ser famoso muy prontoDavid el Grande llegará a ser famoso muy prontoDavid el Grande llegará a ser famoso muy prontoDavid el Grande llegará a ser famoso muy prontoDavid el Grande llegará a ser famoso muy pronto
 
Avatar de David el Grande
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 7.170
Respuesta: hacer .exe a los archivos .py

¿Qué es lo que no funciona? ¿Da algún error?. Además, te agradecería que usaras la etiqueta [highlight=python] y [/ highlight] para poner el código, así no se pierde el indentado y se vuelve más fácil de leer.
__________________
"En la vida muchas veces tenemos que ser aprendices, y muchas veces maestros"
P.S.: Pregunta siempre en el foro correcto.
David el Grande está desconectado   Responder Citando
Antiguo 10-oct-2008, 16:30   #6 (permalink)
iozk ha deshabilitado el karma
 
Fecha de Ingreso: mayo-2008
Mensajes: 321
Respuesta: hacer .exe a los archivos .py

Traceback (most recent call last):
File "C:\pnt.py", line 106, in ?
SketchFrame(None, -1, "Sketch Frame",)
File "C:\pnt.py", line 96, in __init__
wx.Frame.__init__(self, parent, id, size=(800,600))
File "C:\Python24\lib\site-packages\wx-2.6-msw-ansi\wx\_windows.py", line 484, in __init__
newobj = _windows_.new_Frame(*args, **kwargs)
PyNoAppError: The wx.App object must be created first!
>>>
iozk está desconectado   Responder Citando
Respuesta

No hay votos aún.


Herramientas
Desplegado

Normas de Publicación
No puedes crear nuevos temas
No puedes responder temas
No puedes subir archivos adjuntos
No puedes editar tus mensajes

BB code is Activado
Caritas están Activado
[IMG] está Activado
Código HTML está Desactivado


La Zona horaria es GMT -6. Ahora son las 10:16.


Message Board Statistics

LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96