[JIRA] (JENKINS-50841) When I check become and save, but it is not reflected.

2019-08-23 Thread craf....@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Raphaël COMBEAU updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-50841  
 
 
  When I check become and save, but it is not reflected.   
 

  
 
 
 
 

 
Change By: 
 Raphaël COMBEAU  
 
 
Attachment: 
 Capture_ansible_plugin_wrong_untick.PNG  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.189955.1523963235000.8695.1566565921445%40Atlassian.JIRA.


[JIRA] (JENKINS-50841) When I check become and save, but it is not reflected.

2019-08-23 Thread craf....@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Raphaël COMBEAU updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-50841  
 
 
  When I check become and save, but it is not reflected.   
 

  
 
 
 
 

 
Change By: 
 Raphaël COMBEAU  
 
 
Attachment: 
 Capture_ansible_plugin_wrong.PNG  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.189955.1523963235000.8684.1566565860813%40Atlassian.JIRA.


[JIRA] (JENKINS-50841) When I check become and save, but it is not reflected.

2019-08-23 Thread craf....@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Raphaël COMBEAU commented on  JENKINS-50841  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: When I check become and save, but it is not reflected.   
 

  
 
 
 
 

 
 I have the same issue with Ansible Plugin version 1.0. I use in Jenkins ver. 2.180. Please can you fix it ? Thank you very much.  Best regards,  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.189955.1523963235000.8669.1566565741809%40Atlassian.JIRA.


[JIRA] (JENKINS-50841) When I check become and save, but it is not reflected.

2019-08-23 Thread craf....@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Raphaël COMBEAU updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-50841  
 
 
  When I check become and save, but it is not reflected.   
 

  
 
 
 
 

 
Change By: 
 Raphaël COMBEAU  
 
 
Environment: 
 - Jenkins ver. 2.110-  Jenkins ver. 2.180-  ansible-plugin ver. 1.0  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.189955.1523963235000.8656.1566565620529%40Atlassian.JIRA.


Re: [pygtk] How to set a wiget, eg a button size?

2012-04-20 Thread craf

Hi All,
   when i put some buttons in a hbutton box, the hbutton box
becomes very long
   i don't know how to set a button size, set_size_request has no
effect

   could anybody help me how to set the size for widgets?
   thanks

  Lion

Hi Lion

Have your code to see you're doing?

Regards

Craf



___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] run a program with 2 windows on separate monitors

2012-01-11 Thread craf
Yes, but I reckon window management is out of the scope of GTK+. Use the  
same class on both windows (IIRC windows spawned by the same GTK+  
executable use the same class by default). Then write a window manager  
that groups windows by class (where class = Application name).

Thank you!.

Regards,

cris


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] run a program with 2 windows on separate monitors

2012-01-10 Thread craf
Hi.

Is it possible to run a program with 2 windows on separate monitors?

Example:


Monitor One  Monitor Two
 ___   ___
| _ | | _ |
|| || || ||
||  Window Main|| ||  Window Child   ||
||     || ||     ||
||  |__|-|+|x| || ||  |__|-|+|x| ||
||  || || ||  || ||
||  || || ||  || ||
||  || || ||  || ||
||  || || ||  || ||
|| || || ||
||_|| ||_||
|___| |___|
  / \/ \
 /   \  /   \
/_\/_\


Best regards.

Cris.

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] [Fwd: Gtk.Box, homogeneous and expand]

2012-01-03 Thread craf
Hi.

Test this...

import gtk


class App:

def __init__(self):

self.ventana = gtk.Window()
self.ventana.set_default_size(100, 100)
self.ventana.set_position(gtk.WIN_POS_CENTER)

self.hbox1 = gtk.HBox()

self.hbox2 = gtk.HBox(True)

self.button1 = gtk.Button(1234)
self.button2 = gtk.Button(123)
self.button3 = gtk.Button(12)

self.hbox2.pack_start(self.button1, False)
self.hbox2.pack_start(self.button2, False)
self.hbox2.pack_start(self.button3, False)

self.hbox1.pack_start(self.hbox2, False)

self.ventana.add(self.hbox1)
self.ventana.show_all()

self.ventana.connect(destroy, lambda e:gtk.main_quit())



App()
gtk.main()

Regards.

Cris.
- Mensaje reenviado 
 De: Jérôme jer...@jolimont.fr
 Para: pygtk@daa.com.au
 Asunto: [pygtk] Gtk.Box, homogeneous and expand
 Fecha: Tue, 3 Jan 2012 14:42:27 +0100
 
 Hi.
 
 There's something I don't get with the behaviour of homogeneous in Gtk.Box. I
 guess there must be a reason for it working this way. I just don't get the
 logic.
 
 From http://pygtk.org/pygtk2tutorial/sec-DetailsOfBoxes.html :
 
 The homogeneous argument [... ]controls whether each object in the box has
 the same size.
 
 If homogeneous is set, then the pack routines function essentially as if
 the expand argument was always turned on.
 
 Though it works as if the expand argument was always turned on, each
 object in the box has the same size is not really what I see.
 
 What I see :
 --
 
 1.a/
 homogeneous = True
 expand = whatever
 fill = False (for all objects)
 - Objects are scattered along the line (it is a HBox), with space in
 between. They may be provided equal space, but don't actually fill it, so
 they appear with different sizes.
 
 [  |a|   |abc|||  ]
 
 
 1.b/
 homogeneous = True
 expand = whatever
 fill = True (for all objects)
 - Objects use all the line and are of equal size
 
 [|  a  || abc ||| ]
 
 
 What I would expect :
 ---
 
 2.a/
 homogeneous = True
 expand = False
 fill = whatever
 - Objects would be of the same size : the size of the largest one, and they
 would be left-aligned (pack_start() being used).
 
 [| a ||abc||   |  ]
 
 
 2.b/
 homogeneous = True
 expand = True
 fill = False
 - Objects would be of the same size : the size of the largest one, and they
 would be scattered along the line with space in between.
 
 [ | a |  |abc|  |   | ]
 
 
 2.c/
 homogeneous = True
 expand = True
 fill = True
 - Objects would be of the same size and fill the line.
 
 [|  a  || abc || |]
 
 
 This seems more logical to me. I can't figure out why it does not work this
 way. 
 
 Besides, I don't see how to obtain 2.a/ any other way.
 
 Am I the only one who would expect things to work this way (or at least a
 different way) ?
 
 -- 
 Jérôme
 ___
 pygtk mailing list   pygtk@daa.com.au
 http://www.daa.com.au/mailman/listinfo/pygtk
 Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Re: [pygtk] [Fwd: Gtk.Box, homogeneous and expand]

2012-01-03 Thread craf

And I don't see how to use that if I have two pack_start() and one pack_end()
and want all my objects to be of the same size, like this :

[|abc|| a |  | . |]

Hi.

test if it helps

import gtk


class App:

def __init__(self):

self.window = gtk.Window()
self.window.set_default_size(100, 100)
self.window.set_position(gtk.WIN_POS_CENTER)

self.hbox = gtk.HBox()

self.button1 = gtk.Button(1234)
self.button1.set_size_request(50, -1)

self.button2 = gtk.Button(123)
self.button2.set_size_request(50, -1)

self.button3 = gtk.Button(12)
self.button3.set_size_request(50, -1)

self.hbox.pack_start(self.button1, False)
self.hbox.pack_start(self.button2, False)
self.hbox.pack_end(self.button3, False)



self.window.add(self.hbox)
self.window.show_all()

self.window.connect(destroy, lambda e:gtk.main_quit())

App()
gtk.main()

Best Regards

Cris
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/



___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Fullscreen on second monitor

2011-12-25 Thread craf
Hi Thomas.

The problem may be related to the distribution of ubuntu and the type of
video card installed.

I have a Ubuntu 9.10 and ATI video card, and your code recognizes me 2
monitors. But if I run it on a newer version of Ubuntu does not work.

That's why I use a distribution as old as the newest, I do not recognize
the second monitor.

Regards.

Craf

-Mensaje original-
De: Thomas Güttler guet...@thomas-guettler.de
Para: pygtk@daa.com.au
Asunto: [pygtk] Fullscreen on second monitor
Fecha: Sat, 24 Dec 2011 23:26:27 +0100

Hi,

how can I show the fullscreen window on the secondary monitor?

At best, the fullscreen mode should start on this screen where,
the current (not fullscreen) application is running.

At the moment the fullscreen is on my laptop, and not on the
secondary monitor.


With pygtk I can't seem to find a secondary screen:

 display_manager = gtk.gdk.display_manager_get()
 for display in display_manager.list_displays():
 print display
 for num in range(display.get_n_screens()):
 screen=display.get_screen(num)
 print 'screen', screen

output:

gtk.gdk.DisplayX11 object at 0xa74ddec (GdkDisplayX11 at 0xa34b008)
screen gtk.gdk.ScreenX11 object at 0xa74dd24 (GdkScreenX11 at 0xa34e0d8)

I use Ubuntu 11.10.





___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Re: [pygtk] set focus in dialog

2011-11-18 Thread craf
Hi Andrew

Works very well!

Thank you very much.

Best Regards.

Cristian

-Mensaje original-
De: Andrew Steele andrew.ste...@gmx.com
Para: craf pyclut...@gmail.com
Cc: Pygtk pygtk@daa.com.au
Asunto: Re: [pygtk] set focus in dialog
Fecha: Fri, 18 Nov 2011 15:23:20 +

#!/usr/bin/env python

import gtk

class Dialog:   
def __init__(self):
dialog = gtk.Dialog(Dialog Example, None, 0,
(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OK, gtk.RESPONSE_OK))
dialog.set_default_size(250, 300)
label = gtk.Entry()

buttonbox = dialog.get_action_area()
buttons = buttonbox.get_children()
dialog.set_focus(buttons[0])

dialog.vbox.pack_start(label, True, True, 0)
dialog.show_all()

response = dialog.run()

if response == gtk.RESPONSE_OK:
print OK
elif response == gtk.RESPONSE_CANCEL:
print CANCEL

dialog.destroy()

Dialog()

The above is the easiest and quickest way I can think of. Essentially, you 
access the ButtonBox which holds the buttons specified when constructing the 
Dialog and retrieve the Button. This allows you to set the focus before the 
Dialog is shown.

I have a feeling there is a better way, though it's not obvious to me at the 
moment.

On Thu, 17 Nov 2011 12:42:36 -0300
craf pyclut...@gmail.com wrote:

 Hi.
 
 Is there any way to the OK button, keep the focus to start the program,
 and not the entry control?
 
 Here Code:-
 
 #!/usr/bin/env python
 
 import gtk
 
 class Dialog:   
 def __init__(self):
 dialog = gtk.Dialog(Dialog Example, None, 0,
 (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OK, gtk.RESPONSE_OK))
 dialog.set_default_size(250, 300)
 label = gtk.Entry()
 
 dialog.vbox.pack_start(label, True, True, 0)
 dialog.show_all()
 
 response = dialog.run()
 
 if response == gtk.RESPONSE_OK:
 print OK
 elif response == gtk.RESPONSE_CANCEL:
 print CANCEL
 
 dialog.destroy()
 
 Dialog()
 
 
 Thanks in advance!
 
 Regards.
 
 CRAF
 
 ___
 pygtk mailing list   pygtk@daa.com.au
 http://www.daa.com.au/mailman/listinfo/pygtk
 Read the PyGTK FAQ: http://faq.pygtk.org/



___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Site down

2011-11-18 Thread craf
Thank you Dieter.

Regards,

Cristian

-Mensaje original-
De: Dieter Verfaillie diet...@optionexplicit.be
Para: craf pyclut...@gmail.com
Cc: Pygtk pygtk@daa.com.au
Asunto: Re: [pygtk] Site down
Fecha: Fri, 18 Nov 2011 20:03:13 +0100

On 16/11/2011 15:59, craf wrote:
 Hi.
 
 Does anyone know if the site is under maintenance?

pygtk.org is back in business :)

mvg,
Dieter



___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] Site down

2011-11-16 Thread craf
Hi.

Does anyone know if the site is under maintenance?

Regards.

Craf

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] window set_default_size VS set_usize

2011-11-15 Thread craf
-Mensaje original-
De: Liu ChuanRen liuchuan...@gmail.com
Para: pygtk@daa.com.au
Asunto: [pygtk] window set_default_size VS set_usize
Fecha: Sat, 22 Oct 2011 13:36:14 -0400

Hi all,


I am a beginner, my first question is what is the different between
window method
set_default_size VS set_usize


I tried both, it seems set_default_size will be overrode if the content
is too much, the size will be larger, while set_usize will not be
overrode.


Is this correct? I can not find document of set_usize. Is it
deprecated? 

Yes, is deprecated.

Regards.


Liu ChuanRen
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/



___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Refresh DrawingArea

2011-11-11 Thread craf
Hi Dieter.

