Re: Python 2.5 and sqlite

2008-11-11 Thread Guilherme Polo
On Tue, Nov 11, 2008 at 6:04 PM, Thorsten Kampe <[EMAIL PROTECTED]> wrote: > * "Martin v. Löwis" (Tue, 11 Nov 2008 20:54:37 +0100) >> > Sqlite3 is an optional part of Python. It has no dependencies on >> > SQLite. >> >> That's not true. To build the _sqlite3 module, you need the SQLite3 >> sources

Re: Simple question about Python lists

2008-11-11 Thread Guilherme Polo
On Tue, Nov 11, 2008 at 5:47 PM, Eric <[EMAIL PROTECTED]> wrote: > I'm learning Python (while coming from MATLAB). One question I have is > that if I have a list with say 8 elements, and I want just a few of > them how do I select them out. In MATLAB, if I just want the first, > fifth and eighth el

Re: Installing Python 2.6 on Vista

2008-11-09 Thread Guilherme Polo
On Sun, Nov 9, 2008 at 4:14 PM, Fuzzyman <[EMAIL PROTECTED]> wrote: > Hello guys, > > Not sure if this is a Windows question or a Python problem... > > I'm trying to install Python 2.6 from the msi, on Windows Vista as an > administrative user with UAC on. If I try to install for all users > then I

Re: how to get full-text search of pysqlite3 work in python2.5.2

2008-10-30 Thread Guilherme Polo
On 10/30/08, hawk <[EMAIL PROTECTED]> wrote: > On Oct 30, 8:21 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > > > On 10/30/08, hawk <[EMAIL PROTECTED]> wrote: > > > > > > > > > Hi, > > > my environment is de

Re: Tkinter: How to get Label wraplength functionality in Text Box

2008-10-30 Thread Guilherme Polo
On 10/30/08, Mudcat <[EMAIL PROTECTED]> wrote: > I'm not sure why my tkinter would not be compiled against 8.5 since I > have the latest version. I assumed that Python 2.6 would have it > without requiring me to do an extra compile. It is not really python's fault if tkinter is compiled against

Re: how to get full-text search of pysqlite3 work in python2.5.2

2008-10-30 Thread Guilherme Polo
On 10/30/08, hawk <[EMAIL PROTECTED]> wrote: > Hi, > my environment is debian, python 2.5.2. > when i call con.enable_load_extension(True), the following message > prompt out. > debian:~# python2.5 > Python 2.5 (release25-maint, Jul 20 2008, 20:47:25) > [GCC 4.1.2 20061115 (prerelease) (Debia

Re: Why gives "k = 09" a syntax error ?

2008-10-29 Thread Guilherme Polo
On 10/29/08, Stef Mientki <[EMAIL PROTECTED]> wrote: > hello, > > Why gives "k = 09" a syntax error ? > 09 is not a valid octal number. Instead use 011. Ok, I guess you were not aware that prefixing a number with a '0' would cause python to parse it as an octal and now you know. > thanks, >

Re: How to Implement an XMLRPC Server in Python?

2008-10-29 Thread Guilherme Polo
On 10/29/08, Zix <[EMAIL PROTECTED]> wrote: > Hello, > I am a newbie to python and trying to get a hang of some of its > advanced features through an application I am building. Basically, I'd > like to build a weather forecasting web service. The clients should be > able to query the service wi

Re: Tkinter: How to get Label wraplength functionality in Text Box

2008-10-29 Thread Guilherme Polo
nt("1.0", "end", "displaylines", "lines") root.mainloop() Note that I inverted the order of the arguments here, indices and then the options or no options. If it doesn't work saying "count" is not an acceptable command then your tkinter is

Re: [Tkinter-discuss] WxPython -> Tkinter

2008-10-29 Thread Guilherme Polo
On 10/29/08, Guilherme Polo <[EMAIL PROTECTED]> wrote: > On 10/29/08, Olrik Lenstra <[EMAIL PROTECTED]> wrote: > > Hello everyone, > > > > A while ago I joined the Tutor mailing list, and they helped me out with a > > question regarding wxPython. >

Re: [Tkinter-discuss] WxPython -> Tkinter

2008-10-29 Thread Guilherme Polo
On 10/29/08, Olrik Lenstra <[EMAIL PROTECTED]> wrote: > Hello everyone, > > A while ago I joined the Tutor mailing list, and they helped me out with a > question regarding wxPython. > Now however, I have tried a program in Tkinter and I would like to see if > there is a similar command to "wx.SafeY

Re: Tkinter: How to get Label wraplength functionality in Text Box

2008-10-28 Thread Guilherme Polo
On 10/28/08, Mudcat <[EMAIL PROTECTED]> wrote: > I've tried quite a few things to get this correct but have hit a > couple of sticking points that I can't figure out. I need to ge the > Text box to function like the 'wraplength' option in a Label. > > I've been able to adjust the height of the t

Re: Python 2.5 + sqlite full text search possible?

