On Apr 7, 3:58 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
>
> I believe the best way to implement this would be a binary search
> (bisect?) on the actual times, which would be O(log N).
bisect is definitely the way to go. You should take care with
floating point precision, though. One way to do
In article <[EMAIL PROTECTED]>,
alex23 <[EMAIL PROTECTED]> wrote:
>(Aahz) wrote:
>> alex23 wrote:
>>>
>>>The usual
>>>response to complaining about the lack of a killfile for Google Groups
>>>has been "use a decent client", but as I'm constantly moving between
>>>machines having a consistent app f
In article <[EMAIL PROTECTED]>,
Jorgen Grahn <[EMAIL PROTECTED]> wrote:
>
>I believe it is better to write a script which drives a widely known
>and well-tested copying utility. On Unix these include tar, cpio and
>rsync -- don't know which ones are common under DOS (xcopy?)
Just use pax (I haven
En Mon, 07 Apr 2008 20:52:54 -0300, skunkwerk <[EMAIL PROTECTED]>
escribió:
> I'm getting errors when reading from/writing to pipes that are fairly
> large in size. To bypass this, I wanted to redirect output to a file
> in the subprocess.Popen function, but couldn't get it to work (even
> afte
On Apr 7, 4:59 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> "Mark Dickinson" <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
>
> Thank you for the corrections. Here is my revised proposal:
>
> int([number | string[, radix])
> ...
Excellent!
It looks to me as though this covers e
"Mark Dickinson" <[EMAIL PROTECTED]> wrote in message
| Excellent!
| It looks to me as though this covers everything. I'm tempted to
| quibble about exact wordings, but probably the most productive thing to
do
| would be just to submit this to bugs.python.org and then let Georg Brandl
| work his
I noticed it's happening at the line that does the parsing:
dom = minidom.parse(usock),
in pyaws/ecs.py
I'll look into how to turn off the outputting.
On Apr 7, 4:20 pm, steve <[EMAIL PROTECTED]> wrote:
> Anyone familiar with pyAmazon ( the latest for AWS 4
En Mon, 07 Apr 2008 14:59:08 -0300, Terry Reedy <[EMAIL PROTECTED]>
escribió:
> "Ronn Ross" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> | This is my first post and I'm new to Python. How would someone go about
> | adding keywords to Python? It would be great to add support for
I am actually tryng to build a database apps in python + storm which use
MySQLdb 1.2.2
i actually want the auto reconnect feature of storm, which just need to
change the False param of raw_connect to True in storm/databases/mysql.py so
far nothing really difficult but from there i got quite a weir
Gabriel Genellina wrote:
> En Sun, 06 Apr 2008 19:20:31 -0300, Brian Blais <[EMAIL PROTECTED]>
> escribió:
>
>> I need to read a series of large zipfiles (which only contain one
>> large text file), and I noticed that the zipfile module:
>>
>> 1) has a read method which isn't an iterator, and ret
Are there documents,books, articles that can introduce me to the python
source code base ?
Thank you!
Avi
--
http://mail.python.org/mailman/listinfo/python-list
Hi Matt. My apologies, I was away a good part of the day and evening
today. Here are the numbers for the different methods:
original os.system call: 29.685759 s
buffered stdout call:213.370982 s (with 1mb buffer)
direct to stdout call:33.378756 s
The second method worked great and is e
Hi Guys,
I have been working in python from some time now,
while writing a python script i used: import MySQLdb in my script to do some
database related operations.
When i tried to execute the same script on another system it gave me an
error as:
"ImportError: No module named MySQLdb"
though mysqld
How do I pass a dictionary to a function as an argument?
# Say I have a function foo...
def foo (arg=[]):
x = arg['name']
y = arg['len']
s = len (x)
t = s + y
return (s, t)
# The dictionary:
dict = {}
dict['name'] = 'Joe Shmoe'
dict['len'] = 44
# I try to pass the dictionary as an argument
On 2008-04-07 08:54:09 PM, BonusOnus wrote:
> How do I pass a dictionary to a function as an argument?
>
>
> # Say I have a function foo...
> def foo (arg=[]):
Try:
def foo(arg={}):
Thanks,
Ricky
pgpXEZLwP4mLj.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-l
En Mon, 07 Apr 2008 15:17:26 -0300, Victor Subervi
<[EMAIL PROTECTED]> escribió:
>> sql = "insert into PRODUCTS (PRODID, NAME, DESCRIPTION) " \
>> "values (%s,%s,%s);"
>> cursor.execute(sql, (prodid, prodname, description))
>>
>> and it works fine.
>>
>> Note that execute has t
BonusOnus wrote:
> How do I pass a dictionary to a function as an argument?
>
>
> # Say I have a function foo...
> def foo (arg=[]):
> x = arg['name']
> y = arg['len']
>
> s = len (x)
>
> t = s + y
>
> return (s, t)
I assume you actually indented the body of the function?
> # The dictionary:
On Apr 7, 10:54 pm, BonusOnus <[EMAIL PROTECTED]> wrote:
> How do I pass a dictionary to a function as an argument?
The same way you pass any other argument.
> # Say I have a function foo...
> def foo (arg=[]):
It's generally a bad idea to use [] as a default argument.
> x = arg['name']
> y = a
On Apr 7, 5:34 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote:
> bijeshn wrote:
> > the extracted files are to be XML too. ijust need to extract it raw
> > (tags and data just like it is in the parent XML file..)
>
> Ah, so then replace the "print tostring()" line in my example by
>
> ET.ElementTr
"Avi Kohn" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Are there documents,books, articles that can introduce me to the python
| source code base ?
This has been asked before. The general answer has been to look at the
code. Perhaps you can find some of the more specific an
En Tue, 08 Apr 2008 00:10:01 -0300, John Nagle <[EMAIL PROTECTED]>
escribió:
> Gabriel Genellina wrote:
>> En Sun, 06 Apr 2008 19:20:31 -0300, Brian Blais <[EMAIL PROTECTED]>
>> escribió:
>>
>>> I need to read a series of large zipfiles (which only contain one
>>> large text file), and I noticed
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| En Mon, 07 Apr 2008 14:59:08 -0300, Terry Reedy <[EMAIL PROTECTED]>
| escribió:
| > If you want other-language keywords, you should either use a translator
| > processor or an editor that will do keyword substitutio
En Tue, 08 Apr 2008 00:35:29 -0300, syed mehdi <[EMAIL PROTECTED]>
escribió:
> I have been working in python from some time now,
> while writing a python script i used: import MySQLdb in my script to do
> some
> database related operations.
> When i tried to execute the same script on another
On Apr 7, 8:54 pm, BonusOnus <[EMAIL PROTECTED]> wrote:
> How do I pass a dictionary to a function as an argument?
>
> # Say I have a function foo...
> def foo (arg=[]):
> x = arg['name']
> y = arg['len']
>
> s = len (x)
>
> t = s + y
>
> return (s, t)
>
> # The dictionary:
>
> dict = {}
> dict['na
Plus you probably don't want to set [] as default argument and then try to
access it like a dictionary; you'll get an exception if you ever call just
foo(), with no argument.
On Tue, Apr 8, 2008 at 12:57 AM, Jason Scheirer <[EMAIL PROTECTED]>
wrote:
> On Apr 7, 8:54 pm, BonusOnus <[EMAIL PROTECTE
En Tue, 08 Apr 2008 00:54:09 -0300, BonusOnus <[EMAIL PROTECTED]>
escribió:
> How do I pass a dictionary to a function as an argument?
The indentation is lost, so it's not easy to check your program.
> # Say I have a function foo...
Original: def foo(arg=[]). An empty list isn't a good defaul
En Tue, 08 Apr 2008 01:57:47 -0300, Jason Scheirer
<[EMAIL PROTECTED]> escribió:
> You want to
> return s, t
> NOT return (s, t) -- this implicitly only returns ONE item
To avoid confusing the poor newbie: No, they're absolutely the same thing,
in both cases you're returning a tuple with two
Thanks Gabriel, it worked after installing MySQL (database engine).
Regards
Syed
On Tue, Apr 8, 2008 at 10:23 AM, Gabriel Genellina <[EMAIL PROTECTED]>
wrote:
> En Tue, 08 Apr 2008 00:35:29 -0300, syed mehdi <[EMAIL PROTECTED]>
> escribió:
>
> > I have been working in python from some time now,
>
On Apr 7, 11:40 pm, John Nagle <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > I want to iterate through the lines of a file in a recursive function
> > so I can't use:-
>
> > f = open(listfile, 'r')
> > for ln in f:
>
> > because when the function calls itself it won't see any mo
On Apr 7, 9:54 am, Steve Holden <[EMAIL PROTECTED]> wrote:
> Ronn Ross wrote:
> > This is my first post and I'm new to Python. How would someone go about
> > adding keywords to Python? It would be great to add support for
> > Esperanto keywords in the language instead of English being the only
> >
On Apr 8, 3:47 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> Python 3 allows for unicode identifiers, but I don'k know any plans for
> using unicode keywords too. Looks funny:
>
> ∀ x ∈ values:
> if x ∉ forbidden ∧ x ≠ y:
> print(x, Γ(x), √(x))
> print(∑(values))
> near = λ a,b,ε=0
On Apr 7, 9:38 am, [EMAIL PROTECTED] wrote:
> Folks,
> Is it possible to read hash values from txt file.
> I have script which sets options. Hash table has key set to option,
> and values are option values.
>
> Way we have it, we set options in a different file (*.txt), and we
> read from that file
Hallöchen!
Gabriel Genellina writes:
> [...]
>
> Python 3 allows for unicode identifiers, but I don'k know any
> plans for using unicode keywords too. Looks funny:
>
> ∀ x ∈ values:
> if x ∉ forbidden ∧ x ≠ y:
> print(x, Γ(x), √(x))
> print(∑(values))
> near = λ a,b,ε=0.01: a-ε ≤ b ≤ a+ε
A
On Apr 7, 1:19 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> On 7 avr, 07:34, CM <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Apr 5, 11:50 am, Jetus <[EMAIL PROTECTED]> wrote:
>
> > > I have a need for a database program. I downloaded the db2 from ibm,
> > > and reviewed some of the documentation
On Apr 8, 6:47 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
[...]
> Although I would use ∀ and ∃ as aliases for all()
> and exists() :)
I mean all() and any() of course
--
Arnaud
--
http://mail.python.org/mailman/listinfo/python-list
En Tue, 08 Apr 2008 03:03:13 -0300, Torsten Bronger
<[EMAIL PROTECTED]> escribió:
> Gabriel Genellina writes:
>>
>> Python 3 allows for unicode identifiers, but I don'k know any
>> plans for using unicode keywords too. Looks funny:
>>
>> ∀ x ∈ values:
>> if x ∉ forbidden ∧ x ≠ y:
>> print(
En Tue, 08 Apr 2008 03:28:54 -0300, Arnaud Delobelle
<[EMAIL PROTECTED]> escribió:
> On Apr 8, 6:47 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> [...]
>> Although I would use ∀ and ∃ as aliases for all()
>> and exists() :)
>
> I mean all() and any() of course
Yes, I thought about that usag
101 - 137 of 137 matches
Mail list logo