Thanks for you answer.

Regards.

Cristian

-Mensaje original-
De: Dieter Verfaillie diet...@optionexplicit.be
Para: craf pyclut...@gmail.com
Cc: Pygtk pygtk@daa.com.au
Asunto: Re: [pygtk] Refresh DrawingArea
Fecha: Fri, 11 Nov 2011 09:30:44 +0100

On Thu, 10 Nov 2011 19:08:32 -0300, craf wrote:
 Hi.

 Is there a way to refresh a control DrawingArea?.

You can call queue_draw() or queue_draw_area(x, y, width, height)
on it. See 
http://www.pygtk.org/docs/pygtk/class-gtkwidget.html#method-gtkwidget--queue-draw

mvg,
Dieter




___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] Refresh DrawingArea

2011-11-10 Thread craf
Hi.

Is there a way to refresh a control DrawingArea?.

Thanks in advance.

Regards.

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Double row in a liststore, or in a Treeview

2011-10-28 Thread craf
Hi Andrew.

Thank you for your answer!!

The code works very Fine!.

Best Regards

Cristian.
-Mensaje original-
De: Andrew Steele andrew.ste...@gmx.com
Para: craf pyclut...@gmail.com
Cc: Pygtk pygtk@daa.com.au
Asunto: Re: [pygtk] Double row in a liststore, or in a Treeview
Fecha: Fri, 28 Oct 2011 09:35:18 +0100

Below is a basic example. Essentially, when populating the ListStore you
need to insert '\n' to indicate the line break.

#!/usr/bin/env python

import gtk

window = gtk.Window()
window.connect(destroy, lambda q: gtk.main_quit())

liststore = gtk.ListStore(str)
liststore.append([apple.jpg\n314KB])
liststore.append([orange.jpg\n495KB])
liststore.append([banana.jpg\n417KB])

treeview = gtk.TreeView(liststore)
treeviewcolumn = gtk.TreeViewColumn()
treeview.append_column(treeviewcolumn)
cellrenderertext = gtk.CellRendererText()
treeviewcolumn.pack_start(cellrenderertext, True)
treeviewcolumn.add_attribute(cellrenderertext, text, 0)

window.add(treeview)
window.show_all()

gtk.main()

Obviously you'll be wanting to dynamically specify the values rather
than statically as above (i.e. filename, file size, etc) so you can make
use of string formatters such as %s:

filename = grapes.png
filesize = 557KB
liststore.append([%s\n%s % (filename, filesize)])

Hope that helps.

On Thu, 2011-10-27 at 20:41 -0300, craf wrote:
 Hi.
 
 I wonder if it is possible that a liststore has a double row, such as
 using the Firefox download page.
 
 Example
 
 -
 |Downloads|x|
 -
 |Space.pdf   20:23  |
 |  ICON  4.9 MB - google.cl |
 |   |
 |  ICON  Picture_sky.jpeg   |
 |205 KB - google.cl |
 |   |
  ---
 
 Any indication, Thanks
 
 Regards.
 
 
 Craf
 
 
 ___
 pygtk mailing list   pygtk@daa.com.au
 http://www.daa.com.au/mailman/listinfo/pygtk
 Read the PyGTK FAQ: http://faq.pygtk.org/




___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] Double row in a liststore, or in a Treeview

2011-10-27 Thread craf
Hi.

I wonder if it is possible that a liststore has a double row, such as
using the Firefox download page.

Example

-
|Downloads|x|
-
|Space.pdf   20:23  |
|  ICON  4.9 MB - google.cl |
|   |
|  ICON  Picture_sky.jpeg   |
|205 KB - google.cl |
|   |
 ---

Any indication, Thanks

Regards.


Craf


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] importing list from another python file

2011-10-25 Thread craf
Hi Ravi.

Why don't use the class ConfigParser, for save your config.

http://docs.python.org/release/2.6.7/library/configparser.html?highlight=configparser#ConfigParser.ConfigParser

Best Regards.

Craf

-Mensaje original-
De: ravi ravi shaw...@yahoo.co.uk
Para: pygtk@daa.com.au
Asunto: [pygtk] importing list from another python file
Fecha: Wed, 26 Oct 2011 00:42:55 +0100 (BST)



Hello all,

I am using python and pygtk to create a GUI. I am storing all the
values that are to be displayed, in a list.
-- The values are calculated and stored in a list in the first file
-- The list is imported in to the second file which is GUI
file(contains gtk.main()) by using IMPORT statement.

problem:

The list is continuously appended in the first file, but this does not
reflect when imported in to the second file. The second file only shows
an empty list. I need to get an updated list in my GUI file.Please help
me out

Thank you,

Ravindra Nagireddy




___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/



___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Treeview adding content dynamically

2011-10-15 Thread craf
Hi.

This?

http://www.learngtk.org/pygtk-tutorial/liststore.html

Regards.

Craf

-Mensaje original-
De: Arun p das arunpdas...@gmail.com
Para: Glade Users Mailing List glade-us...@lists.ximian.com, Pygtk
Mailing list pygtk@daa.com.au
Asunto: [pygtk] Treeview adding content dynamically
Fecha: Sun, 16 Oct 2011 03:02:09 +0530

hi

I have already created 
model Liststore
view   cell renderer
GtkTreeView 

using Glade. I got how to add the contents with the help of glade. 
But i dont know how to add contents with the help of pygtk to a already
created one like the above.

ie in existence i have one treeview made with the help of glade how to
add contents to this existing one through pygtk? Does any one know the
code please share or give the link to tutorial
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/



___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Treeview adding content dynamically

2011-10-15 Thread craf
Hi.

This?

http://www.learngtk.org/pygtk-tutorial/liststore.html

Regards.

Craf

-Mensaje original-
De: Arun p das arunpdas...@gmail.com
Para: Glade Users Mailing List glade-us...@lists.ximian.com, Pygtk
Mailing list pygtk@daa.com.au
Asunto: [pygtk] Treeview adding content dynamically
Fecha: Sun, 16 Oct 2011 03:02:09 +0530

hi

I have already created 
model Liststore
view   cell renderer
GtkTreeView 

using Glade. I got how to add the contents with the help of glade. 
But i dont know how to add contents with the help of pygtk to a already
created one like the above.

ie in existence i have one treeview made with the help of glade how to
add contents to this existing one through pygtk? Does any one know the
code please share or give the link to tutorial
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/



___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Treeview adding content dynamically

2011-10-15 Thread craf
Hi.

This?

http://www.learngtk.org/pygtk-tutorial/liststore.html

Regards.

Craf


-Mensaje original-
De: Arun p das arunpdas...@gmail.com
Para: Glade Users Mailing List glade-us...@lists.ximian.com, Pygtk
Mailing list pygtk@daa.com.au
Asunto: [pygtk] Treeview adding content dynamically
Fecha: Sun, 16 Oct 2011 03:02:09 +0530

hi

I have already created 
model Liststore
view   cell renderer
GtkTreeView 

using Glade. I got how to add the contents with the help of glade. 
But i dont know how to add contents with the help of pygtk to a already
created one like the above.

ie in existence i have one treeview made with the help of glade how to
add contents to this existing one through pygtk? Does any one know the
code please share or give the link to tutorial
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/



___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] Problems with coordinates in a drawing area control

2011-10-14 Thread craf
Hi everyone!

I'm trying to learn PyCairo, and using the following code, I created a
window with a scale of 200 x 200


CODE:-

#!/usr/bin/python

import gtk


class Window():

def __init__(self):

self.window = gtk.Window()  
self.drwArea = gtk.DrawingArea()

self.window.add(self.drwArea)
self.window.show_all()

# Events-
  
self.drwArea.add_events(gtk.gdk.POINTER_MOTION_MASK)


# Signals-

self.window.connect(destroy, lambda e:gtk.main_quit())

self.drwArea.connect(expose-event, expose, self)

self.drwArea.connect(motion-notify-event, motion_notify,
self)
 

def expose(widget, event, self):

cr = widget.window.cairo_create()

cr.scale(200,200)
   

def motion_notify(widget, event, self):

print x=%d y=%d % (event.x, event.y)
 
Window()
gtk.main()

-CODE:---

The problem is the coordinate system, leaving the point (0.0) in:

 __
|(0,0) |
|  |
|  |
|  |
|  |
|  |
|__|

and I want to stay well:

___
|  |
|  |
|  |
|  |
|  |
|  |
|(0,0)_|


I tested with cr.translate (-200, -200), but does not work.


I appreciate any suggestions.

Regards.

Craf.


DATES:
Python 2.6.4
Ubuntu 9.10
Gnome 2.28.0

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Problems with coordinates in a drawing area control

2011-10-14 Thread craf
Hi Jamie

Thank you very much for answering, if you could give me a small
example,I appreciate it.

I probe with cr.translate(0,-1 * 200), but nothing

Regards

Craf
-Mensaje original-
De: Jamie Bliss astronouth7...@gmail.com
Para: craf pyclut...@gmail.com
Cc: Pygtk pygtk@daa.com.au
Asunto: Re: [pygtk] Problems with coordinates in a drawing area control
Fecha: Fri, 14 Oct 2011 18:32:03 -0400

The X requires no change. Just flip and translate the Y.

On Fri, Oct 14, 2011 at 12:52 PM, craf pyclut...@gmail.com wrote:
 Hi everyone!

 I'm trying to learn PyCairo, and using the following code, I created a
 window with a scale of 200 x 200


 CODE:-

 #!/usr/bin/python

 import gtk


 class Window():

def __init__(self):

self.window = gtk.Window()
self.drwArea = gtk.DrawingArea()

self.window.add(self.drwArea)
self.window.show_all()

# Events-

self.drwArea.add_events(gtk.gdk.POINTER_MOTION_MASK)


# Signals-

self.window.connect(destroy, lambda e:gtk.main_quit())

self.drwArea.connect(expose-event, expose, self)

self.drwArea.connect(motion-notify-event, motion_notify,
 self)


 def expose(widget, event, self):

cr = widget.window.cairo_create()

cr.scale(200,200)


 def motion_notify(widget, event, self):

print x=%d y=%d % (event.x, event.y)

 Window()
 gtk.main()

 -CODE:---

 The problem is the coordinate system, leaving the point (0.0) in:

  __
 |(0,0) |
 |  |
 |  |
 |  |
 |  |
 |  |
 |__|

 and I want to stay well:

 ___
 |  |
 |  |
 |  |
 |  |
 |  |
 |  |
 |(0,0)_|


 I tested with cr.translate (-200, -200), but does not work.


 I appreciate any suggestions.

 Regards.

 Craf.


 DATES:
 Python 2.6.4
 Ubuntu 9.10
 Gnome 2.28.0

 ___
 pygtk mailing list   pygtk@daa.com.au
 http://www.daa.com.au/mailman/listinfo/pygtk
 Read the PyGTK FAQ: http://faq.pygtk.org/




___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[Vala] [Geani] Is Dead?

2011-05-23 Thread craf
Hi.

I am a Python programmer and gtk.

Looking to learn other languages​​, I found vala and simplified version
Genie.

Vala and Geanie found fantastic and I have sought information about them
on the web.

About Vala I found lots of information, but I found Geanie only
fragments of it.

http://live.gnome.org/Genie (Code only to learn the basics, using
console).

http://jamiemcc.livejournal.com/11749.html(The blog's creator, not
updated since 2008)

http://bkhome.org/genie/ (What is the most complete I've found so far,
but the author was changed to Bacon)

After a 2-day search on the web, I failed to find more relevant
information of Genie.

Therefore I would like to know if anyone knows if Genie is still being
developed.

(Sorry for my English to Tarzan)

Regards.

Cristian Abarzúa F

___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] [Geani] Is Dead?

2011-05-23 Thread craf
-Mensaje original-
De: Jamie McCracken jamie.mccr...@gmail.com
Para: craf pyclut...@gmail.com
Cc: Lista Vala vala-list@gnome.org
Asunto: Re: [Vala] [Geani] Is Dead?
Fecha: Mon, 23 May 2011 12:41:58 -0400

Im still maintaining Genie although Vala appears to be in a slow state
of development now that its fairly mature

Hi Jamie.

Thanks for answering!.

As I mentioned in the mail, I'd love to learn to work with GTK Genie,
but I find no reference points to migrate my work in Python-GTK to GTK
Genie.

It would be great if you could tell me, what would be the way to work
with Genie and GTK.

Besides, I want to do some tutorials in my language (Spanish), once
covered the basic shape.

Great work!.

Regards.

Cristian Abarzúa F.



___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] [Geani] Is Dead?

2011-05-23 Thread craf
-Mensaje original-
De: Reid Thompson reid.thomp...@ateb.com
Reply-to: reid.thomp...@ateb.com
Para: craf pyclut...@gmail.com
Cc: Lista Vala vala-list@gnome.org
Asunto: Re: [Vala] [Geani] Is Dead?
Fecha: Mon, 23 May 2011 13:39:45 -0400