2008-10-28 Thread Guilherme Polo
On 10/28/08, Guillermo <[EMAIL PROTECTED]> wrote: > Hi! > > Is it possible to use the full-text module of SQLite with the sqlite3 > module? I've done a bit of investigation and it seems the stand-alone > distribution of SQLite is compiled without it, and so does the version > bundled with Pytho

Re: [Tkinter-discuss] (newbie) can't invoke button for twice

2008-09-20 Thread Guilherme Polo
On Sat, Sep 20, 2008 at 4:10 PM, dmitrey <[EMAIL PROTECTED]> wrote: > > hi all, > I have the problem: > a func has been binded to a Button: > > RunPause = Button(root, textvariable = t, command = lambda: > invokeRunPause(p)) > > def invokeRunPause(p): >if p.state == 'init': >p.state = '

Re: Here's something interesting: sympy crashes in Python 2.6 (Windows)

2008-09-20 Thread Guilherme Polo
On Sat, Sep 20, 2008 at 1:27 PM, Mensanator <[EMAIL PROTECTED]> wrote: > Beacuse in 2.6, Python apparently has fixed a discrepency that existed > in previous versions. > > In the IDLE that comes with 2.5, typing "as", to wit "import random as > ran", > the words "import" and "as" highlight in red,

Re: Tkinter Bold Text

2008-09-18 Thread Guilherme Polo
On Thu, Sep 18, 2008 at 1:06 PM, April Lekin <[EMAIL PROTECTED]> wrote: > Is there any way to highlight, bold or change the color of one word in a > variable to be displayed on a Tkinter GUI? Yes. > > Like: > > material = "Plastic" > introVal = "This report describes the construction of the %s."

Re: Tkinter Label 'justify' Problem

2008-09-17 Thread Guilherme Polo
On Wed, Sep 17, 2008 at 2:18 PM, Dude <[EMAIL PROTECTED]> wrote: > Hi All, > I am fairly new to Python programming. I am working on a small > Tkinter project and I think I am missing something, maybe you can > help. The two lines below is all I have related to the Label widget: > > lblServer = Tk

Re: cjson 1.0.5 keyword argument

2008-09-14 Thread Guilherme Polo
On Sun, Sep 14, 2008 at 11:50 AM, Clodoaldo <[EMAIL PROTECTED]> wrote: > On Sep 14, 11:45 am, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: >> On Sun, Sep 14, 2008 at 10:33 AM, Clodoaldo <[EMAIL PROTECTED]> wrote: >> > I have installed cjson 1.05 in F

Re: cjson 1.0.5 keyword argument

2008-09-14 Thread Guilherme Polo
On Sun, Sep 14, 2008 at 10:33 AM, Clodoaldo <[EMAIL PROTECTED]> wrote: > I have installed cjson 1.05 in Fedora 8 (python 2.5.1). > > The cjson home page shows a keyword argument "encoding". > http://python.cx.hu/python-cjson/ > The latest python-cjson on that page is 1.0.3, which accepts keywords

Re: Windows / Tkinter - problem with grid - not able to place widgets at desired places

2008-09-14 Thread Guilherme Polo
On Sun, Sep 14, 2008 at 7:32 AM, Francesco Bochicchio <[EMAIL PROTECTED]> wrote: > Il Mon, 18 Aug 2008 12:15:10 +0100, dudeja.rajat ha scritto: > > >>>Hi, >>> >>>I'm learning Python and Tkinter. I've started programming in Eclipse >>>with PyDev. I'm intending to create a GUI. I'm not able to unders

Re: Tkinter Radio button on the second window

2008-09-04 Thread Guilherme Polo
On Thu, Sep 4, 2008 at 10:01 PM, Dream <[EMAIL PROTECTED]> wrote: > The code create 2 windows. 2 radiobuttons are put on the second > window. A control variable "v" is binded to the 2 widgets. > But when I run the code, I found the control variable not binded > succsessfully: The second radiobutton

Re: Help with Tkinter Label Widget

2008-09-03 Thread Guilherme Polo
On Wed, Sep 3, 2008 at 8:57 PM, Kevin McKinley <[EMAIL PROTECTED]> wrote: > Below i've put the code for a program that i wrote. I need help on lines > 384-403. If you run this program you will notice on the first tab when have > it produce an answer the $ is surrounded with {$}. How can i get

Re: Tkinter: tkButtonDown, tkButtonEnter, tkButtonInvoke, tkButtonLeave, tkButtonUp

2008-09-02 Thread Guilherme Polo
On Tue, Sep 2, 2008 at 12:44 AM, akineko <[EMAIL PROTECTED]> wrote: > On Sep 1, 8:28 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: >> Can you clarify what is this "sticky" behavior ? Are you referring to >> a toggle button ? If yes,

Re: Tkinter: tkButtonDown, tkButtonEnter, tkButtonInvoke, tkButtonLeave, tkButtonUp

2008-09-01 Thread Guilherme Polo
On Mon, Sep 1, 2008 at 11:01 PM, akineko <[EMAIL PROTECTED]> wrote: > On Sep 1, 6:34 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: >> This is an illusion you have, calling those methods are not the way >> for explicitly controlling button's behavior,

