On Thu, 14 Jul 2005 08:55:35 +0530
Sandip Bhattacharya <[EMAIL PROTECTED]> wrote:
> ZIYAD A. M. AL-BATLY wrote:
> >
>
> You really should look at the wxwindows licence then.
> http://www.opensource.org/licenses/wxwindows.php
>
> It is LGPL + more freedom for commercial users.
>
>
> >
> >
ZIYAD A. M. AL-BATLY wrote:
>
> One of the applications that uses GTK+ (version 2.X) and Python is
> BitTorrent¹ (starting with version 4.0). As far as I know, all GTK+ 2.x
> applications under Windows have a native look. I don't know my self as
> I don't have Windows.
I use gimp on windows re
Quoting Ron Weidner <[EMAIL PROTECTED]>:
> What's wrong with this code? Or more to the point,
> how do you set the focus to an Entry widget?
Look at what the error message is saying:
> self.cmd.focus()
> AttributeError: 'NoneType' object has no attribute
> 'focus'
Translation: self.cmd is a '
I've struggled... Now I'm asking...
What's wrong with this code? Or more to the point,
how do you set the focus to an Entry widget?
Traceback (most recent call last):
File "./run_dialogue.py", line 33, in ?
app = Run_dialogue( root )
File "./run_dialogue.py", line 23, in __init__
sel
Hi everyone...
On Tue, 2005-07-12 at 22:08 +0530, Sandip Bhattacharya wrote:
> 2. Gtk. Simple API. A great RAD GUI builder (Glade). Cons are that you
> have to have Pygtk installed on windows for your apps to run (I am not
> sure if py2exe will package them for you as a standalone). Another co
> I initialize them by putting None along all the fields
Actually you don't.
def initialize(self):
self.buttonmatrix=[]
self.statematrix=[]
self.bombmatrix=[]
3 empty lists, so far so good.
for i in range(self.fil):
aux=[]
for j in ra
Quoting Dave S <[EMAIL PROTECTED]>:
> >But I do not understand where Frame fits in to this ... ie
> >
> >from Tkinter import *
> >class Hello(Frame):
> >
> > def __init__(self, parent=None):
> > Frame.__init__(self, parent)
> > self.pack()
> >
> >
> >Why not just use 'class Hello(root)' ? Or have
Hello, everyone!
I am trying to figure out what a palette actually is, how it works,
and what PIL's "putpalette()" does with a given data set (it has to be
a string, I believe). PIL's documentation says very close to nothing
at all, and googling it has given me several other examples of doing
wha
Quoting Joseph Quigley <[EMAIL PROTECTED]>:
> Hi,
> what's the **kw stand for, used for? What does it mean?
Sorry about that. A couple of people have already answered; I'll just give you
a couple of examples which might help you understand:
>>> def showArgs(**kw):
... print kw
...
>>> s
Hi Alberto,
The issue you're seeing is in the intialize() code:
##
def initialize(self):
self.buttonmatrix=[]
self.statematrix=[]
self.bombmatrix=[]
for i in range(self.fil):
aux=[]
for j in range(self.col):
aux.app
> Does this make sense so far? Please feel free to ask more questions.
I forgot to mention that you might want to look at:
http://www.python.org/doc/faq/programming.html#how-do-i-create-a-multidimensional-list
since it's relevant to the code that you're writing. Best of wishes to
you!
___
Mike Hansen wrote:
> The docs for fromtimestamp weren't clear to me. i.e. not spelling it out that
> it
> converts from seconds from the epoch(which must be the POSIX timestamp it's
> referring to).
You just have to dig a little in the docs:
datetime.datetime.fromtimestamp(timestamp[, tz])
On Wed, 13 Jul 2005 08:13:42 +
Joseph Quigley <[EMAIL PROTECTED]> wrote:
> Hi,
> what's the **kw stand for, used for? What does it mean?
>
**kw means that there is an optional list of keyword arguments that you can
pass to __init__
(for example: main = Main(background="black") ). Key
Joseph Quigley wrote:
> Hi,
> what's the **kw stand for, used for? What does it mean?
>
>
[...]
>>
>>class Main(Frame):
>> def __init__(self, master=None, **kw):
>> Frame.__init__(self, master, **kw)
>>
It is the python way to pass along all keyword arguments (xxx=yyy).
So in t
Hey tutors
I think I got this a little, but I have a very weird problem
This is the code I'm using:
##
class buscaminas(object):
def __init__(self):
self.col=0
self.marcas=Tkinter.BooleanVar()
self.color=Tkinter.BooleanVar()
self.sonido=T
> Subject:
> Re: [Tutor] deleting files that are older than x days old
> From:
> Kent Johnson <[EMAIL PROTECTED]>
> Date:
> Wed, 13 Jul 2005 13:50:47 -0400
>
> CC:
> tutor@python.org
>
>
> Mike Hansen wrote:
>
>> How do you convert a time represented in seconds from the epoch into a
>> datetim
Mike Hansen said unto the world upon 13/07/2005 12:54:
> From a python program, I want to delete certain files that are older than x
> days old.
>
> To get the time that the file was last modified, it looks like I need to use
> os.path.getmtime(path). This gives you the time represented in the
Hi Dave,
I saw that you're starting to learn Tkinter programming; as I was browsing
through the Beginners Guide on the Python Wiki, I ran into this:
http://wiki.python.org/moin/Intro_to_programming_with_Python_and_Tkinter
Unfortunately, I can't watch it myself because my Linux box doesn't have
t
> I'm trying to migrate a lot of data from an accounting
> system software to another using Python.
he easiest way to do this is usually to create a set of
views using SQL in one database that map to the schema
in the other. You can then read the table data out of
the views and export it into
> of useful stuff. I still need to workout the best way to ask a user
> for a root password, show when typed and then pass it to the
> system...
There is a module for password handling - getpass I think it is
called,
but a browse of the library docs should find it.
The other one you might
Mike Hansen wrote:
> From a python program, I want to delete certain files that are older than x
>days old.
>
>How do you convert a time represented in seconds from the epoch into a
>datetime
>object?
>
>
using unix time (seconds from the epoch) is rather easy. what I would
do in this case i
Mike Hansen wrote:
> How do you convert a time represented in seconds from the epoch into a
> datetime
> object?
Use datetime.datetime.fromtimestamp():
>>> import os, datetime
>>> t=os.path.getmtime('build.xml')
>>> t
1115045692
>>> d=datetime.datetime.fromtimestamp(t)
>>> d
datetime.datet
Hi,
what's the **kw stand for, used for? What does it mean?
> Some comments ---
>
> You create a Frame, but you never use it.
>
> You've put a whole lot of code in a class, but it's not in a class method.
> This
> is kinda missing the point of using classes in the first place (and it j
From a python program, I want to delete certain files that are older than x
days old.
To get the time that the file was last modified, it looks like I need to use
os.path.getmtime(path). This gives you the time represented in the number of
seconds from the epoch.
I'd like to convert this into
Negroup - wrote:
> Anyway, I'm learning Python and just for exercise I'll try to
> implement a simple sql-like interface for querying dictionaries!
It might be a better use of your time to learn about Python's built-in
abilities to manipulate lists and dictionaries, which are powerful and simple.
2005/7/13, Sandip Bhattacharya <[EMAIL PROTECTED]>:
> Negroup - wrote:
[cut]
>
> Why dont you use python-sqlite to dump your data? You might need to
> modify your sql slightly(depending on your current db), but rest is all sql.
Thanks for the suggestion, I didn't even know about python-sqlite
exi
Kent Johnson wrote:
>Dave S wrote:
>
>
>>>But I do not understand where Frame fits in to this ... ie
>>>
>>>
>>>
>>>from Tkinter import *
>>
>>
>>
>>>class Hello(Frame):
>>>
>>> def __init__(self, parent=None):
>>> Frame.__init__(self, parent)
>>> self.pack()
>>>
>>>
>>>Why
Dave S wrote:
>>But I do not understand where Frame fits in to this ... ie
>>
>
>>from Tkinter import *
>
>>class Hello(Frame):
>>
>> def __init__(self, parent=None):
>> Frame.__init__(self, parent)
>> self.pack()
>>
>>
>>Why not just use 'class Hello(root)' ? Or have I missed the
Dave S wrote:
>Hi all,
>
>Im on the Tkinter GUI learning curve :-) . Its going quite well - im
>reading O'reilly 'programming python' but I am unclear on the following
>
>I understand the standard form ie ...
>
>root = Tk()
>test = button(root, text = ..).pack()
>etc
>
>I also understand .
Hi all,
Im on the Tkinter GUI learning curve :-) . Its going quite well - im
reading O'reilly 'programming python' but I am unclear on the following
I understand the standard form ie ...
root = Tk()
test = button(root, text = ..).pack()
etc
I also understand
independant_win = Topl
Personally the type of import statement depends upon the module
imported, the use of the module and personal preferences.
from Module import *
produces certainly the danger of namespace pollution, and should be used
if at all only with pervasive modules that are designed to be used this
way. Typ
Negroup - wrote:
> Hi all, I hope my questions makes sense..
> I'm trying to migrate a lot of data from an accounting system software
> to another using Python. Software A stores datas inside sql tables,
> software B too, with a different db structure.
>
> My idea has been to export sensible table
Hi all, I hope my questions makes sense..
I'm trying to migrate a lot of data from an accounting system software
to another using Python. Software A stores datas inside sql tables,
software B too, with a different db structure.
My idea has been to export sensible tables from db A, store them in
py
33 matches
Mail list logo