On 05/23/2011 12:32 PM, craf wrote:

 About Vala I found lots of information, but I found Geanie only
 fragments of it.

 http://live.gnome.org/Genie (Code only to learn the basics, using
 console).

 http://jamiemcc.livejournal.com/11749.html(The blog's creator, not
 updated since 2008)

 http://bkhome.org/genie/ (What is the most complete I've found so far,
 but the author was changed to Bacon)

 After a 2-day search on the web, I failed to find more relevant
 information of Genie.

may be of use
http://code.valaide.org/category/tags/genie

Hi. Reid

thank you very much for the link.

The examples are clear and concise

Best Regards.

Cristian Abarzúa


___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [pygtk] sentence twice impression

2011-05-16 Thread craf
-Mensaje original-
De: Alessandro Dentella san...@e-den.it
Para: craf pyclut...@gmail.com
Cc: Python Pygtk pygtk@daa.com.au
Asunto: Re: [pygtk] sentence twice impression
Fecha: Mon, 16 May 2011 09:13:49 +0200

On Sun, May 15, 2011 at 10:26:50PM -0400, craf wrote:
 Hi.
 
 It is possible to prevent the print statement, printed on the screen 2
 times?


sure, it depends on what you want. callback function is called 2 times, one
when one radio is clicked (so that it's toggled) and the other when the
other is toggled as if belongs to the same group.

the callback function prints only for a toggle from True = False otherwise
you would see also a couple of prin forthe simmetrical transition, but
independently from which button triggered the call.

Depending on what you want you can just add an argument to the function and
call directly the correct radiobutton, 

  self.radiobutton.connect('toggled', function, radiobutton)
  self.radiobutton1.connect('toggled', function, radiobutton1)

  def function(butt, radio):
 if radio.get_active():
 print radio

in more complex case I needed to inhibit further processing of the signal:

self.gtkwidget.handler_block(self._clicked_id)

self.gtkwidget.set_inconsistent(False)
self.gtkwidget.set_active(value)

self.gtkwidget.handler_unblock(self._clicked_id)


your milage may vary, but if you understand why you get it twice it's not
diffucult to change it to your need.


sandro
*:-)

Hi Alessandro.

Thank you very much for your response!.

Regards.

Cristian



___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] sentence twice impression

2011-05-15 Thread craf
Hi.

It is possible to prevent the print statement, printed on the screen 2
times?

Code:-

#!/usr/bin/env python

import gtk

class RadioButton:
def __init__(self):
self.window = gtk.Window()
self.vbox = gtk.VBox()

self.radiobutton = gtk.RadioButton(None, One)
self.radiobutton1 = gtk.RadioButton(self.radiobutton, Two)
self.radiobutton2 = gtk.RadioButton(self.radiobutton, Three)


self.window.add(self.vbox)
self.vbox.pack_start(self.radiobutton)
self.vbox.pack_start(self.radiobutton1)
self.vbox.pack_start(self.radiobutton2)
  
self.window.connect(destroy, lambda w: gtk.main_quit())

self.radiobutton.connect('toggled', lambda e, widget=self:
function(widget))
self.radiobutton1.connect('toggled', lambda e, widget=self:
function(widget))
self.radiobutton2.connect('toggled', lambda e, widget=self:
function(widget))
self.window.show_all()

def function(widget):
if widget.radiobutton.get_active() == True:
print one
elif widget.radiobutton1.get_active() == True:
print Two
elif widget.radiobutton2.get_active() == True:
print Three

RadioButton()
gtk.main()


Regards.

Cristian

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Pygtk toggle hide show with time interval

2011-05-06 Thread craf
hi.

import gtk, pygtk
pygtk.require('2.0')
import time

class test():
  def __init__(self):
self.window=gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.connect=('delete_event',lambda wid, we: gtk.main_quit())
self.window.show()
gtk.gdk.flush()
print show
time.sleep(2)
self.window.hide()
gtk.gdk.flush()
print hide
time.sleep(3)
self.window.show()
print show

if __name__ == __main__:
  test()
  gtk.main()


Regards.

Cristian

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: PyGTK, Glade/libglade. What am I doing wrong?

2011-05-06 Thread craf
On May 6, 2011 7:05 PM, Даниил Рыжков daniil...@gmail.com wrote:

 Sorry for my English (I could not find help in the Russian community)
 I'm trying to learn PyGTK and Glade. I made test window in Glade and
 saved it as test.glade (attached). Then I wrote script
 test.py(attached, http://pastebin.com/waKytam3). I tried to run it.
 While the script was executed, console did not show anything and
 window wasn't displayed. When I pressed CTRL+С console displayed
 trackback:
 ---
 CTraceback (most recent call last):
  File test.py, line 32, in module
gtk.main()
 KeyboardInterrupt
 ---
 So what am I doing wrong?


I haven't used gtk before, but is there a show method or something
similar you need, to actually make the window appear? The
KeyboardInterrupt is normal. That's how control-c works.
 --
 Best wishes,
 Daniil

 --
 http://mail.python.org/mailman/listinfo/python-list


Hi.

Try this:

#!/usr/bin/env python

import gtk.glade

class TestPyGtk:
This is an Hello World GTK application

def __init__(self):

#Set the Glade file
self.gladefile = test.glade
self.glade = gtk.glade.XML(self.gladefile)

self.MainWindow = self.glade.get_widget('MainWindow')
self.MainWindow.show()
self.MainWindow.connect('destroy', lambda e:gtk.main_quit())



TestPyGtk()
gtk.main()

Regards.

Cristian.

List of Pygtk: http://www.daa.com.au/mailman/listinfo/pygtk





-- 
http://mail.python.org/mailman/listinfo/python-list


[pygtk] Autocomplete in Widget ComboBoxEntry

2011-04-29 Thread craf
Hi.

There a way to assign the event autocomplete to a widget ComboBoxEntry?

Thanks in advance.

Regards

Cristian

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] Method set_wrap_mode of widget TextView

2011-04-29 Thread craf
Hi.

Anyone know if the method of widget gtk.TextView (set_wrap_mode) , can
be applied also to widget gtksourceview?

Regards.

Cristian Abarzúa F.

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Re: [pygtk] Method set_wrap_mode of widget TextView

2011-04-29 Thread craf
-Mensaje original-
De: Giuseppe Penone gius...@gmail.com
Para: craf pyclut...@gmail.com
Cc: Python Pygtk pygtk@daa.com.au
Asunto: Re: [pygtk] Method set_wrap_mode of widget TextView
Fecha: Fri, 29 Apr 2011 22:48:27 +0200

As you can read from the reference page
(http://www.pygtk.org/pygtksourceview/class-gtksourceview.html),


class gtksourceview.SourceView(gtk.TextView):
gtksourceview.SourceView(buffer=None)


gtksourceview.SourceView inherits from gtk.TextView, so the answer is
yes.


cheers,
Giuseppe.

Hi Giuseppe.

Thank you very much, for your answer!

Best Regards.

Cristian



___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [Python-es] Recordar órdenes

2011-04-29 Thread craf
¡Hola a tod@s!

Estoy tratando de usar Python 3.1 desde el terminal. Mi problema actual
es que no consigo acceder a las órdenes anteriores mediante el uso de
las flechas de dirección, sino que tengo que tipearlas de nuevo. En
Python 2.6 podía tener acceso a esas órdenes mediante las flechas
arriba y abajo. ¿Hay alguna manera de hacerlo en 3.1?

Gracias.

Douglas

Hola Douglas.

Que raro, en el 3.1 debiera funcionar igual que en el 2.6. Por lo menos en mi 
equipo es así.
¿Lo has probado en otro equipo?

Saludos.


Cristian


___
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


Re: [pygtk] Number lines in a textview control

2011-04-28 Thread craf

you have to use gtksourceview rather than gtktextview:
http://www.pygtk.org/pygtksourceview/class-gtksourceview.html#method-gtksourceview--set-show-line-numbers
cheers,
Giuseppe.

Hi Giuseppe.

Thank for the information!

Regards

cristian




___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] Number lines in a textview control

2011-04-27 Thread craf
Hi.

I searched Google, but can not find a clear way of how to number lines
in a TextView control.
Any information you could give me an idea, thanks in advance!

Regards.

Cristian Abarzúa


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Re: [pygtk] pygoocanvas questions

2011-04-26 Thread craf
Hi to all,
I've a couple of questions regarding pygoocanvas. 
(I'm asking here but if there is a better place let me know! )

-suppose you have a canvas with many items (rects, text, lines), how
can i empty the canvas?

-with a GridItem I can create a grid with both vertical and horizontal
lines; is it possible to create a grid with only vertical lines

Thank you!
Pier
___

Hi Pier.

Tried to Goocanvas list?, is the same for Pygoocanvas. I'll leave the
links if you're interested.

list: http://mail.gnome.org/mailman/listinfo/goocanvas-list

Archives : http://mail.gnome.org/archives/goocanvas-list/

Regards.

Cristian Abarzúa

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

[OT] Disable creation of pyc files in DrPython

2011-04-20 Thread craf
Hi.

I wonder if anyone uses Python DrPython as editor.
I need to know if you can disable the creation of
Pyc files created by the program. In the Geany editor you can 
add the parameter -B, but not if it can in this editor.

Thanks in advance.

Regards

Cristian Abarzúa F

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [OT] Disable creation of pyc files in DrPython

2011-04-20 Thread craf


On 20.04.2011 15:21, craf wrote:
 Hi.

 I wonder if anyone uses Python DrPython as editor.
 I need to know if you can disable the creation of
 Pyc files created by the program. In the Geany editor you can
 add the parameter -B, but not if it can in this editor.

I don't know DrPython, but Python itself checks for the 
$PYTHONDONTWRITEBYTECODE environment variable. Perhaps you can run 
DrPython with a command like:

PYTHONDONTWRITEBYTECODE=1 drpython


HTH

Hi. Alexander.

Thanks for the information.


I'll prove it

Regards.

Cristian Abarzúa F

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [Python-es] CGI - importar clases

2011-04-17 Thread craf
-Mensaje original-
De: Jesús Genicio jgeni...@gmail.com
Reply-to: La lista de python en castellano python-es@python.org
Para: La lista de python en castellano python-es@python.org
Asunto: Re: [Python-es] CGI - importar clases
Fecha: Mon, 18 Apr 2011 00:34:08 +0200

El día 17 de abril de 2011 22:49, Daπid davidmen...@gmail.com escribió:
 En beneficio de la pedagogía, ¿por qué funciona? ¿Qué diferencia
 introduce el punto?
La respuesta está aquí [1] , o eso creo, pero no lo veo claro ¿
Alguna ayuda.?
[1] - http://docs.python.org/reference/simple_stmts.html#from
S2.

Hola Jesús.

Leyendo la información que apuntas, indica que cuando tienes un modulo
que se encuentra dentro de otro paquete, no es neceario colocar el
nombre del modulo que lo contiene al utilizar el punto.
Como dice el ejemplo, tienes un modulo mod dentro de un paquete pkg.
Si quieres llamar al modulo mod sin escribir el nombre del paquete, solo
escribes:

import .import mod que seria lo mismo que import pkg.mod

Saludos

___
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


Re: Python IDE/text-editor

2011-04-16 Thread craf
Look this:

http://portableapps.com/apps/development/geany_portable


Regards.

Cristian


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [pygtk] Whait is PyGObject

2011-04-11 Thread craf
-Mensaje original-
De: jors worby...@gmail.com
Para: craf pyclut...@gmail.com
Cc: pygtk@daa.com.au
Asunto: Re: [pygtk] Whait is PyGObject
Fecha: Mon, 11 Apr 2011 10:21:05 +0200

El dom, 10-04-2011 a las 22:15 -0300, craf escribió:
 Hi everyone
 
 
 I am an enthusiastic new user of Pygtk and I have been some doubts about
 the new module PyGObject.
 In Pygtk I managed to make some simple programs for my personal use and
 I have to say I fell in love with its simplicity and beauty.
 
 My first question has to do with PyGObject. What is?, and how to replace
 Pygtk?

Some useful links to read:

About GObject Introspection: http://live.gnome.org/GObjectIntrospection
About PyGObject: http://live.gnome.org/PyGObject
Blurb explanation:
http://www.daa.com.au/pipermail/pygtk/2010-September/019019.html

Hi.

Thanks for the replies and links.

Best Regards

Cristian

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

[pygtk] Resize the control panel

2011-04-11 Thread craf
Hi.

I'm trying the paned widget and let me know how I can change the size of
its panels. I've tried the following code:

#!/usr/bin/env python

import gtk

class Pane:
def __init__(self):
window = gtk.Window()
window.set_default_size(400,400)
pane = gtk.HPaned()

pane.set_position(200)
label1 = gtk.Label(Label 1)
label2 = gtk.Label(Label 2)
pane.add1(label1)
pane.add2(label2)

window.connect(destroy, lambda w: gtk.main_quit())

window.add(pane)
window.show_all()
Pane()
gtk.main()

This code works, but if I get the instructions:

window.set_default_size(400,400)

and adding

window.maximize()

The method set_position () not working.

I tried to use pack() rather than add(), but I only managed to focus the
dicision between the two panels, using options resize and shrink).