Re: Tkinter: tkButtonDown, tkButtonEnter, tkButtonInvoke, tkButtonLeave, tkButtonUp

2008-09-01 Thread Guilherme Polo
On Mon, Sep 1, 2008 at 10:09 PM, akineko <[EMAIL PROTECTED]> wrote: > On Sep 1, 5:52 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > >> Are you trying to simulate clicks ? You should be doing it using >> event_generate, more below. >> > > A

Re: Tkinter: tkButtonDown, tkButtonEnter, tkButtonInvoke, tkButtonLeave, tkButtonUp

2008-09-01 Thread Guilherme Polo
On Mon, Sep 1, 2008 at 7:45 PM, akineko <[EMAIL PROTECTED]> wrote: > Hi everyone, > > This is a memorandum so that other people can share the info. > > The following methods are declared in the Tkinter Button class. > tkButtonDown(), tkButtonEnter(), tkButtonInvoke(), tkButtonLeave(), > tkButtonUp(

Re: TkMessageBox - Using sys.exit() is a a great pain. Looking for other similar commands.

2008-09-01 Thread Guilherme Polo
On Mon, Sep 1, 2008 at 3:35 PM, <[EMAIL PROTECTED]> wrote: > Hi, > > I'm using a TkMessageBox for handling some errors and displaying them > through the message boxes. > > My code is as below: > if selectedVer == strNoArchivedResults: >tkMessageBox._show("Error", \ >

Re: eval() == evil? --- How to use it safely?

2008-08-28 Thread Guilherme Polo
On Thu, Aug 28, 2008 at 6:51 PM, Fett <[EMAIL PROTECTED]> wrote: > I am creating a program that requires some data that must be kept up > to date. What I plan is to put this data up on a web-site then have > the program periodically pull the data off the web-site. > > My problem is that when I pull

Re: Negative regular expressions (searching for "i" not inside command)

2008-08-28 Thread Guilherme Polo
On Thu, Aug 28, 2008 at 5:04 PM, Bart Kastermans <[EMAIL PROTECTED]> wrote: > I have a file in which I am searching for the letter "i" (actually > a bit more general than that, arbitrary regular expressions could > occur) as long as it does not occur inside an expression that matches > \\.+?\b (som

Re: ImageTk.Photoimage not displayed

2008-08-28 Thread Guilherme Polo
On Thu, Aug 28, 2008 at 4:07 PM, harryos <[EMAIL PROTECTED]> wrote: > hi > i am trying to display an image on a canvas in a gui made with Tkinter > widgets > > > class PhotoDisplay: >def __init__(self,parent): >self.mainframe = Frame(parent,background="grey") >. >#ad

Re: Tkinter tkMessageBox problem - message box is displayed with an additional window

2008-08-28 Thread Guilherme Polo
On Thu, Aug 28, 2008 at 10:29 AM, <[EMAIL PROTECTED]> wrote: > Hi, > I'm working on Windows Platform > > I'm facing some problem with the tkMessageBox. My code is as below: > > import tkMessageBox > import Tix > from Tkinter import * > > if len(installedLibPath) != len(listOfLibraries): >i

Re: no string.downer() ?

2008-08-27 Thread Guilherme Polo
On Wed, Aug 27, 2008 at 11:16 AM, ssecorp <[EMAIL PROTECTED]> wrote: > if i want to make a string downcase, is upper().swapcase() the onyl > choice? there is no downer() ? There is no "downer" indeed, instead it is named "lower". > -- > http://mail.python.org/mailman/listinfo/python-list > --

Re: SocketServer max connections

2008-08-25 Thread Guilherme Polo
On Mon, Aug 25, 2008 at 7:20 AM, Ken Seehart <[EMAIL PROTECTED]> wrote: > I'm using SocketServer to implement a local server that serves comet > long-polling connections. > > How do I increase the maximum number of open connections? Currently it is > limited to about 8 I think. More than that and

Re: Tkinter updates - Easiest way to install/use Tile?

2008-08-14 Thread Guilherme Polo
On Thu, Aug 14, 2008 at 12:05 PM, Guilherme Polo <[EMAIL PROTECTED]> wrote: > On Wed, Aug 13, 2008 at 2:10 PM, Mudcat <[EMAIL PROTECTED]> wrote: >> So I haven't programmed much in Python the past couple of years and >> have been catching up the last few day

Re: ActiveState Python v2.5 doesn't come with Tkinter or Tk installed.

2008-08-14 Thread Guilherme Polo
On Thu, Aug 14, 2008 at 1:20 PM, Russell E. Owen <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > "Dudeja, Rajat" <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> So, now I've finally started using Eclipse and PyDev as an IDE for my >> GUI Application. I just wrote some sample programs as a

Re: Tkinter updates - Easiest way to install/use Tile?

2008-08-14 Thread Guilherme Polo
On Wed, Aug 13, 2008 at 2:10 PM, Mudcat <[EMAIL PROTECTED]> wrote: > So I haven't programmed much in Python the past couple of years and > have been catching up the last few days by reading the boards. I'll be > making commercial Python applications again and wanted to see what's > new in the Gui d

Re: Tkinter- Possibly a basic question

2008-07-30 Thread Guilherme Polo
On Wed, Jul 30, 2008 at 6:33 PM, <[EMAIL PROTECTED]> wrote: > I hate to do this, but I've thoroughly exhausted google search. Yes, > it's that pesky root window and I have tried withdraw to no avail. I'm > assuming this is because of the methods I'm using. I guess my question > is two-fold. > 1) H

Re: Download excel file from web?

2008-07-29 Thread Guilherme Polo
On Tue, Jul 29, 2008 at 1:47 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Jul 28, 6:05 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: >> On Mon, Jul 28, 2008 at 9:39 PM, MRAB <[EMAIL PROTECTED]> wrote: >> > On Jul 29, 12:41 am, "[EMAIL

Re: Download excel file from web?

2008-07-28 Thread Guilherme Polo
On Mon, Jul 28, 2008 at 9:39 PM, MRAB <[EMAIL PROTECTED]> wrote: > On Jul 29, 12:41 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >> On Jul 28, 4:20 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: >> >> >> >> > On Mon,

Re: Tkinter fullscreen with Mac OS X

2008-07-28 Thread Guilherme Polo
On Mon, Jul 28, 2008 at 8:10 PM, C Martin <[EMAIL PROTECTED]> wrote: > Is there a way to create a full screen app using Tkinter with Mac OS > X?? On windows, this is relatively easy with overrideredirect(1). > However, on the Mac, the top menu bar and dock are still displayed > over the app. Is the

Re: Download excel file from web?

2008-07-28 Thread Guilherme Polo
On Mon, Jul 28, 2008 at 8:04 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Jul 28, 3:52 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: >> On Mon, Jul 28, 2008 at 7:43 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> > On Jul 28, 3:33 pm,

Re: Download excel file from web?

2008-07-28 Thread Guilherme Polo
On Mon, Jul 28, 2008 at 7:43 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Jul 28, 3:33 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >> On Jul 28, 3:29 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> >> >> >> > [EMAIL PROTECTED] schrieb: >> >> > > On Jul 28, 3:00 pm, "[EMAIL PROT

Re: Is it allowed to use function results as default arguments ?

2008-07-28 Thread Guilherme Polo
On Mon, Jul 28, 2008 at 5:28 PM, Stef Mientki <[EMAIL PROTECTED]> wrote: > hello, > > I've a perfect working procedure, > at least as far I've tested it it works perfect. > > But I was just experimenting with inspect, > and saw that the default argument was not parsed correctly. > > So I wonder if

Re: seemingly simple list indexing problem

2008-07-28 Thread Guilherme Polo
On Mon, Jul 28, 2008 at 7:00 PM, Gary Herron <[EMAIL PROTECTED]> wrote: > Guilherme Polo wrote: >> >> On Mon, Jul 28, 2008 at 6:24 PM, Ervan Ensis <[EMAIL PROTECTED]> >> wrote: >> >>> >>> My programming skills are pretty rusty and I&#x

Re: seemingly simple list indexing problem

2008-07-28 Thread Guilherme Polo
On Mon, Jul 28, 2008 at 6:24 PM, Ervan Ensis <[EMAIL PROTECTED]> wrote: > My programming skills are pretty rusty and I'm just learning Python so this > problem is giving me trouble. > > I have a list like [108, 58, 68]. I want to return the sorted indices of > these items in the same order as the

Re: Proper way to query user and group database on a Unix host?

2008-07-23 Thread Guilherme Polo
On Wed, Jul 23, 2008 at 9:16 AM, Sebastian lunar Wiesner <[EMAIL PROTECTED]> wrote: > Chris Brannon <[EMAIL PROTECTED]>: > > Iirc since Python 2.5 these tuples are named ... > >> Instead, do this: >> >> import grp >> groupname = 'users' >> groupusers = grp.getgrnam(groupname)[3] > ... thus this lin

Re: repr(string)

2008-07-23 Thread Guilherme Polo
On Wed, Jul 23, 2008 at 12:04 PM, David C. Ullrich <[EMAIL PROTECTED]> wrote: > I've been saving data in a file with one line per field. > Now some of the fields may become multi-line strings... > > I was about to start escaping and unescaping linefeeds > by hand, when I realized that repr() and ev

Re: Doubt

2008-07-23 Thread Guilherme Polo
On Wed, Jul 23, 2008 at 11:51 AM, ജഗന്നാഥ് <[EMAIL PROTECTED]> wrote: > Friends > > I am a Perl programmer new to Python. I have a small doubt. > How to convert the perl notation > $a = ""; expression in Python ? a = "" > > How to represent the loop > for ($a = $b; $a<=$c;$a++){ > } in Python >

Re: Using Tcl extensions with Python?

2008-07-17 Thread Guilherme Polo
On Thu, Jul 17, 2008 at 6:48 PM, C Martin <[EMAIL PROTECTED]> wrote: > How do you setup a Tcl extension to be accessible through Python? I > understand that I'll have to use native Tcl calls to use it (tk.call() > etc), but I can't figure out where to put the files or how to > initialize them so I

Re: Why is there no GUI-tools like this for Windows?

2008-07-12 Thread Guilherme Polo
On Sat, Jul 12, 2008 at 6:35 PM, maestro <[EMAIL PROTECTED]> wrote: > http://www.youtube.com/watch?v=PXpwC1o5AcI > > I have done some GUI-programming for windows with Python but the > Tkinter interface sucked and while it is the only one I tried I got > the impression they are all the same. > > It'

Re: controlling the windows

2008-07-03 Thread Guilherme Polo
On Thu, Jul 3, 2008 at 4:16 PM, varun chadha <[EMAIL PROTECTED]> wrote: > i am developing an application using Tkinter where 'next' button > takes to another window and removes the first one from screen and > 'back' button bring me back to previous window and so on. > though i am able to move from

Re: dynamically load from module import xxx

2008-07-02 Thread Guilherme Polo
On Tue, Jul 1, 2008 at 1:46 PM, Gary Duzan <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Neal Becker <[EMAIL PROTECTED]> wrote: >>What is a good way to emulate: >> >>from module import xxx >>where 'module' is a dynamically generated string? >> >>__import__ ('modulename', fromlist=

Re: SQLite and Python 2.4

2008-07-01 Thread Guilherme Polo
On Tue, Jul 1, 2008 at 9:51 PM, Joe Goldthwaite <[EMAIL PROTECTED]> wrote: > I'm confused. (Not a new experience). I've got a web application running > under Zope. I use the Wing IDE for testing and debugging. When trying to > recreate problems that come up on the web, I wrote some little routi

Re: dynamically load from module import xxx

2008-07-01 Thread Guilherme Polo
On Tue, Jul 1, 2008 at 12:55 PM, Neal Becker <[EMAIL PROTECTED]> wrote: > Guilherme Polo wrote: > >> On Tue, Jul 1, 2008 at 12:11 PM, Neal Becker <[EMAIL PROTECTED]> wrote: >>> What is a good way to emulate: >>> >>> from module import xxx &

Re: dynamically load from module import xxx

2008-07-01 Thread Guilherme Polo
On Tue, Jul 1, 2008 at 12:11 PM, Neal Becker <[EMAIL PROTECTED]> wrote: > What is a good way to emulate: > > from module import xxx > where 'module' is a dynamically generated string? > > __import__ ('modulename', fromlist=['xxx']) > > seems to be what I want, but then it seems 'xxx' is not placed

Fwd: PhotoImage problem

2008-06-30 Thread Guilherme Polo
-- Forwarded message -- From: Guilherme Polo <[EMAIL PROTECTED]> Date: Mon, Jun 30, 2008 at 1:00 PM Subject: Re: PhotoImage problem To: jimgardener <[EMAIL PROTECTED]> On Mon, Jun 30, 2008 at 12:02 PM, jimgardener <[EMAIL PROTECTED]> wrote: > hi > I am u

Re: shorten this: if char in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz":

2008-06-24 Thread Guilherme Polo
On Tue, Jun 24, 2008 at 3:47 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On 24 juin, 20:32, cirfu <[EMAIL PROTECTED]> wrote: >> if char in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz": >> >> cant i write something like: >> if char in "[A-Za-z]": >> > > Nope. But there are other sol

Re: NameError: name 'maketrans' is not defined, pythonchallenge

2008-06-24 Thread Guilherme Polo
On Tue, Jun 24, 2008 at 3:11 PM, cirfu <[EMAIL PROTECTED]> wrote: > from string import maketrans > > ok but how can i write: > pattern = maketrans('A-XY-Za-xy-z', 'C-ZA-Bc-za-b') > pattern = maketrans('A-Za-z', 'C-Bc-b') > none works maketrans doesn't work like that, you would need something l

Re: inheritance question...

2008-06-20 Thread Guilherme Polo
On Fri, Jun 20, 2008 at 6:19 PM, Hamish McKenzie <[EMAIL PROTECTED]> wrote: > > I have this class: > > class Vector(object): > TOL = 1e-5 > def __eq__( self, other, tolerance=TOL ): > print tolerance > > > shortened for clarity obviously. so I want to subclass this class like > s

Re: Tkinter canvas drag/drop obstacle

2008-06-20 Thread Guilherme Polo
On Fri, Jun 20, 2008 at 1:11 PM, Peter Pearson <[EMAIL PROTECTED]> wrote: > Tkinter makes it very easy to drag jpeg images around on a > canvas, but I would like to have a "target" change color when > the cursor dragging an image passes over it. I seem to be > blocked by the fact that the callback

Re: People still using Tkinter?

2008-05-10 Thread Guilherme Polo
2008/5/10 Kevin Walzer <[EMAIL PROTECTED]>: > Guilherme Polo wrote: >> >> 2008/5/10 Zentrader <[EMAIL PROTECTED]>: >>> >>> I like New Mexico Tech's site as well. Also, take a look at the PMW >>> extension for additional widgets, and TkTab

Re: People still using Tkinter?

2008-05-10 Thread Guilherme Polo
2008/5/10 Zentrader <[EMAIL PROTECTED]>: > I like New Mexico Tech's site as well. Also, take a look at the PMW > extension for additional widgets, and TkTable and/or TableListWrapper. > http://infohost.nmt.edu/tcc/help/pubs/tkinter/ There is also Tile, or Ttk since Tk 8.5, if you are interested i

Re: People still using Tkinter?

2008-05-10 Thread Guilherme Polo
2008/5/10 Kenneth McDonald <[EMAIL PROTECTED]>: > Any guesses as to how many people are still using Tkinter? And can anyone > direct me to good, current docs for Tkinter? > I will say no to the first question. Now about the second question.. there are these links you may find interesting: "An In

Re: Looking for Fredrik Lundh; documentation and code examples for elementtree

2008-05-07 Thread Guilherme Polo
2008/5/7 dj <[EMAIL PROTECTED]>: > Hello All, > > I am trying to get in touch with Mr. Lundh. I am looking for exmaple > code regarding the use of elementtree. I have read through most of the > examples on http://effbot.org and I am hoping he can suggest some > others. Additionally, I am hoping he

Re: IDLE gripe and question

2008-04-22 Thread Guilherme Polo
2008/4/22, Dick Moores <[EMAIL PROTECTED]>: > I have IDLE 1.2.1, on Win XP, Python 2.5.1. > > The first time I use File | Open to open a script, the Open dialogue box > always opens at E:\Python25\Lib\idlelib. Here on Linux it opens at the directory from where idle was executed, so I can't exactl

Re: Tkinter: making buttons the same size?

2008-04-05 Thread Guilherme Polo
2008/4/5, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > how do i do that? i get this error: > > > > self.btnDisplay = Button(self,text='1',command=lambda > n=1:self.Display(n)) > > self.btnDisplay.grid(row=3, column=0, padx=5, pady=5, width=1) > > > self.btnDisplay = Button(self,text='

Re: Tkinter: making buttons the same size?

2008-04-05 Thread Guilherme Polo
2008/4/5, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > on windows vista these buttons dont have the same size, the "/" > shrinks a little. how do i make them the same size or prevent > shrinking? > a mac-user told me they look the same to him so maybe it doesnt shrink > on macs but it does when usi

Re: why does socket.makefile require non-blocking mode?

2008-03-29 Thread Guilherme Polo
2008/3/28, Forest <[EMAIL PROTECTED]>: > The socket.makefile() docs say, "the socket must be in blocking mode." I > don't see any explanation of why blocking mode is required, and I'm not sure > whether that means timeout mode is forbidden as well. Can someone clarify > this? > Have you set y

Re: Is subprocess.Popen completely broken?

2008-03-27 Thread Guilherme Polo
2008/3/27, Skip Montanaro <[EMAIL PROTECTED]>: > > > >>> proc = subprocess.Popen ("ls /tmp") > > > > proc = subprocess.Popen ("ls /tmp", shell=True) > > > > or > > > > proc = subprocess.Popen (["ls", "/tmp"]) > > > > should work. > > > Why should I need to set shell=True? The default is s

Re: Tkinter menus made easy

2008-03-27 Thread Guilherme Polo
2008/3/27, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > Writing Tkinter menu code used to be rather tedious, uninspiring work. > I figured that I could delegate the job to a program: > I didn't look at it yet, but just in case you weren't aware there is a gui designer tool for tkinter called GUI Desi

Re: Is subprocess.Popen completely broken?

2008-03-27 Thread Guilherme Polo
2008/3/27, Skip Montanaro <[EMAIL PROTECTED]>: > I am trying to replace os.system calls with subprocess.Popen. This simple > example fails miserably: > > >>> proc = subprocess.Popen ("ls /tmp") proc = subprocess.Popen ("ls /tmp", shell=True) or proc = subprocess.Popen (["ls", "/tmp"]) should

Re: GUI toolkits with Tkinter's .pack() alternative

2008-03-27 Thread Guilherme Polo
2008/3/27, Alex9968 <[EMAIL PROTECTED]>: > Guilherme Polo wrote: > > 2008/3/27, Alex9968 <[EMAIL PROTECTED]>: > > > >> Guilherme Polo wrote: > >> > 2008/3/26, Alex9968 <[EMAIL PROTECTED]>: > >> > > >> >> Hi

Re: GUI toolkits with Tkinter's .pack() alternative

2008-03-27 Thread Guilherme Polo
2008/3/27, Alex9968 <[EMAIL PROTECTED]>: > Guilherme Polo wrote: > > 2008/3/26, Alex9968 <[EMAIL PROTECTED]>: > > > >> Hi all, > >> > >> I use Tkinter's Pack widget geometry manager (I really prefer it over > >> usi

Re: Tkinter menus from keyboard

2008-03-26 Thread Guilherme Polo
2008/3/26, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > Tkinter defaults to, for example, Alt+f = File (if File is your first > menu name starting with "f"). > > I'd like to assign my own letters and have them underscored, per the > universal standard. Can this be done? > Set the underline option t

Re: GUI toolkits with Tkinter's .pack() alternative

2008-03-26 Thread Guilherme Polo
2008/3/26, Alex9968 <[EMAIL PROTECTED]>: > Hi all, > > I use Tkinter's Pack widget geometry manager (I really prefer it over > using visual GUI designers), so my question is which other GUI toolkits > have similar functionality. The geometry manager isn't related to using GUI designers tools at

Re: what does ^ do in python

2008-03-25 Thread Guilherme Polo
2008/3/25, Dark Wind <[EMAIL PROTECTED]>: > Hi, > > In most of the languages ^ is used for 'to the power of'. In python we have > ** for that. But what does ^ do? It is bitwise xor. Some more information can be found at http://docs.python.org/ref/bitwise.html > I could not get it just by using it

Re: python library to manipulate PALM documents ?

2008-03-24 Thread Guilherme Polo
24 Mar 2008 13:36:13 GMT, Francesco Bochicchio <[EMAIL PROTECTED]>: > Hi all, > > anybody knows a python equivalent of the perl PALM::Doc module (and > eventually other PALM::). > > I have a e-book device wich reads mobi-pocket format (among others). I > have downloaded from a forum a set of pe

Re: Removal of tkinter from python 3.0? [was: Fate of the repr module in Py3.0]

2008-03-23 Thread Guilherme Polo
2008/3/21, "Martin v. Löwis" <[EMAIL PROTECTED]>: > > I've been thinking of volunteering to "port" Tkinter to Python 3.0, I > > hadn't noticed that there was any discussion of removing it. It would > > be a shame IMHO. > > > I don't think Tkinter will be removed. It works just fine in 3k. > > O

Re: Exctract GIF comment from image

2008-03-11 Thread Guilherme Polo
2008/3/11, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > Hi, > > simple question: The PIL does not support reading the optional > description in GIF Images. > > http://www.pythonware.com/library/pil/handbook/format-gif.htm > > After some reasearch I could not find a python solution for this, any >

Re: Timed execution in eval

2008-03-08 Thread Guilherme Polo
2008/3/7, Steven D'Aprano <[EMAIL PROTECTED]>: > On Fri, 07 Mar 2008 08:12:38 -0800, alex.pedwysocki wrote: > > > I have various bits of code I want to interpret and run at runtime in > > eval ... > > > I hope that code doesn't contain any data coming from an untrusted user. > > > > > I want to

Re: Official IRC channel for Python?

2008-02-27 Thread Guilherme Polo
27 Feb 2008 11:34:54 -0800, Paul Rubin <"http://phr.cx"@nospam.invalid>: > "Guilherme Polo" <[EMAIL PROTECTED]> writes: > > > I can join #perl, #php, #ruby, #mysql, #postgres without registration. > > > What advantage does it have? and the

Re: macro in python

2008-02-27 Thread Guilherme Polo
2008/2/27, bharath venkatesh <[EMAIL PROTECTED]>: > hi .. > how to create macro in python for set of instruction that is done > frequently but too less in number to ignore the overhead of function call > ... > > -- > http://mail.python.org/mailman/listinfo/python-list > There is lambda, not e

Re: Official IRC channel for Python?

2008-02-27 Thread Guilherme Polo
2008/2/27, js <[EMAIL PROTECTED]>: > > You can't join #python on freenode without identifying with nickserv > > first. > > > Why is that? > I can join #perl, #php, #ruby, #mysql, #postgres without registration. > What advantage does it have? and the advantage really worth? > The direct benefit

Re: how to finish a while loop...

2008-02-19 Thread Guilherme Polo
2008/2/19, icarus <[EMAIL PROTECTED]>: > Hi all, i'm new to python. Learning on my own how to ask a user to > finish a loop or not. > For some reason, it behaves as infinite loop although I changed its > condition. Please tell me what I'm doing wrong. Thanks in advance. > > > condition = True

Re: scary thought for consideration

2008-02-15 Thread Guilherme Polo
2008/2/15, Blubaugh, David A. <[EMAIL PROTECTED]>: > > > > To All, > > > I am wondering as far as the integration of MyHDL with Python 2.5, if there > might be any potential version incompatibility issues? What I mean is will > MyHDL not operate correctly, if it is executed with a Python 2.5 versi

Re: Time line for OJS migration

2008-02-14 Thread Guilherme Polo
2008/2/14, Maurice Ling <[EMAIL PROTECTED]>: > Hi Guilherme > > I've seen the site, it looks pretty good. > > Just wondering if you foresee any problems in moving the whole > installation to another server? If not, perhaps you can try to migrate > the documents (instructions for authors etc) to

Re: Email Directly from python

2008-02-13 Thread Guilherme Polo
2008/2/13, brad <[EMAIL PROTECTED]>: > I'd like to send email directly from within python without having to > rely on an external smtp server. You know, something like the good, old > Unix... > > echo My_message | mail -s Subject [EMAIL PROTECTED] I hope to not disappoint you, but mail will inv

Re: Write ooxml .ods (spreadsheat) from python?

2008-02-13 Thread Guilherme Polo
2008/2/13, Neal Becker <[EMAIL PROTECTED]>: > Guilherme Polo wrote: > > > 2008/2/13, Neal Becker <[EMAIL PROTECTED]>: > >> I'd like to output some data directly in .ods format. > > > > Do you want to output data from .ods file or do you wan

Re: Write ooxml .ods (spreadsheat) from python?

2008-02-13 Thread Guilherme Polo
2008/2/13, Neal Becker <[EMAIL PROTECTED]>: > I'd like to output some data directly in .ods format. Do you want to output data from .ods file or do you want to input data into an ods ? > This format appears > to be quite complex. Is there any python software available to do this? I > did look

Re: Python not finding modules

2008-02-13 Thread Guilherme Polo
you would need to include "/usr/local/lib/python2.4/site-packages/". Also, the path you add is a "starting point" for finding packages and modules, so can consider it recursive. > Thanks > Mani chandra > > > --- On Wed, 13/2/08, Guilherme Polo <[EMAIL PROT

Re: Basic question

2008-02-13 Thread Guilherme Polo
2008/2/13, WILLIAM SCHMIDT <[EMAIL PROTECTED]>: > In several places in the Python documentation I have run across an extra "r" > that I can not explain: > > > * > In sys.path after the open bracket: >sys.path = [r'd:\temp'] > > In the on line help in the DATA

Re: Python not finding modules

2008-02-13 Thread Guilherme Polo
2008/2/13, Mani Chandra <[EMAIL PROTECTED]>: > Hey! > I installed a few python modules through the freebsd ports, but when I > try to import them in the interpreter it says "module xxx not found". This > seems to happen for some modules and not for the others. ex:- I installed > psyco and pa

Re: 2to3.py download

2008-02-12 Thread Guilherme Polo
2008/2/12, Robin Becker <[EMAIL PROTECTED]>: > Can anyone say how to go about obtaining 2to3.py the Python-3.0 conversion > utility? There is a copy in the 3.0a2 Tools folder, but it lacks some of the > sub > folders. I tried various svn ls commands, but couldn't locate the actual > repository.

Re: wxpython file dialog

2008-02-11 Thread Guilherme Polo
2008/2/11, Mike Driscoll <[EMAIL PROTECTED]>: > On Feb 11, 2008 12:14 PM, Guilherme Polo <[EMAIL PROTECTED]> wrote: > > 2008/2/11, Mike Driscoll <[EMAIL PROTECTED]>: > > > On Feb 10, 6:41 am, Janwillem <[EMAIL PROTECTED]> wrote: > > > > Guilhe

Re: wxpython file dialog

2008-02-11 Thread Guilherme Polo
2008/2/11, Mike Driscoll <[EMAIL PROTECTED]>: > On Feb 10, 6:41 am, Janwillem <[EMAIL PROTECTED]> wrote: > > Guilherme Polo wrote: > > > 2008/2/10, Janwillem <[EMAIL PROTECTED]>: > > >> Guilherme Polo wrote: > > >> > 2008/2/9, Janw

Re: wxpython file dialog

2008-02-10 Thread Guilherme Polo
2008/2/10, Janwillem <[EMAIL PROTECTED]>: > Guilherme Polo wrote: > > 2008/2/9, Janwillem <[EMAIL PROTECTED]>: > > >> Is there a way to force the wx.FileDialog to show as default the > >> thumbnails vie in stead of list view? > >> thanks, jan

Re: wxpython file dialog

2008-02-09 Thread Guilherme Polo
2008/2/9, Janwillem <[EMAIL PROTECTED]>: > Is there a way to force the wx.FileDialog to show as default the > thumbnails vie in stead of list view? > thanks, janwillem > > -- > http://mail.python.org/mailman/listinfo/python-list > You should be using wx.lib.imagebrowser.ImageDialog instead of w

Re: Edit Python code programmatically

2008-02-09 Thread Guilherme Polo
2008/2/9, Alex <[EMAIL PROTECTED]>: > Guilherme Polo wrote: > > 2008/2/9, Alex <[EMAIL PROTECTED]>: > > > >> Guilherme Polo wrote: > >> > 2008/2/9, Arnaud Delobelle <[EMAIL PROTECTED]>: > >> > > >> >> On F

Re: Edit Python code programmatically

2008-02-09 Thread Guilherme Polo
2008/2/9, Alex <[EMAIL PROTECTED]>: > Guilherme Polo wrote: > > 2008/2/9, Arnaud Delobelle <[EMAIL PROTECTED]>: > > > >> On Feb 9, 12:32 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > >> > 2008/2/9, Alex <[EMAIL PROTECTED]

Re: Edit Python code programmatically

2008-02-09 Thread Guilherme Polo
2008/2/9, Arnaud Delobelle <[EMAIL PROTECTED]>: > On Feb 9, 12:32 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > > 2008/2/9, Alex <[EMAIL PROTECTED]>: > > > > > Guilherme Polo wrote: > > > > 2008/2/9, Alex <[EMAIL PROTECT

  1   2   >