Hello list,
KhmerOS is going to write an XLIFF translation editor with Python. Before
starting, we would like to know which Graphical Toolkit should be used for
the editor which supports many languages including Latin, Indic, Arabic and
so on. However, there are many GUI toolkits such as QT, GT
Dnia niedziela, 25 czerwca 2006 22:45, Bob Gailer napisał:
> To get the behavior I think you want try:
>
> def __init__(self, q = None):
> if not q: q = []
> self.queue = q
I would disagree... This sure works for empty arguments, but:
>>> u = [1,2,3]
>>> a = Queue(u)
>>> b =
Luke,
You are confusing me for the OP. Please read carefully next time before you
respond to the wrong person.
I bumped because the OP's question was not specific and I thought I talked
about people making their requests or questions very specific if they expect
any useful replies.
So, Luke t
> That is close but not quite right. The correct import will be
> from mymodules import mymodule1
>
> Kent
My apologies for misleading instructions.
Emily
>
>>
>>
>> Laszlo Antal wrote:
>>> Hi,
>>>
>>> This is how my directory looks
>>> myprogram(this is the main folder for my program)
>>>
On Sun, 25 Jun 2006, ravi sankar wrote:
>we are doing an intranet portral search.we had a look at the
> tutorials for Regular expressions...we need an insight on how to
> implement this.we r in the process of developing a unified search...
If you have a question, please ask it directly.
>> The values of optional arguments are only once evaluated (when Python
>> reads the definition). If you place there mutable objects like e.g. a
>> list most of the time the effect you see is not what you want. So you
>> have to write it a bit different.
>>
>> def __init__(self, q = None):
> You are confusing me for the OP. Please read carefully next time before
> you respond to the wrong person.
>
> I bumped because the OP's question was not specific and I thought I
> talked about people making their requests or questions very specific if
> they expect any useful replies.
Hi E
On Sun, 2006-06-25 at 20:14 -0400, Rene Bourgoin wrote:
> What is the best way to handle the resutls to a fetchall() command?
> The result seems to be a list of tuples [(aaa,bbb,ccc0,(11,222,333,)].
Correct
> I'm new to programming but it seems that what ever I try to accomplish
> at some point i
Stop the emails???
im getting more than i need
regards
_
The new MSN Search Toolbar now includes Desktop search!
http://join.msn.com/toolbar/overview
___
Tutor maillist - Tutor@python.or
> What is the best way to handle the resutls to a fetchall() command?
> The result seems to be a list of tuples
> [(aaa,bbb,ccc0,(11,222,333,)].
Yes, thats usually the most convenient way to present groups of data.
> I'm new to programming but it seems that what ever I try to
> accomplish
> at
>>> ARTICLES = ('XXX9', 'ABZ2')
>>> TESTARTICLENAME = """SELECT * FROM tblForTransfer2Prodsite
>>> WHERE articleName IN %r""" % (ARTICLES,)
This uses normal string substitution so puts the tuple ARTICLES
in the query using the repr format - includes parens) which is what
you want.
(BTW us
Hey Everybody, First off, I like to thank Kent, Alan, and Danny for their invaluable help. You guys are amazing! I do have some questions about unit testing. I have read through the diving into python section about unit testing as well as the documentation from the python docs. While tha
"Tino Dai" <[EMAIL PROTECTED]> writes:
> How do I simulate my queues and other sources of data. In Java, there
> is a program called JMock that you can use to simulate that. Is there
> anything like that in Python or do I roll my own and create the appropriate
> queues with some data in the
Tino Dai wrote:
> Hey Everybody,
>
> First off, I like to thank Kent, Alan, and Danny for their
> invaluable help. You guys are amazing!
You are welcome!
>I do have some questions about unit testing.
>
>I have a part of the code that writes to the filesystem. Is the
> o
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of shane davin
> Sent: Monday, June 26, 2006 9:15 AM
> To: Tutor@python.org
> Subject: [Tutor] (no subject)
>
> Stop the emails???
> im getting more than i need
> regards
>
> _
Gregor:
Doesn't this really belong on Python-announce-list instead of here? You
aren't asking any questions and you are announcing a new python-based
application. That's what Python-announce-list is for. Post your
announcement there and you will get plenty of feedback for your next
release.
I often write unit tests that do this. In my opinion it is simple and straightforward and effective. Some purists will insist that a unit test shouldn't write the file system or touch a database or use any other external resource, but I think that is silly - if the job of a bit of code is to write
I tried this expecting an exceptionIn [2]: math.tan(math.pi/2)Out[2]: 16331778728383844.0so I thought maybe that was a float limit which it probably is as you get weird results from higher values but it seems strange that it tries to run with it.
In [5]: 16331778728383844.0Out[5]: 16331778728383844
Hey all,
I am needing help on this. Why isn't it saving the
data beore exiting the program? I don't get an error before
exiting.
Here's the code so far:
accountlist = {}
def load_file(ac): import
os import pickle filename =
'accounts.txt' if
os.path.exists(filename):
Nathan Pinno wrote:
> Hey all,
>
> I am needing help on this. Why isn't it saving the data beore exiting
> the program?
But it does save it. What evidence do you have that it is not?
Please in the future always tell us what the evidence of a problem is.
Also I suggest you add validation of use
Bob Gailer wrote:
> Nathan Pinno wrote:
>
>> Hey all,
>>
>> I am needing help on this. Why isn't it saving the data beore exiting
>> the program?
>>
> But it does save it. What evidence do you have that it is not?
>
> Please in the future always tell us what the evidence of a problem is.
How do I know? Simple. Next time I load it and ask it to print the list of
accounts and how much in each, I only get:
Account Info
then the menu again, with no info.
Nathan Pinno
- Original Message -
From: "Bob Gailer" <[EMAIL PROTECTED]>
To: "Bob Gailer" <[EMAIL PROTECTED]>
Cc: "Natha
Nathan Pinno wrote:
> How do I know? Simple. Next time I load it and ask it to print the
> list of accounts and how much in each, I only get:
>
> Account Info
>
> then the menu again, with no info.
Ah. But the program starts setting accountlist = {}. When you reach
printall, accountlist is still
but it contains a semaphore from another class.
Now, I
> could make the semaphore a global variable, or I bring in the other
class.
> One violates "good" programming principles and the other violates the
unit
> testing principles. Is there another way?
>
> -Tino
> -
Would it be this line?
pickle.dump(ac, store)
Would this make it work?
ac = pickle.dump(store)
Nathan
- Original Message -
From: "Bob Gailer" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]>
Cc:
Sent: Monday, June 26, 2006 5:33 PM
Subject: Re: [Tutor] Why doesn't it save the
Nathan Pinno wrote:
I already told you that the data is being saved to the file. And is
being reloaded by ac = pickle.load(store). But the reloaded data is not
being assigned to accountlist, since parameters to functions are treated
as local variables. Assigning to a parameter in a function doe
> Ok, that leads me to my next question. Currently, I have a class
> that I
> want to unit test, but it contains a semaphore from another class.
> Now, I
> could make the semaphore a global variable, or I bring in the other
> class.
> One violates "good" programming principles and the other vio
Hi Nathan,
> How do I know? Simple. Next time I load it and ask it to print the
> list of accounts and how much in each, I only get:
OK, but that could be down to:
1) The save file not working,
2) the load file not working
3) the print accounts not working
Have you checked whether the store fil
On 6/26/06, Tino Dai <[EMAIL PROTECTED]> wrote:
[...]
> How would I unit test python GUIs
Few weeks back I wrote a small article,
may be helpful, so here it is :
http://baijum81.livejournal.com/11598.html
Regards,
Baiju M
___
Tutor maillist - Tutor@py
29 matches
Mail list logo