What am I doing wrong?,I need to refresh the window when this is
maximized?

Thanks in advance.

Regards.

Cristian



___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [Python-es] Lista de Django en español

2011-04-11 Thread craf
Hola Leonel.

Sinceramente pienso como tu. Lo ideal es que hubiera buena onda en la
lista, ya que es un punto de encuentro para todos aquellos que recién
empezamos en este fascinante mundo de Python. No conozco a los
moderadores de la Lista, pero me gustaría que incluyeran su opinión
sobre cual es la mejor forma de tratar con las preguntas Novatas.
Lo malo de algunas personas es que al molestarse con las preguntas, lo
que van generando es un miedo en las demás personas para preguntar. A
nadie le gusta pasar por ignorante, pero en realidad es con las
preguntas tontas con las que aprendemos, no con las inteligentes.
La riqueza de una lista es que todos pueden particpar, gordos, flacos,
listos, tontos etc. Todos somos una comunidad.

Saludos.

Cristian

-Mensaje original-
De: LEONEL GOMEZ leonel_garo...@hotmail.com
Reply-to: La lista de python en castellano python-es@python.org
Para: Python Foro python-es@python.org
Asunto: Re: [Python-es] Lista de Django en español
Fecha: Mon, 11 Apr 2011 19:08:59 +

Parece que este tipo de Andrei, solo quiere darse su importancia y que
todos toquemos el tema que mas le interesa, te aconsejo que crees tu
propia comunidad y que seas tu el lider de dicha comunidad y que toques
tu los temas que para ti sean de mayor importancia, crea tu propio
circulo y crea tu propio nicho, y a los demas dejalos en paz, si en
algun tema no te interesas simple y sencillamente no los leas, lee solo
los que sean de tu interes y listo, por que lloras tanto, pareces
niñita verrinchuda pidiendo que cumplan tus caprichos, ya deja
tranquilos a los demas, h, talvez alguien te nombro liderde ser
asi, me lo perdi y si ya se hizo el nombramiento, mejor mejor buscamos
otro foro donde los participantes tenga libertad de expresion.
 
Perdonen a todos, parece como si yo fuera politico, pero es que me cae
de bomba cuando alguien se cree lider y empieza a dominar un grupo.
 
Cualquier comentario tuyo despues de esto, no los respondere y tampoco
me interesa lo que pienses en adelante, es mas desde el principio
cuando vea tu destinatario sin pensar los enviare a mi bandeja de
eliminados..
 
Perdonen a todos y los insto a que sigan en el foro, en mi caso solo
leere los que me interesan y lo de los demas siempre mis respetos ya
que a mas de algun forista le interesara su tema.
 
 
Un saludo a la comunidad libre.
 
LG
 

 
 From: and...@gmail.com
 Date: Sat, 9 Apr 2011 21:15:34 +0200
 To: python-es@python.org
 Subject: Re: [Python-es] Lista de Django en español
 
 Hola Fernando,
 Si habras leido los ultimos tres mensajes, te estas metiendo donde no
te llaman!
 Y si pensaras un poquito, verias que tu mensaje esta fuera del tema.
 
 Te pondre 2 ejemplos:
 
 Estamos en una conferencia de software libre y viene uno de MS y dice,
 prueba mi Windows 7 aver que tal te parece? Notarias que este
 comentario seria fuera del tema, el tuyo esta enla misma situacion.
 Eso se define como SPAM.
 
 Si la pregunta fuera algo mas general, sobre plataformas de
 desarrollo, nadie te diria nada, pero es que la pregunta no fue en
 ningun momento dirigida a lo que tu escribiste.
 
 Y tal como ya han comentado los mensajes anteriores, la comunidad de
 web2py suele ser muy pesada, sin ser arrogante, tu eres un claro
 ejemplo. Y mi critica constructiva fue, en vez de dar tanto spam a
 algo que os gusta tanto, mejorar la documentacion, que creo que es uno
 de los grandes puntos negros de web2py... y no hara falta hacer spam,
 la gente leera y probara y lo usara.
 
 Yo uso varios fw, y en especial django, y ninguno de esos fw es
 web2py, y la principal razon, no es que sea malo, es que la
 documentacion es horrible.
 
 Si programara por hobbie, a lo mejor lo probaria, pero no me
 ariesgaria en ningun momento meterme en un proyecto comercial con
 web2py. ¿Por que? Mala documentacion, la poca comunidad que me he
 encontrado solo hace que spamear, en ves de resolver dudas y aportar
 al proyecto. (No digo que todos sean asi, pero es la impresion que da!
 Y es algo a mejorar).
 
 Solo he mencionado pocos puntos el por que web2py tiene tan mala
fama...
 
 En fin, este mensaje esta fuera de este hilo, asi que disculpen las
molestias.
 Un saludo.
 Andrei.
 
 El día 9 de abril de 2011 18:01, FERNANDO VILLARROEL
 fvillarr...@yahoo.com escribió:
  Hola Andrey.
 
  Amigo primero que nada bajate de tu limbo y tu arrogancia.
 
  Tampoco es bueno que hables de Web2py como SPAM ya que hasta donde
se esta lista es de discusion del lenguaje Python y ambos Django y
Web2py estan escritos en el mismo lenguaje por lo que esta lista tampoco
es exclusiva de Django.
 
  Y por ultimo sabras que el conocimiento es libre.
 
  Saludos.
 
  --- On Sat, 4/9/11, Andrey Antoukh and...@gmail.com wrote:
 
  From: Andrey Antoukh and...@gmail.com
  Subject: Re: [Python-es] Lista de Django en español
  To: La lista de python en castellano python-es@python.org
  Cc: FERNANDO VILLARROEL fvillarr...@yahoo.com
  Date: Saturday, April 9, 2011, 12:23 PM
  El 9 de 

[pygtk] Whait is PyGObject

2011-04-10 Thread craf
Hi everyone


I am an enthusiastic new user of Pygtk and I have been some doubts about
the new module PyGObject.
In Pygtk I managed to make some simple programs for my personal use and
I have to say I fell in love with its simplicity and beauty.

My first question has to do with PyGObject. What is?, and how to replace
Pygtk?


In Pygtk a simple code to create a window would be:

import gtk

window = gtk.Window()
window.show()
gtk.main()


This same code, how would in PyObject or no relationship?

My second question has to do with the shells of interface (Unity and
GNOME 3). Can I schedule for these managers Pygtk screen without
problems?.

Thanks in advance.

Regards.

Cristian


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [sqlite] Trouble inserting null value from txt file

2011-04-08 Thread craf
>-Mensaje original-
>De: Jean-Christophe Deschamps 
>Reply-to: General Discussion of SQLite Database
>
>Para: General Discussion of SQLite Database 
>Asunto: Re: [sqlite] Trouble inserting null value from txt file
>Fecha: Fri, 08 Apr 2011 19:40:07 +0200

>It's impossible when you use standard sqlite3 command line utility. In
>your particular case you have 2 options: either write your own
>application that will recognize some kind of value as null and insert
>it instead of plain text, or you can use temporary table like this:

>Another way is to use Pavel's suggestion to reserve some rare arbitrary 
>string and use an insert trigger to convert the value into actual SQL null.

>BTW, beware that triggers can slow down insert rate seriously.


Hi jean

Thanks and I will consider.

Regards.

Cristian

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Trouble inserting null value from txt file

2011-04-08 Thread craf
>-Mensaje original-
>De: Pavel Ivanov <paiva...@gmail.com>
>Para: General Discussion of SQLite Database <sqlite-users@sqlite.org>
>Cc: craf <pyclut...@gmail.com>
>Asunto: Re: [sqlite] Trouble inserting null value from txt file
>Fecha: Fri, 8 Apr 2011 13:34:25 -0400

> There is a way to insert null values from a file without specifying it
> in?

>It's impossible when you use standard sqlite3 command line utility. In
>your particular case you have 2 options: either write your own
>application that will recognize some kind of value as null and insert
>it instead of plain text, or you can use temporary table like this:

>CREATE TABLE tmp (name text);

>Then import data (without first column) into it, then execute the
>following statement:

>insert into t (name) select name from tmp;


>Pavel

Hi Pavel.

Excellent solution!, thank you very much for her.

Regards.

Cristian

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Trouble inserting null value from txt file

2011-04-08 Thread craf
Hi.

I'm new to SQLite and I am looking for a way to insert null data from
txt file.

My database is:

CREATE TABLE t (id integer primary key autoincrement,
name text);

The data in the file data.txt are:

null,"Peter"
null,"Xavier"


The problem occurs when I import the data:

sqlite>.separator ','
sqlite>.import data.txt t

The error that throws me is:

"Error: datatype mismatch"

It is due to null, but I tried to put as:

"null","Peter"
'null','Peter'
'','Peter'
 ,'Peter'

But none of these options recognizes me.

There is a way to insert null values ​​from a file without specifying it
in?

Sorry for my English!

Regards

Cristian

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Trouble inserting null value from txt file

2011-04-08 Thread craf
Hi.

I'm new to SQLite and I am looking for a way to insert null data from
txt file.

My database is:

CREATE TABLE t (id integer primary key autoincrement,
name text);

The data in the file data.txt are:

null,Peter
null,Xavier


The problem occurs when I import the data:

sqlite.separator ','
sqlite.import data.txt t

The error that throws me is:

Error: datatype mismatch

It is due to null, but I tried to put as:

null,Peter
'null','Peter'
'','Peter'
 ,'Peter'

But none of these options recognizes me.

There is a way to insert null values ​​from a file without specifying it
in?

Sorry for my English!

Regards

Cristian

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Trouble inserting null value from txt file

2011-04-08 Thread craf
-Mensaje original-
De: Pavel Ivanov paiva...@gmail.com
Para: General Discussion of SQLite Database sqlite-users@sqlite.org
Cc: craf pyclut...@gmail.com
Asunto: Re: [sqlite] Trouble inserting null value from txt file
Fecha: Fri, 8 Apr 2011 13:34:25 -0400

 There is a way to insert null values from a file without specifying it
 in?

It's impossible when you use standard sqlite3 command line utility. In
your particular case you have 2 options: either write your own
application that will recognize some kind of value as null and insert
it instead of plain text, or you can use temporary table like this:

CREATE TABLE tmp (name text);

Then import data (without first column) into it, then execute the
following statement:

insert into t (name) select name from tmp;


Pavel

Hi Pavel.

Excellent solution!, thank you very much for her.

Regards.

Cristian

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Trouble inserting null value from txt file

2011-04-08 Thread craf
-Mensaje original-
De: Jean-Christophe Deschamps j...@antichoc.net
Reply-to: General Discussion of SQLite Database
sqlite-users@sqlite.org
Para: General Discussion of SQLite Database sqlite-users@sqlite.org
Asunto: Re: [sqlite] Trouble inserting null value from txt file
Fecha: Fri, 08 Apr 2011 19:40:07 +0200

It's impossible when you use standard sqlite3 command line utility. In
your particular case you have 2 options: either write your own
application that will recognize some kind of value as null and insert
it instead of plain text, or you can use temporary table like this:

Another way is to use Pavel's suggestion to reserve some rare arbitrary 
string and use an insert trigger to convert the value into actual SQL null.

BTW, beware that triggers can slow down insert rate seriously.


Hi jean

Thanks and I will consider.

Regards.

Cristian

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [Python-es] [OT] Cargar información en una base de datos SQLite desde un archivo .sql

2011-04-08 Thread craf
-Mensaje original-
De: Gustavo Cabral gmcab...@gmail.com
Reply-to: La lista de python en castellano python-es@python.org
Para: La lista de python en castellano python-es@python.org
Asunto: Re: [Python-es] [OT] Cargar información en una base de datos
SQLite desde un archivo .sql
Fecha: Fri, 8 Apr 2011 08:28:13 -0300

El día 7 de abril de 2011 16:50, craf pyclut...@gmail.com escribió:
 Hola.

 Estoy probando la base de datos SQLite con python, y para cargarle datos
 he creado un archivo datos.sql, para insertarlos en una base de datos
 llamada bdatos.db

 La estructura del archivo datos.sql es:

 #-
 #Creación de Tabla y carga de datos

 create table into tabla
 (nombre, text,
 direccion text);

Amigo, creo que tienes una coma de más entre nombre y text



Hola Gustavo.

Gracias por la indicación , lo comprobaré en mi código.

Saludos.

Cristian

___
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


Re: [Python-es] Enviar imagenes mediante sockets

2011-04-08 Thread craf
-Mensaje original-
De: tny a.por...@gmail.com
Reply-to: La lista de python en castellano python-es@python.org
Para: La lista de python en castellano python-es@python.org
Asunto: Re: [Python-es] Enviar imagenes mediante sockets
Fecha: Fri, 08 Apr 2011 12:28:42 +0200

te recomiendo el siguiente libro:
Foundations of python network programming

Las imágenes se mandan como todos los datos binarios, el quid de la
cuestión es como informar al que va a recibir la imagen cuantos bits
tiene que leer.
Hay varias formas de hacerlo, y unas son más adecuadas para unas cosas y
otras para otras.

Yo mandaría al principio 4 bytes indicando el tamaño en bytes de la
imagen. (para pasar de int a bytes y de bytes a int struct.pack y
struct.unpack)

Hola Tny.

Es exactamente lo que quiero hacer!. Voy a ver que tal el libro que me 
recomiendas.

Muchas Gracias.

Saludos

Cristian

___
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


Re: [Python-es] Enviar imagenes mediante sockets

2011-04-07 Thread craf
-Mensaje original-
De: lopz lowlife...@gmail.com
Reply-to: La lista de python en castellano python-es@python.org
Para: La lista de python en castellano python-es@python.org
Asunto: Re: [Python-es] Enviar imagenes mediante sockets
Fecha: Thu, 7 Apr 2011 09:02:39 -0400

El día 6 de abril de 2011 23:57, Nekmo conta...@nekmo.com escribió:
 Tienes que poner rb en vez de r, y wb en vez de w. Sino lo guardará y
 leerá en ASCII, lo cual no es el resultado que buscas ;-)


Exacto, wb y rb la b de binary ;)

saludOS!

 Un cordial saludo:
 -- Nekmo.

 Sitio web: http://nekmo.com
 Dirección de contacto: conta...@nekmo.com
 XMPP/Jabber: conta...@nekmo.com
 Identi.ca: http://identi.ca/nekmo
 Diaspora: Nekmo



 El día 7 de abril de 2011 03:57, lopz lowlife...@gmail.com escribió:
 Pero enviar una imágen o cualquier binario no es lo mismo?

 No sé si diré alguna tontería pero no se puede hacer algo como:

 f = open('image.jpg', 'r')

 while True:
  buf = f.read(nro_bytes)
  if not buf:
  sock.send(buf)

 y desde el servidor, leer lo que se envíe, almacenar en un buffer y luego un

 img = open('image2.jpg, 'w')
 img.write(buffer)

 No se debería poder de esta forma?


 El día 6 de abril de 2011 21:51, Abraham Zamudio
 abraham.zamu...@gmail.com escribió:
 Es absolutamente necesario con sockets  ... porque me parece mas natural
 hacer con algun modulo  que implemente el paso de mensajes  : mpi4py .

 2011/4/6 craf pyclut...@gmail.com

 Hola.

 Estoy probando los sockets en Python y he visto la forma en como
 funciona para enviar string. Mi consulta es si alguien sabe en donde se
 puede encontrar algo de información sobre como enviar imágenes mediante
 Sockets. Utilizo Python 2.7 y he leído la información con respecto a los
 Sockets de la pagina web de Python, pero no logro comenzar.

 De ante manos muchas gracias por cualquier ayuda.

 Saludos.

 Cristian Abarzúa F


 ___
 Python-es mailing list
 Python-es@python.org
 http://mail.python.org/mailman/listinfo/python-es
 FAQ: http://python-es-faq.wikidot.com/



 --
 Abraham Zamudio Ch.


 ___
 Python-es mailing list
 Python-es@python.org
 http://mail.python.org/mailman/listinfo/python-es
 FAQ: http://python-es-faq.wikidot.com/





 --
 lopz es libre, usa -- GNU/linux gentoo

 +--[RSA 2048]--+
 |  ..o.o=+   |
 |   o =o*.+  |
 |  . . *oO .  |
 | .EBoo  |
 |  o.S |
 +--[lopz.org]--+
 ___
 Python-es mailing list
 Python-es@python.org
 http://mail.python.org/mailman/listinfo/python-es
 FAQ: http://python-es-faq.wikidot.com/

 ___
 Python-es mailing list
 Python-es@python.org
 http://mail.python.org/mailman/listinfo/python-es
 FAQ: http://python-es-faq.wikidot.com/



Hola, y gracias a todos por las acotaciones.

Si, tiene que ser por sockets, ya que se trata de
accesar una base de datos Sqlite en otro computador al cual
se le solicita la dirección o la imagen almacenada en ella.

Saludos

Cristian



___
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


[Python-es] Mejor forma de almacenar imagenes en Sqlite

2011-04-07 Thread craf
Hola.

En estos momentos estoy probando con Sqlite para
almacenar imágenes en el.
Mi duda surge ya que al ir almacenando dichas imágenes, el tamaño de la
base de datos va creciendo. He leído varias discusiones sobre si
conviene o no guardarlas en la BD, así como que no es bueno y solo se
debiera guardar los enlaces a dichas imágenes , y estas guardarlas en
una carpeta.
¿Alguien podría darme algunas luces, sobre cual forma es la mas óptima?.

Saludos.

Cristian

___
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


Re: [Python-es] Mejor forma de almacenar imagenes en Sqlite

2011-04-07 Thread craf
Muchas gracias por la aclaración!, voy a enfocarlo como ustedes lo han
probado.

Saludos.

Cristian



___
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


[Python-es] [OT] Cargar información en una base de datos SQLite desde un archivo .sql

2011-04-07 Thread craf
Hola.

Estoy probando la base de datos SQLite con python, y para cargarle datos
he creado un archivo datos.sql, para insertarlos en una base de datos
llamada bdatos.db

La estructura del archivo datos.sql es:

#-
#Creación de Tabla y carga de datos

create table into tabla
(nombre, text,
direccion text);

#Inserción de los datos

insert into tabla values('pepo','Lagos 2815'),
('patricio','Las Lomas 231');

#-

Luego cargo el archivo así:

$./sqlite3 bdatos.db #Abro la base de datos
sqlite .read datos.sql  # Leo el archivo

Luego me arroja el error;

Error:near line 1: near ,: syntax error

Bueno, creo que me arroja error por separar las tuplas mediante una
coma, pero el problema es que antes lo podía hacer y ahora alega por la
separación con ,.

En este momento uso la versión de SQLite 3.7.5

Desde ya muchas gracias.


Saludos

Cristian


___
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


Re: [Python-es] Mejor forma de almacenar imagenes en Sqlite

2011-04-07 Thread craf
Muchas Gracias Andrey por el Dato!. No tenia idea de que eran las BD
nosql.

Saludos

Cristian
-Mensaje original-
De: Andrey Antoukh and...@gmail.com
Reply-to: La lista de python en castellano python-es@python.org
Para: mlacu...@gmail.com, La lista de python en castellano
python-es@python.org
Asunto: Re: [Python-es] Mejor forma de almacenar imagenes en Sqlite
Fecha: Thu, 7 Apr 2011 20:26:01 +0200

Otra opcion es usar GridFS de MongoDB o CouchDB que te permiten de
manera simple tener ficheros binarios en la base de datos.

Andrei.
Un saludo.

El día 7 de abril de 2011 18:29, Mario Lacunza mlacu...@gmail.com escribió:
  Bueno yo siempre almaceno las imagenes en un dir aparte, solo los
 paths+nombres en la BD y creo aleatoriamente los nombres de las imagenes
 sobre todo si son subidas por users para evitar duplicados.

 Este procedimiento lo uso con cualquier DB

 Saludos / Best regards

 Mario Lacunza
 Email:: mlacu...@gmail.com
 Personal Website:: http://www.lacunza.biz/
 OpenOffice.org:: http://es.openoffice.org/
 OpenOffice.org Perú:: http://openoffice-peru.com/
 Hosting:: http://mlv-host.com/
 Mascotas Perdidas:: http://mascotas-perdidas.com/
 Google Talk: mlacunzav Skype: mlacunzav
 MSN: mlacun...@hotmail.com Y! messenger: mlacunzav


 On 07/04/11 11:09, craf wrote:

 Hola.

 En estos momentos estoy probando con Sqlite para
 almacenar imágenes en el.
 Mi duda surge ya que al ir almacenando dichas imágenes, el tamaño de la
 base de datos va creciendo. He leído varias discusiones sobre si
 conviene o no guardarlas en la BD, así como que no es bueno y solo se
 debiera guardar los enlaces a dichas imágenes , y estas guardarlas en
 una carpeta.
 ¿Alguien podría darme algunas luces, sobre cual forma es la mas óptima?.

 Saludos.

 Cristian

 ___
 Python-es mailing list
 Python-es@python.org
 http://mail.python.org/mailman/listinfo/python-es
 FAQ: http://python-es-faq.wikidot.com/

 ___
 Python-es mailing list
 Python-es@python.org
 http://mail.python.org/mailman/listinfo/python-es
 FAQ: http://python-es-faq.wikidot.com/







___
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


Re: [Python-es] [OT] Cargar información en una base de datos SQLite desde un archivo .sql

2011-04-07 Thread craf


-Mensaje original-
De: Andrey Antoukh and...@gmail.com
Reply-to: La lista de python en castellano python-es@python.org
Para: La lista de python en castellano python-es@python.org
Asunto: Re: [Python-es] [OT] Cargar información en una base de datos
SQLite desde un archivo .sql
Fecha: Thu, 7 Apr 2011 23:04:49 +0200

Hola craf!

Te recomendaría que leyeras y aprendieras las cosas como la mayoría de
la gente hace, autofomandose o pagando una clase.

¿Entonces para que está la lista?

Esto es una lista de usuarios, no el soporte técnico, ni mucho menos
profesorado a distancia, las dudas que estas preguntando son
fácilmente resolubles con una búsqueda en google. O lectura de la
propia documentación de python o sqlite en este caso.

Conozco Google, se como buscar y creeme he buscado por lo que preguntaba,(
Si en la consulta iba una simple coma o no.)

Reiteradamente ya he repetido en esta lista, no quiero generalizar
pero muchos de los que la formamos, somos gente que trabaja, y ademas,
perder tiempo explicando algo que ya esta mil veces explicado dudo
mucho que quiera hacerlo cualquiera.

Veo que eres un hombre ocupado y te molestas porque alguien hace una pregunta 
que tu consideras mil veces resuelta.
Creeme, también trabajo como tu y me encanta ayudar a cualquiera que necesite 
una mano, y no me importa si es una pregunta que se ha echo mil veces.
Como te fijaras y algunos parece que no lo hicieron, antes del encabezado del 
mensaje agregué [OT], por lo que si considerabas que lo que preguntaba
no tenía nada que ver con Python o era demasiado sencilla, simplemente estabas 
en tu derecho de no contestar.

En fin, no te ofendas, solo que te animo que pongas de tu parte y
hagas el esfuerzo al menos de buscar y informarte de la documentación
existente antes de plantar la duda a la lista.

Para nada me ofendo, pero también te pediría que fueras un poco mas paciente, 
ya que no todo el mundo posee a lo mejor tus conocimientos.

Saludos.

Cristian



Un saludo.
Andrei.

El día 7 de abril de 2011 22:45, lasizoillo lasizoi...@gmail.com escribió:
 Para hacerlo más cercano a python:
 http://docs.python.org/library/sqlite3.html

 El día 7 de abril de 2011 21:50, craf pyclut...@gmail.com escribió:
 Hola.

 Estoy probando la base de datos SQLite con python, y para cargarle datos
 he creado un archivo datos.sql, para insertarlos en una base de datos
 llamada bdatos.db

 La estructura del archivo datos.sql es:

 #-
 #Creación de Tabla y carga de datos

 create table into tabla
 (nombre, text,
 direccion text);


 Si pruebo eso me da un error en el into. Aparte de eso se crea una
 tabla con tres campos: nombre y text, que no se sabe de que tipo son;
 y dirección de tipo text.

 #Inserción de los datos

 insert into tabla values('pepo','Lagos 2815'),
('patricio','Las Lomas 231');

 #-

 Como ya te ha comentado chema, no hay soporte. Cosa que se ve
 claramente en su respectiva documentación:
 http://www.sqlite.org/lang_insert.html

 A este enlace se puede llegar a partir del enlace de sqlite3 de la
 documentación de python.

 Saludos:

 Javi
 ___
 Python-es mailing list
 Python-es@python.org
 http://mail.python.org/mailman/listinfo/python-es
 FAQ: http://python-es-faq.wikidot.com/







___
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


[Python-es] Enviar imagenes mediante sockets

2011-04-06 Thread craf
Hola.

Estoy probando los sockets en Python y he visto la forma en como
funciona para enviar string. Mi consulta es si alguien sabe en donde se
puede encontrar algo de información sobre como enviar imágenes mediante
Sockets. Utilizo Python 2.7 y he leído la información con respecto a los
Sockets de la pagina web de Python, pero no logro comenzar.

De ante manos muchas gracias por cualquier ayuda.

Saludos.

Cristian Abarzúa F


___
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


Re: [Tkinter-discuss] Treeview with a single column header

2011-04-06 Thread craf
-Mensaje original-
De: Emiliano Gavilán emilianogavi...@gmail.com
Para: tkinter-discuss@python.org
Asunto: Re: [Tkinter-discuss] Treeview with a single column header
Fecha: Wed, 6 Apr 2011 17:49:09 -0300

...
 The problem is that the title puts me in a second column and the data in
 the first.

The 'text' option of the insert method is for the tree column. To insert
values on the other columns use the 'values' option, or the set method
after the item is inserted.

You can also control whether the tree column is shown or not with the
'show' option.

--CODE--

import Tkinter
import ttk

master = Tkinter.Tk()

# add  show=['headings']  to hide the tree column
tabla = ttk.Treeview(master, columns=['widgets'])
tabla.heading('widgets', text='Item')
tabla.pack()

item = tabla.insert('', 0, text='In the tree', values=['date1'])
# values can be left out and instead use
# tabla.set(item, 'widgets', 'date1')

master.mainloop()

--CODE--

Regards
Emiliano

Hi Emiliano.

Thanks for the information!

Regards.

Cristian


___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss


Sending pictures using sockets

2011-04-06 Thread craf
Hello.

I'm testing the sockets in Python and I've seen the way in which
works to send string. My question is if anyone knows where
can find some information on how to send pictures through
Sockets. I use Python 2.7 and have read the information regarding
Sockets of the Python website, but I can not begin.

Any help is welcome

Greetings.

Cristian Abarzúa F

-- 
http://mail.python.org/mailman/listinfo/python-list


[Tkinter-discuss] Treeview with a single column header

2011-04-05 Thread craf
I'm testing the treeview widget, and I want to display data in a single
column with a header.

My code to do this is:

--CODE---

import Tkinter
import ttk

master = Tkinter.Tk()

tabla = ttk.Treeview(master, columns=('widgets'))
tabla.heading('widgets', text='Item')
tabla.pack()

tabla.insert('',0,'widgets', text=date1)

master.mainloop()



The problem is that the title puts me in a second column and the data in
the first.

Can be done?

Regards.

Cristian Abarzúa  

___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss


[Python-es] Consulta sobre PyGObject

2011-04-04 Thread craf
Hola.

Veo que en la pagina web de Pygtk se recomienda que las personas que
comienzan a programar con PyGtk usen la instrospección PyGOject.
Pregunta: ¿Alguien sabe que es PyGObject?, ¿Porqué es mejor?, y ¿donde
se puede leer algo mas completo que lo que hay en la web de PyGtk?

Desde ya muchas gracias.

Saludos.

Cristian Abarzúa

___
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


Another location of the PyGTK tutorial

2011-04-03 Thread craf
Hi.

Anyone know if the pygtk tutorial that was in this direction
http://www.learnpygtk.org/pygtktutorial/index.html,  can be located
elsewhere.

Regards.

Cristian

-- 
http://mail.python.org/mailman/listinfo/python-list


Another location of the PyGTK tutorial

2011-04-03 Thread craf
Hi.

Anyone know if the pygtk tutorial that was in this direction
http://www.learnpygtk.org/pygtktutorial/index.html,  can be located
elsewhere.

Regards.

Cristian

-- 
http://mail.python.org/mailman/listinfo/python-list


about Pyclutter

2011-04-03 Thread craf
Hi

Does anyone know how mature is Pyclutter?.

Regards

Cristian Abarzúa 

-- 
http://mail.python.org/mailman/listinfo/python-list


[Fwd: Re: Another location of the PyGTK tutorial]

2011-04-03 Thread craf
¡Thank you very much Dotan!

Regards.

Cristian
- Mensaje reenviado 
 De: Dotan Cohen dotanco...@gmail.com
 Para: craf p...@vtr.net
 Cc: Python Ingles python-list@python.org
 Asunto: Re: Another location of the PyGTK tutorial
 Fecha: Sun, 3 Apr 2011 13:40:35 +0300
 
 http://gitorious.org/pygtk-tutorial
 
 On Fri, Apr 1, 2011 at 21:03, craf p...@vtr.net wrote:
  Hi.
 
  Anyone know if the pygtk tutorial that was in this direction
  http://www.learnpygtk.org/pygtktutorial/index.html,  can be located
  elsewhere.
 
  Regards.
 
  Cristian
 
  --
  http://mail.python.org/mailman/listinfo/python-list
 
 
 
 
 -- 
 Dotan Cohen
 
 http://gibberish.co.il
 http://what-is-what.com


-- 
http://mail.python.org/mailman/listinfo/python-list


[Fwd: Re: about Pyclutter]

2011-04-03 Thread craf
Thanks for the answer.

Regards.

Cristian
- Mensaje reenviado 
 De: Blockheads Oi Oi breamore...@yahoo.co.uk
 Para: python-list@python.org
 Asunto: Re: about Pyclutter
 Fecha: Sun, 03 Apr 2011 11:41:32 +0100
 
 On 02/04/2011 17:54, craf wrote:
  Hi
 
  Does anyone know how mature is Pyclutter?.
 
  Regards
 
  Cristian Abarzúa
 
 
 I don't kow about mature but from 
 http://wiki.clutter-project.org/wiki/PyClutter.
 
 WARNING: PyClutter only covers the 1.0 API, and it is going to be 
 deprecated in favour of introspection-based bindings using PyGObject.
 
 HTH.
 
 Mark L.
 


-- 
http://mail.python.org/mailman/listinfo/python-list


[Python-es] Acerca de Pyclutter

2011-04-02 Thread craf
Hola.

He visto que existe una librería llamada pyclutter, que permite crear
interfaces dinámicas para escritorios. ¿Alguien la ha probado?.

Saludos.

Cristian

___
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


About list Pyclutter

2011-04-02 Thread craf
Hi.

Does anyone know if pyclutter has a mailing list?

Regards.

Cristian Abarzúa

-- 
http://mail.python.org/mailman/listinfo/python-list


site Pytgtk

2011-04-02 Thread craf
Hi.

Gtk tutorial on who was in this direction was excellent:
http://www.learnpygtk.org/pygtktutorial/index.html. Does anyone know by
chance if you are in pdf or moved to another site?

Regards.

Cristian Abarzúa F.

-- 
http://mail.python.org/mailman/listinfo/python-list


Prueba de correo

2011-04-02 Thread craf


-- 
http://mail.python.org/mailman/listinfo/python-list


[Tkinter-discuss] [Fwd: Re: justify text in Text widget]

2011-02-16 Thread craf
- Mensaje reenviado 
 De: Michael Lange klappn...@web.de
 Para: tkinter-discuss@python.org
 Asunto: Re: [Tkinter-discuss] justify text in Text widget
 Fecha: Tue, 15 Feb 2011 21:45:04 +0100
 
 Thus spoketh Michael O'Donnell michael.odonn...@uam.es 
 unto us on Tue, 15 Feb 2011 21:09:03 +0100:
 
  I had a look at the tcl8.6 page (the most recent version)
  and it only allows -justify: left, right or center.
 
 As far as I see, there is no such option for the widget as a whole, but
 only for a particular tag. So in order to right-justify the contents of a
 text widget you will need to do:
 
 textwidget.tag_configure('sometag', justify='right')
 textwidget.tag_add('sometag', 1.0, 'end')
 
 The problem here is that you will have to do this explicitely every time
 some new text is inserted into the text widget. Even worse, you will have
 to find a way to automatically keep track of the widget's contents.
 
 I don't know if there is a way to configure the text's default tag so
 you will only have to do this once.
 
 Regards
 
 Michael
 
 
 .-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.
 
 After a time, you may find that having is not so pleasing a thing,
 after all, as wanting.  It is not logical, but it is often true.
   -- Spock, Amok Time, stardate 3372.7
 ___
 Tkinter-discuss mailing list
 Tkinter-discuss@python.org
 http://mail.python.org/mailman/listinfo/tkinter-discuss

Thanks for the info!

Regards

Cristian

___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss


[Tkinter-discuss] justify text in Text widget

2011-02-15 Thread craf
Hi.

Is there any possibility to justify the text within a Text control?. In
my example code, I set the text using the wrap option value 'word'

Code:--

import Tkinter

master = Tkinter.Tk()
master.geometry('150x100')
t = Tkinter.Text(master, wrap='word')
t.pack(side='top', fill='both')

master.mainloop()


Thanks in advance.!

Regards

Cristian Abarzúa F.

---
S.O: Ubuntu 9.10
Python 2.7
Gnome 2.28
Tkinter 8.5


___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss


[Python-es] [Fwd: Re: Problema de empaquetado]

2011-02-11 Thread craf
- Mensaje reenviado 
 De: Arnau Sanchez pyar...@gmail.com
 Reply-to: La lista de python en castellano python-es@python.org
 Para: python-es@python.org
 Asunto: Re: [Python-es] Problema de empaquetado
 Fecha: Fri, 11 Feb 2011 18:30:52 +0100
 
 On Thu, 10 Feb 2011 20:34:18 -0300 craf wrote:
 
  Si lo ejecuto y deslizo la barra de ajuste de tamaño hacia la derecha,
  el botón no desaparece y solo se superpone.
 
  hbox.pack_end(btn, False)
 
 Juega con ese pack_end(), seguramente glade esté activando su expand y fill
 (lo puedes mirar en las propiedades del widget)
 
 hbox.pack_end(btn, expand=True, fill=True)
 ___
 Python-es mailing list
 Python-es@python.org
 http://mail.python.org/mailman/listinfo/python-es
 FAQ: http://python-es-faq.wikidot.com/

Gracias Arnau.

Si genero la interfaz con Glade, también sucede el mismo problema.
expand y fill no surten efecto.

Gracias de todas maneras.

Saludos

Cristian Abarzúa 

___
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


[Python-es] Problema de empaquetado

2011-02-10 Thread craf
Hola.

Estoy tratando de empaquetar algunos controles, utilizando para ello
Pygtk. 
El código es el siguiente:

-
#!/usr/bin/env python

import gtk

class App:
def __init__(self):
window = gtk.Window()
window.set_default_size(200, 200)

hpaned = gtk.HPaned()
hpaned.set_position(50)
window.add(hpaned)

vbox = gtk.VBox()
hpaned.add2(vbox)

frame = gtk.Frame()
hpaned.add1(frame)

hbox = gtk.HBox()
vbox.pack_start(hbox, False)

btn = gtk.Button('Clicked')
hbox.pack_end(btn, False)

window.show_all()

window.connect(destroy, lambda w: gtk.main_quit())
App()
gtk.main()
-
Si lo ejecuto y deslizo la barra de ajuste de tamaño hacia la derecha,
el botón no desaparece y solo se superpone.

Al crear esta misma configuración con Glade, no sucede el problema.

Desde ya, muchas gracias por cualquier idea.

Saludos.

Cristian Abarzúa F

S.O : Ubuntu 9.10
Desktop : Gnome 2.28
Python : 2.6.4

___
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


[Python-es] Averiguar version de python desde script

2011-02-08 Thread craf
Hola.

¿Existe alguna forma de averiguar que versión de Python está
ejecutándose, mediante un script de Python?.
Por consola se que se puede ejecutar Python -V.

Desde ya, muchas gracias.

Saludos.

Cristian Abarzúa F.

S.O : Ubuntu 9.10
Python : 2.6.4
Gnome: 2.28.0

___
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


[Python-es] [Fwd: Averiguar version de python desde script]

2011-02-08 Thread craf
- Mensaje reenviado 
 De: craf p...@vtr.net
 Reply-to: La lista de python en castellano python-es@python.org
 Para: Python España python-es@python.org
 Asunto: [Python-es] Averiguar version de python desde script
 Fecha: Tue, 08 Feb 2011 20:02:33 -0300
 
 Hola.
 
 ¿Existe alguna forma de averiguar que versión de Python está
 ejecutándose, mediante un script de Python?.
 Por consola se que se puede ejecutar Python -V.
 
 Desde ya, muchas gracias.
 
 Saludos.
 
 Cristian Abarzúa F.
 
 S.O : Ubuntu 9.10
 Python : 2.6.4
 Gnome: 2.28.0
 
 ___
 Python-es mailing list
 Python-es@python.org
 http://mail.python.org/mailman/listinfo/python-es
 FAQ: http://python-es-faq.wikidot.com/

¡Muchas gracias! a Sergio, Santiago y Jose, por los datos.

Saludos.

Cristian Abarzua F

___
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


Re: [Python-es] pestañas en interfaz gráfica con tkinter

2011-02-03 Thread craf
-Mensaje original-
De: Spectrum Cuarenta y ocho k s_...@yahoo.com
Reply-to: La lista de python en castellano python-es@python.org
Para: python-es@python.org
Asunto: [Python-es] pestañas en interfaz gráfica con tkinter
Fecha: Thu, 3 Feb 2011 02:53:07 -0800 (PST)

http://www.java2s.com/Code/PythonImages/TkinterCheckbuttoninPmwGroup.PNG

Si se puede pero tienes que trabajar con el modulo ttk que viene con la
distribucion de Pyhton 2.7 en adelante.
Active Python viene con un instalador para Windows y Linux.

Aquí un ejemplo:

import Tkinter
import ttk

master = Tkinter.Tk()

notebook = ttk.Notebook(master)
notebook.pack(fill='both', expand='yes')
frame1 = ttk.Frame(notebook)
frame2 = ttk.Frame(notebook)

notebook.add(frame1, text='Uno')
notebook.add(frame2, text='Uno')


master.geometry('200x200')
master.mainloop()


Saludos.

Cristian Abarzúa F

___
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


[Tkinter-discuss] How to avoid screen flicker when using themes

2011-01-27 Thread craf
Hi everyone.

I am currently learning to use themes or skins for ttk controls on a PC
with Ubuntu.

The code I attached, place a vertical and horizontal panedwindow
control. The theme I use is 'clam'.


CODE:==

#! /usr/bin/env python
# -*- encoding: utf-8 -*-

import Tkinter
import ttk

class App:

def __init__(self, master):

self.root = master

# FRAME_MASTER--
self.frame_master = ttk.Frame(self.root, style='TFrame')
self.frame_master.pack(fill=both, expand='yes')

# PANED_H---
self.paned_h = ttk.Panedwindow(self.frame_master,
   orient='horizontal',
   style='TPanedwindow',
   )

self.paned_h.pack(fill='both', expand='yes')

# PANED_V---
self.paned_v = ttk.Panedwindow(self.paned_h,
   orient='vertical',
   style='v.TPanedwindow')

self.paned_v.pack(fill='both', expand='yes')

# TREEVIEW
self.frame_treeview = ttk.Frame(self.paned_v)
self.frame_treeview.pack(fill='both', expand='yes')

# FRAME_TEXTEDITOR--
self.frame_texteditor = ttk.Frame(self.paned_v)
self.frame_texteditor.pack(fill='both', expand='yes')

self.paned_v.add(self.frame_treeview)
self.paned_v.add(self.frame_texteditor)

# FRAME-
self.frame_v = ttk.Frame(self.paned_h,
 style='frame_v.TFrame')
self.frame_v.pack(fill='both', expand='yes')

self.paned_h.add(self.paned_v)
self.paned_h.add(self.frame_v)

self.root.wait_visibility(self.root)
self.root.update_idletasks()
self.paned_h.sashpos(0,200)
self.paned_v.sashpos(0,400)

master = Tkinter.Tk()

#THEME--
s = ttk.Style()
s.theme_use('clam')
s.configure('frame_v.TFrame', background='#EFEBE7')
s.configure('TFrame', background='#EFEBE7')
s.configure('TPanedwindow', background='#EFEBE7')

# MAXIMIZED WINDOW
master.attributes('-zoomed',1)

app = App(master)
master.mainloop()


PROBLEM:

When you run the program first and then draw the controls are applied to
the selected topic.

The problem that occurs is that the color you have selected is different
from that comes with the theme 'clam', which is gray.

Because of this, there is a flicker when the subject applies to
controls.

There any way to avoid this flicker.

Thanks in advance.!

Regards.

Cristian Abarzúa F.

___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss


[Tkinter-discuss] [Fwd: Re: Modify the Tab Order]

2011-01-07 Thread craf
Thanks, Andrei.!

Regards.

Cristian Abarzua F.

 De: Nemes Andrei teh_sh_meis...@yahoo.com
 Para: craf p...@vtr.net
 Asunto: Re: [Tkinter-discuss] Modify the Tab Order
 Fecha: Thu, 6 Jan 2011 21:13:40 -0800 (PST)
 
 Oh, I forgot, you can still use the pack method too if you want ti. It
 just matters the order you create them in. Note that you don't have to
 pack them immediately after creation. I took the liberty of rearanging
 your code a bit.
 
 
 import Tkinter
 import ttk
 
 
 master = Tkinter.Tk()
 
 
 b2 = Tkinter.Button(master, text='Two')
 b1 = Tkinter.Button(master, text='One')
 
 
 b1.pack(side='right')
 b2.pack(side='right')
 
 
 
 
 master.mainloop()
 
 
 Andrei.
 
 
 __
 From: craf p...@vtr.net
 To: Python Tkinter Ingles tkinter-discuss@python.org
 Sent: Fri, January 7, 2011 1:49:31 AM
 Subject: [Tkinter-discuss] Modify the Tab Order
 
 Hi.
 
 I wonder if you can change the tab order, first, pass the button 'two'
 and then the button 'one', without changing the pack of buttons.
 
 CODE:--
 
 import Tkinter
 import ttk
 
 master = Tkinter.Tk()
 
 b1 = Tkinter.Button(master, text='One')
 b1.pack(side='right')
 
 b2 = Tkinter.Button(master, text='Two')
 b2.pack(side='right')
 
 
 master.mainloop()
 -
 
 It's posibble this?.
 
 Regards
 
 Cristian Abarzua.
 
 ___
 Tkinter-discuss mailing list
 Tkinter-discuss@python.org
 http://mail.python.org/mailman/listinfo/tkinter-discuss
 
 
 


___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss


[Tkinter-discuss] [Fwd: Problems with hotkeys]

2011-01-07 Thread craf
- Mensaje reenviado 
 De: craf p...@vtr.net
 Para: Python Tkinter Ingles tkinter-discuss@python.org
 Asunto: [Tkinter-discuss] Problems with hotkeys
 Fecha: Fri, 07 Jan 2011 20:18:05 -0300
 
 Hi.
 
 I'm trying to use the hotkeys access to controls.
 
 My code is as follows:
 
 -
 import Tkinter
 
 class App:
 def __init__(self, master):
 self.root = master
 
 self.entry = Tkinter.Entry(self.root)
 self.entry.pack()
 self.entry.focus_set()
 
 self.b1 = Tkinter.Button(self.root, text='One', underline=0)
 self.b1.pack()
 
 self.b2 = Tkinter.Button(self.root, text='Two', underline=0)
 self.b2.pack()
 
 self.b3 = Tkinter.Button(self.root, text='Three', underline=1)
 self.b3.pack()
 
 self.b1.bind('Alt_Lo', lambda e, widget=self:one(widget))
 self.b2.bind('Alt_Lt', lambda e, widget=self:two(widget))
 self.b3.bind('Alt_Lh', lambda e, widget=self:three(widget))
 
 def one(widget):
 widget.entry.focus
 widget.root.title('Press Button One')
 
 def two(widget):
 widget.root.title('Press Button Two')
 
 def three(widget):
 widget.root.title('Press Button Three')
 
 master = Tkinter.Tk()
 master.geometry('640x480')
 app = App(master)
 master.mainloop()
 
 
 1. The entry control has focus when you open the application.
 
 2. The hotkeys for the buttons work only if they have focus
 
 There is a way of pressing a key combination without the focus this on
 the button that has focus at that time?
 
 
 Thanks and advance.
 
 Regards.
 
 Cristian Abarzúa
 
 ___
 Tkinter-discuss mailing list
 Tkinter-discuss@python.org
 http://mail.python.org/mailman/listinfo/tkinter-discuss

Hi.

I answer:

modify this:

self.b1.bind('Alt_Lo', lambda e, widget=self:one(widget))
self.b2.bind('Alt_Lt', lambda e, widget=self:two(widget))
self.b3.bind('Alt_Lh', lambda e, widget=self:three(widget))

for this:

self.root.bind('Alt_Lo', lambda e, widget=self:one(widget))
self.root.bind('Alt_Lt', lambda e, widget=self:two(widget))
self.root.bind('Alt_Lh', lambda e, widget=self:three(widget))

Regards.

Cristian Abarzúa F.



___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss


[Tkinter-discuss] Modify the Tab Order

2011-01-06 Thread craf
Hi.

I wonder if you can change the tab order, first, pass the button 'two'
and then the button 'one', without changing the pack of buttons.

CODE:--

import Tkinter
import ttk

master = Tkinter.Tk()

b1 = Tkinter.Button(master, text='One')
b1.pack(side='right')

b2 = Tkinter.Button(master, text='Two')
b2.pack(side='right')


master.mainloop()
-

It's posibble this?.

Regards

Cristian Abarzua.

___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss


[Tkinter-discuss] Use underline

2010-12-29 Thread craf
Hi.

I wonder how I can run the code button when you press alt-h.
Use underline, but I can not connect.

code:

import Tkinter

class App:
def __init__(self, master):
self.root = master
b = Tkinter.Button(self.root, text='Hello', underline=0)
b.pack()
b.bind('Button-1', function)

def function(event):
print 'Ok'

master = Tkinter.Tk()
app = App(master)
master.mainloop()

thanks in advance

Regards.

Cristian Abarzúa


___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss


[Tkinter-discuss] [Fwd: Re: Use underline]

2010-12-29 Thread craf
- Mensaje reenviado 
 De: pyt...@bdurham.com
 Para: craf p...@vtr.net, Python Tkinter Ingles
 tkinter-discuss@python.org
 Asunto: Re: [Tkinter-discuss] Use underline
 Fecha: Wed, 29 Dec 2010 13:52:08 -0500
 
 Cristian,
 
 You have to bind your Alt key presses separately. The underline= only
 underlines the letter - it does not bind to an event handler.
 
 Here's a snippet that may give you some ideas. Disclaimer: I'm not sure
 if its best practice or not.
 
 Malcolm
 
 
 
 Treat Alt+I as a shortcut keystroke for the Insert button
 
 
 import Tkinter as tk
 import ttk
 
 def onClick( event=None ):
   if event:
   print event.keysym, event.keysym_num, event.state
 
   # event.state == 131104 regardless of left or right alt
   key 
   if event.keysym == 'i' and event.state == 131104:
   pass
   else:
   return
   
   button1.focus_set()
   entry1.delete( 0, 'end' )
   entry1.insert( 'end', 'Open clicked' )
 
 root = tk.Tk()
 
 style = dict( padx=24, pady=24 )
 entry1 = tk.Entry( root )
 entry1.pack( **style )
 entry2 = tk.Entry( root )
 entry2.pack( **style )
 
 button1 = ttk.Button( root, text='Insert text', underline=0,
 command=onClick )
 button1.pack( **style )
 
 # bind shortcut keystrokes at the outermost container
 root.bind( 'Key', onClick )
 
 root.mainloop()

Thanks Malcom for the Tips!

Regards.

Cristian Abarzúa F.


___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss


[Tkinter-discuss] [Fwd: Re: Change control styles ttk.Scrollbar]

2010-12-23 Thread craf
- Mensaje reenviado 
 De: Michael Lange klappn...@web.de
 Para: tkinter-discuss@python.org
 Asunto: Re: [Tkinter-discuss] Change control styles ttk.Scrollbar
 Fecha: Thu, 23 Dec 2010 18:53:48 +0100
 
 Hi,
 
 Thus spoketh craf p...@vtr.net 
 unto us on Thu, 23 Dec 2010 10:49:27 -0300:
 
  Hi.
  
  Is it possible to change the background color of a control
  ttk.Scrollbar?.
  In its standard options is Style, but this seems not to work:
  
  Example:
  
  s.configure('TScrollbar', background='#cc') no works.
  
  Thanks in advance.
 
 Can you show a more detailed example of what you wanted to schieve and
 what exactly happened?
 I tried this short snippet, which works as expected:
 
 from Tkinter import *
 import ttk
 
 root = Tk()
 s=ttk.Style()
 s.configure('TScrollbar', background='red')
 sb = ttk.Scrollbar(root)
 sb.pack(side='right', fill='y')
 root.mainloop()
 
 Regards
 
 Michael
 
 
 .-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.
 
 No one wants war.
   -- Kirk, Errand of Mercy, stardate 3201.7
 ___
 Tkinter-discuss mailing list
 Tkinter-discuss@python.org
 http://mail.python.org/mailman/listinfo/tkinter-discuss

Thanks Michael!

Not because my example was not working and if yours.
Anyway, your example helped me.

Regards.

Cristian




___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss


[Tkinter-discuss] [Fwd: Off Topic : Tkinter in everyday life]

2010-12-20 Thread craf
Hi.

I want to thank everyone for the excellent feedback to my questions.
I think we all share the view that Tkinter is a rough diamond.

Through all the examples that have selflessly shared, I can see that
their limitations are given only by the limits of our imagination.

it has been refreshing to find a forum where the level of the questions
does not matter.

Thank, really.

Regards

Cristian Abarzúa.



___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss


[Tkinter-discuss] [Fwd: Anyone using Tkinter for mobile device applications?]

2010-12-20 Thread craf
- Mensaje reenviado 
 De: pyt...@bdurham.com
 Para: Python-Tkinter tkinter-discuss@python.org
 Asunto: [Tkinter-discuss] Anyone using Tkinter for mobile device
 applications?
 Fecha: Sun, 19 Dec 2010 12:40:04 -0500
 
 Wondering if any of you are using Tkinter for mobile device
 applications and if so, what has your experience been like (tricks,
 traps, etc)? 
  
 By mobile I mean small Linux devices, ipad/iphone, Windows CE or the
 new mobile Windows 7 Mobile.
  
 Thanks,
 Malcolm
 ___
 Tkinter-discuss mailing list
 Tkinter-discuss@python.org
 http://mail.python.org/mailman/listinfo/tkinter-discuss

Hi Malcom


Apparently, python works fine on the Iphone, but Tkinter does not, as it
has its own graphics API. I leave you the link.

http://bytes.com/topic/python/answers/851129-python-iphone-actually-rather-good

Regards.

Cristian Abarzua F


___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss


[Tkinter-discuss] lambda function to simplify

2010-12-17 Thread craf
Hi.

According to this code

--
import Tkinter


class App:
def __init__(self, master):
self.root = master
self.b1 = Tkinter.Button(master)
self.b1.pack()
self.b1.bind('Button-1', lambda
e,widget=self:greeting(widget))
self.root.protocol('WM_DELETE_WINDOW', lambda:((lambda e,
widget=self:greeting(widget))(self.root)))

def greeting(widget):
widget.root.destroy()


master = Tkinter.Tk()
master.geometry('400x400')
app = App(master)
master.mainloop()
---

I have access to the function (greeting) from the button and the window
close button.

It works fine, but wanted to know whether the use of lambda (lambda),
can be expressed in another way more elegant and less confusing.

Regards.

Cristian Abarzua

___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss


[Tkinter-discuss] Upload control parameter sashpos to load the program.

2010-12-17 Thread craf
Hi.

I'm trying that opening the window, the position of the handle, is
located where you want, using the method sashpos, in the following
code



from tkinter import *
from tkinter import ttk


class App:
def __init__(self, master):

self.root = master

self.paned = ttk.Panedwindow(self.root, orient=HORIZONTAL)
self.paned.pack(fill=BOTH, expand=YES)

self.f1 = ttk.Labelframe(self.paned, text='One')
self.f2 = ttk.Labelframe(self.paned, text='Two')

self.paned.add(self.f1)
self.paned.add(self.f2)

self.paned.sashpos(0,100) ---Here

master = Tk()
master.geometry('400x400')
app = App(master)
master.mainloop()


The problem is that the method is not taken into account when loading
the window.

There is an event that allows to open the program, run the method?.


Regards


Cristian Abarzua.

UBUNTU 9.10 - Tkinter.ttk 8.5 - Python 3.1.1


___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss


[Tkinter-discuss] [Fwd: Re: Upload control parameter sashpos to load the program.]

2010-12-17 Thread craf
- Mensaje reenviado 
 De: Michael Lange klappn...@web.de
 Para: tkinter-discuss@python.org
 Asunto: Re: [Tkinter-discuss] Upload control parameter sashpos to load
 the program.
 Fecha: Sat, 18 Dec 2010 02:41:57 +0100
 
 Hi,
 
 Thus spoketh craf p...@vtr.net 
 unto us on Fri, 17 Dec 2010 19:49:58 -0300:
 
  Hi.
  
  I'm trying that opening the window, the position of the handle, is
  located where you want, using the method sashpos, in the following
  code
 (...)
  
  The problem is that the method is not taken into account when loading
  the window.
  
  There is an event that allows to open the program, run the method?.
 
 Try to call update_idletasks() before calling sashpos(), so tk can
 calculate the size of the widgets first. I haven't tried it right now,
 but this is usually the first attempt in such cases and will probably
 help ;)
 
 Regards
 
 Michael
 
 
 .-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.
 
 Superior ability breeds superior ambition.
   -- Spock, Space Seed, stardate 3141.9
 ___
 Tkinter-discuss mailing list
 Tkinter-discuss@python.org
 http://mail.python.org/mailman/listinfo/tkinter-discuss

Hi Michael.

This method was that I need!.
Thank you very much!.

Regards

Cristian Abarzua

___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss


[Tkinter-discuss] Off Topic : Tkinter in everyday life

2010-12-17 Thread craf
Hi everyone.!

I apologize in advance, since English is not my native language and
some things can not understand and misinterpret.

Very recently I found Python and Tkinter. Needless to say, I find a tool
Tkinter extremely cool and functional, which I am discovering little by
little every day.

One question that comes to me, is why very few people work with this
tool?

Anyone know of companies that use in their development.?

Does anyone know which projects or developmental pathway of Tkinter.?

Well, I hope not to be taken the wrong way my questions and happy
weekend to all!

Regards.

Cristian Abarzua





___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss


[Tkinter-discuss] Calling functions outside the class

2010-12-16 Thread craf
Hi.

I'm testing this code:

---
from Tkinter import *

class MyApp:
def __init__(self, parent):
self.myParent = parent  ### (7) remember my parent, the root
self.myContainer1 = Frame(parent)
self.myContainer1.pack()

self.button1 = Button(self.myContainer1)
self.button1.configure(text=OK, background= green)
self.button1.pack(side=LEFT)
self.button1.bind(Button-1, self.button1Click) ### (1)

self.button2 = Button(self.myContainer1)
self.button2.configure(text=Cancel, background=red)
self.button2.pack(side=RIGHT)
self.button2.bind(Button-1, self.button2Click) ### (2)

def button1Click(self, event):### (3)
if self.button1[background] == green: ### (4)
self.button1[background] = yellow
else:
self.button2[background] = green

def button2Click(self, event):  ### (5)
self.myParent.destroy() ### (6)


root = Tk()
myapp = MyApp(root)
root.mainloop()

-

Works without problems, but if I want to get the functions of the class,
then the problems begin.

from Tkinter import *

class MyApp:
def __init__(self, parent):
self.myParent = parent  ### (7) remember my parent, the root
self.myContainer1 = Frame(parent)
self.myContainer1.pack()

self.button1 = Button(self.myContainer1)
self.button1.configure(text=OK, background= green)
self.button1.pack(side=LEFT)
self.button1.bind(Button-1, self.button1Click) ### (1)

self.button2 = Button(self.myContainer1)
self.button2.configure(text=Cancel, background=red)
self.button2.pack(side=RIGHT)
self.button2.bind(Button-1, self.button2Click) ### (2)

def button1Click(self, event):¡¡¡FUNCTION OUTSIDE THE CLASS!!!
if self.button1[background] == green: ### (4)
self.button1[background] = yellow
else:
self.button2[background] = green

def button2Click(self, event): ¡¡¡FUNCTION OUTSIDE THE CLASS!!!
self.myParent.destroy() ### (6)


root = Tk()
myapp = MyApp(root)
root.mainloop()

What would be the correct way to call them?

Thanks in advance

Regards

Cristian Abarzua F

___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss


[Fwd: Re: Calling function from another module]

2010-12-16 Thread craf
- Mensaje reenviado 
 De: Peter Otten __pete...@web.de
 Para: python-list@python.org
 Asunto: Re: Calling function from another module
 Fecha: Thu, 16 Dec 2010 13:16:30 +0100
 Grupos de noticias: comp.lang.python
 
 craf wrote:
 
  Hi.
  
  The query code is as follows:
  
  --
  import Tkinter
  import tkMessageBox
  
  
  class App:
  def __init__(self, master):
  master.protocol(WM_DELETE_WINDOW,quit)
  
  
  def quit():
  if tkMessageBox.askyesno('','Exit'):
  master.quit()
  
  
  master =Tkinter.Tk()
  app = App(master)
  master.mainloop()
  ---
  
  As you can see, when I run and close the main window displays
  a text box asking if you want to quit, if so, closes
  application.
  
  Question:
  
  Is it possible to define the quit() function in another separate
  module?.
  I tried it, but it throws the error that the global name
  'master' is not defined.
 
 You can have the modules import each other and then access the master as
 module.master where you'd have to replace module with the actual name of 
 the module, but that's a bad design because 
 
 (1) you create an import circle
 (2) functions relying on global variables already are a bad idea
 
 Your other option is to pass 'master' explicitly and then wrap it into a 
 lambda function (or functools.partial):
 
 $ cat tkquitlib.py
 import tkMessageBox
 
 def quit(master):
 if tkMessageBox.askyesno('','Exit'):
 master.quit()
 
 
 $ cat tkquit_main.py
 import Tkinter
 
 import tkquitlib
 
 class App:
 def __init__(self, master):
 master.protocol(WM_DELETE_WINDOW, lambda: tkquitlib.quit(master))
 
 master = Tkinter.Tk()
 app = App(master)
 master.mainloop()
 
 Peter

Hi Peter.

¡Right!. Your example can separate the creation of the interface to the
code execution. Thanks for your time.

Regards

Cristian

-- 
http://mail.python.org/mailman/listinfo/python-list


[Python-es] Llamar a funcion en otro modulo

2010-12-15 Thread craf
Hola.

El código de consulta es el siguiente:

--
import Tkinter
import tkMessageBox


class App:
def __init__(self, master):
master.protocol(WM_DELETE_WINDOW,salir)


def salir():
if tkMessageBox.askyesno('','Salir'):
master.quit()


master =Tkinter.Tk()
app = App(master)
master.mainloop()
---

Como verán, al ejecutarlo y cerrar la ventana principal, muestra
un cuadro de texto, preguntando si se quiere salir, si es así, se cierra
la aplicación.

Pregunta:

¿Es posible definir la función salir() en otro modulo aparte?.
He tratado de hacerlo, pero me arroja el error de que el nombre global
'master' no está definido.

Gracias de antemano.


Saludos

Cristian Abarzua

Python 2.6 - Ubuntu 9.10

___
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/


[Tkinter-discuss] [Fwd: Change ttk.Notebook tab's font or font height?]

2010-12-15 Thread craf
- Mensaje reenviado 
 De: pyt...@bdurham.com
 Para: Python-Tkinter tkinter-discuss@python.org
 Asunto: [Tkinter-discuss] Change ttk.Notebook tab's font or font
 height?
 Fecha: Wed, 15 Dec 2010 00:54:37 -0500
 
 Is there a way to change the ttk.Notebook tab's font or font height?
  
 Use case: I would like to use a named font object for my tab captions
 so a user can change the height of the named font and have the font
 sizes of all the widgets on a page increase in size (including the
 ttk.Notebook tab captions). The user in question has vision problems.
  
 Thank you,
 Malcolm
 ___
 Tkinter-discuss mailing list
 Tkinter-discuss@python.org
 http://mail.python.org/mailman/listinfo/tkinter-discuss

Hi Malcom

Here: http://code.activestate.com/recipes/541092-tknotebook/

here's how to create a class to create notebook.
With a little patience can be converted for use with 8.5 tkinter.ttk and
Python 3.1

Regards.

Cristian

___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss


[Tkinter-discuss] as close windows by separate modules

2010-12-15 Thread craf
Hi.

I have two modules: 

main.py-

from tkinter import *
from tkinter import ttk
from code import Option


class App:
def __init__(self, master):
master.protocol(WM_DELETE_WINDOW,Option.quit)


master = Tk()
master.geometry('640x480')
app = App(master)
master.mainloop()

code.py-

from tkinter import messagebox
from tkinter import *
from tkinter import ttk


class Option:
def quit():
if messagebox.askyesno(message='Close window'):
master.quit()

I want to press the close button and close the main window to run the
module main.py.


But I can not, the error it throws is: NameError: global name 'master'
is not defined

I appreciate any suggestions.

Regards.

Cristia Abarzúa


___
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss


Calling function from another module

2010-12-15 Thread craf
Hi.

The query code is as follows:

--
import Tkinter
import tkMessageBox


class App:
def __init__(self, master):
master.protocol(WM_DELETE_WINDOW,quit)


def quit():
if tkMessageBox.askyesno('','Exit'):
master.quit()


master =Tkinter.Tk()
app = App(master)
master.mainloop()
---

As you can see, when I run and close the main window displays
a text box asking if you want to quit, if so, closes
application.

Question:

Is it possible to define the quit() function in another separate
module?.
I tried it, but it throws the error that the global name
'master' is not defined.

Thanks in advance.

Regards

Cristian Abarzúa




-- 
http://mail.python.org/mailman/listinfo/python-list


  1   2   3   >