Neil Cerutti a écrit :
(snip)
> class bar:
> def readgenome(self, filehandle):
> self.s = ''.join(line.strip() for line in filehandle)
=>
self.s = ''.join(line.strip() for line in filehandle if not
'>' in line)
--
http://mail.python.org/mailman/listinfo/python-list
Jay Loden wrote:
> Hi all,
>
> First, apologies if anyone gets this twice, but it took me quite a
> while to figure out that Python.org is evidently rejecting all mail
> from my mail server because I don't have reverse DNS configured.
> Anyway:
>
> I'm not even sure how to phrase this question pr
En Thu, 14 Jun 2007 01:56:13 -0300, why? <[EMAIL PROTECTED]> escribió:
> I tried but its not working. Here's a code for sum of two numbers. Now
> how do i save it?
>
#! /usr/bin/env python
> ...
def sum(x,y):
> ... return x+y
> ...
x=int(raw_input('Enter a number: '))
> Enter a
Also, how can i save a file using text editor in linux?
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 13, 5:40 pm, [EMAIL PROTECTED] wrote:
> Hi all,
>
> I am running Python 2.5 on Feisty Ubuntu. I came across some code that
> is substantially slower when in a method than in a function.
>
> >>> cProfile.run("bar.readgenome(open('cb_foo'))")
>
> 20004 function calls in 10.214 CPU sec
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> take virtually the same amount of time on my machine (2.5), and the
> non-join version is clearer, IMO. I'd still use join in case I wind
> up running under an older Python, but it's probably not a big issue here.
You should not rely on using 2.5
En Thu, 14 Jun 2007 01:39:29 -0300, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> escribió:
> Gabriel Genellina wrote:
>> In addition, += is rather inefficient for strings; the usual idiom is
>> using ''.join(items)
>
> Ehh. Python 2.5 (and probably some earlier versions) optimize += on
> strings prett
Gabriel Genellina wrote:
> En Wed, 13 Jun 2007 23:11:22 -0300, nik <[EMAIL PROTECTED]> escribió:
>> It would seem that I want to actually save the source code for the
>> class. I know that I could of course open up an editor and just make
>> it, but my ideal would be to have the base class, Map, be
"Eric Spaulding" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Is there an easy way to pass arguments to a handler class that is used by
> the standard TCPServer?
>
> normally --> srvr =SocketServer.TCPServer(('',port_num), TCPHandlerClass)
>
> I'd like to be able to: srvr =Socke
I tried but its not working. Here's a code for sum of two numbers. Now
how do i save it?
>>> #! /usr/bin/env python
...
>>> def sum(x,y):
... return x+y
...
>>> x=int(raw_input('Enter a number: '))
Enter a number: 35
>>> y=int(raw_input('Enter a number: '))
Enter a number: 7
>>> print 'sum is
Hi all,
First, apologies if anyone gets this twice, but it took me quite a
while to figure out that Python.org is evidently rejecting all mail
from my mail server because I don't have reverse DNS configured.
Anyway:
I'm not even sure how to phrase this question properly or the right
terminology o
On Jun 13, 10:19 pm, Eric Spaulding <[EMAIL PROTECTED]> wrote:
> Is there an easy way to pass arguments to a handler class that is used
> by the standard TCPServer?
>
> normally --> srvr =SocketServer.TCPServer(('',port_num), TCPHandlerClass)
>
> I'd like to be able to: srvr =SocketServer.TCPServer
Gabriel Genellina wrote:
> In the function above, s is a local variable, and accessing local
> variables is very efficient (using an array of local variables, the
> compiler assigns statically an index for each one).
> Using self.s, on the other hand, requires a name lookup for each access.
> The m
"Gabriel Genellina" <[EMAIL PROTECTED]> writes:
> En Wed, 13 Jun 2007 17:35:19 -0300, Paul McNett <[EMAIL PROTECTED]> escribió:
>
>> Tempo wrote:
>>> Has anyone sucesfully built a *.exe file on a mac operating system
>>> before from a *.py file? I have been trying to do this with
>>> pyinstaller,
On 2007-06-14, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> The method takes > 10 seconds, the function call 0.041 seconds!
What happens when you run them in the other order?
The first time you read the file, it has to read it from disk.
The second time, it's probably just reading from the buf
Rob Wolfe wrote:
> # HTML page
> dinner_recipe = '''
> Recipe
>
> amtunititem
> 24slicesbaguette
> 2+tbspolive_oil
> 1cuptomatoes
> 1-2tbspgarlic
> 1/2cupParmesan
> 1jarpesto
>
> '''
>
> # program
> import xml.etree.ElementTree as etree
> tree = etree.fromstring(dinner_recipe)
>
> #import Eleme
James Turk wrote:
> It actually occured to me that I could use a @classmethod to do the
> loading and take that out of the BaseClass constructor. What I have
> makes more sense and eliminates the unecessary constructors.
>
> ie.
>
> class BaseClass:
> @classmethod
> def loadData(params):
Paul Rubin wrote:
> "Diez B. Roggisch" <[EMAIL PROTECTED]> writes:
>
>>And if only the html-parsing is slow, you might consider creating an
>>extension for that. Using e.g. Pyrex.
>
>
> I just tried using BeautifulSoup to pull some fields out of some html
> files--about 2 million files, output o
En Wed, 13 Jun 2007 23:11:22 -0300, nik <[EMAIL PROTECTED]> escribió:
> On Jun 13, 6:48 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
> wrote:
>> En Wed, 13 Jun 2007 22:20:16 -0300, nik <[EMAIL PROTECTED]> escribió:
>>
>> > I would like to create a class and then save it for re-use later. I
>> > hav
--- Steven Bethard <[EMAIL PROTECTED]> wrote:
> Rob Wolfe wrote:
> > Steve Howell wrote:
> >
> >> I suggested earlier that maybe we post multiple
> >> solutions. That makes me a little nervous, to
> the
> >> extent that it shows that the Python community
> has a
> >> hard time coming to consens
> On Thu, 14 Jun 2007 09:32:10 +1000, Ben Finney wrote:
>
>> "Dr. Pastor" <[EMAIL PROTECTED]> writes:
>>
>>> Please do not do business with those cretins
>>> who without authorization attaching [spam footers]
>>
>> Indeed. The cost of Usenet access should not be translated
>> to spam on message
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes:
> And if only the html-parsing is slow, you might consider creating an
> extension for that. Using e.g. Pyrex.
I just tried using BeautifulSoup to pull some fields out of some html
files--about 2 million files, output of a web crawler. It parsed very
On Jun 13, 6:48 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Wed, 13 Jun 2007 22:20:16 -0300, nik <[EMAIL PROTECTED]> escribió:
>
> > I would like to create a class and then save it for re-use later. I
> > have tried to usepickle, but am not sure if that is right. I am
> > sorry, but I a
En Wed, 13 Jun 2007 22:20:16 -0300, nik <[EMAIL PROTECTED]> escribió:
> I would like to create a class and then save it for re-use later. I
> have tried to use pickle, but am not sure if that is right. I am
> sorry, but I am new to python.
Do you want to save the *source*code* of your class, or d
On Jun 13, 9:03 pm, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> On Wed, 13 Jun 2007 23:55:02 +, James Turk wrote:
> > On Jun 13, 6:54 pm, Steven Bethard <[EMAIL PROTECTED]> wrote:
> >> James Turk wrote:
> >> > Hi,
>
> >> > I have a situation where I have some class members that should only be
En Wed, 13 Jun 2007 21:47:16 -0300, mike <[EMAIL PROTECTED]> escribió:
> Following piece of code can capture IOError when the file doesn't
> exist, also, other unknown exceptions can be captured when I press
> Ctrl-C while the program is sleeping(time.sleep). Now the question is:
> when I run the
En Wed, 13 Jun 2007 21:40:12 -0300, <[EMAIL PROTECTED]> escribió:
> Hi all,
>
> I am running Python 2.5 on Feisty Ubuntu. I came across some code that
> is substantially slower when in a method than in a function.
>
> # START SOURCE #
> # The function
>
> def readgenome
On 2007-06-14, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I am running Python 2.5 on Feisty Ubuntu. I came across some code that
> is substantially slower when in a method than in a function.
>
> # START SOURCE #
> # The function
>
> def readgenome(fileha
Hi,
I would like to create a class and then save it for re-use later. I
have tried to use pickle, but am not sure if that is right. I am
sorry, but I am new to python.
Basically, I have a class, Map. I want to be able to create new maps:
MapA, MapB... that have Map as the base class.
start with-
En Wed, 13 Jun 2007 22:03:50 -0300, Steven D'Aprano
<[EMAIL PROTECTED]> escribió:
> On Wed, 13 Jun 2007 23:55:02 +, James Turk wrote:
>>> James Turk wrote:
>>>
>>> > I have a situation where I have some class members that should only
>>> be
>>> > done once. Essentially my problem looks li
En Wed, 13 Jun 2007 17:35:19 -0300, Paul McNett <[EMAIL PROTECTED]> escribió:
> Tempo wrote:
>> Has anyone sucesfully built a *.exe file on a mac operating system
>> before from a *.py file? I have been trying to do this with
>> pyinstaller, but I keep getting errors and I don't know how to instal
On Wed, 13 Jun 2007 23:55:02 +, James Turk wrote:
> On Jun 13, 6:54 pm, Steven Bethard <[EMAIL PROTECTED]> wrote:
>> James Turk wrote:
>> > Hi,
>>
>> > I have a situation where I have some class members that should only be
>> > done once. Essentially my problem looks like this:
>>
>> > class
Hi Guys,
Following piece of code can capture IOError when the file doesn't
exist, also, other unknown exceptions can be captured when I press
Ctrl-C while the program is sleeping(time.sleep). Now the question is:
when I run the non-exist command, the exception cannot be captured.
Here is the code
On Thu, 14 Jun 2007 09:32:10 +1000, Ben Finney wrote:
> "Dr. Pastor" <[EMAIL PROTECTED]> writes:
>
>> Please do not do business with
>> those cretins who without authorization
>> attaching [spam footers]
>
> Indeed. The cost of Usenet access should not be translated to spam on
> messages.
Out o
Hi all,
I am running Python 2.5 on Feisty Ubuntu. I came across some code that
is substantially slower when in a method than in a function.
# START SOURCE #
# The function
def readgenome(filehandle):
s = ''
for line in filehandle.xreadlines():
# Copyright (C) 2007 Darren Lee Weber
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This p
On Jun 13, 8:00 pm, Larry Bates <[EMAIL PROTECTED]> wrote:
> James Turk wrote:
> > Hi,
>
> > I have a situation where I have some class members that should only be
> > done once. Essentially my problem looks like this:
>
> > class Base(object):
> > dataset = None
>
> > def __init__(self, p
James Turk wrote:
> Hi,
>
> I have a situation where I have some class members that should only be
> done once. Essentially my problem looks like this:
>
> class Base(object):
> dataset = None
>
> def __init__(self, param):
> if type(self).dataset is None:
> # code t
On Jun 13, 6:54 pm, Steven Bethard <[EMAIL PROTECTED]> wrote:
> James Turk wrote:
> > Hi,
>
> > I have a situation where I have some class members that should only be
> > done once. Essentially my problem looks like this:
>
> > class Base(object):
> > dataset = None
>
> > def __init__(self
"Dr. Pastor" <[EMAIL PROTECTED]> writes:
> Please do not do business with
> those cretins who without authorization
> attaching [spam footers]
Indeed. The cost of Usenet access should not be translated to spam on
messages.
--
\ "If consumers even know there's a DRM, what it is, and how i
Avell Diroll <[EMAIL PROTECTED]> writes:
> I have to disagree: 'mb' should stand for "milli-bit" :)
Yes, you're right. My "metre-bit" was wrong.
--
\ "Whenever you read a good book, it's like the author is right |
`\ there, in the room talking to you, which is why I don't like to |
James Turk wrote:
> Hi,
>
> I have a situation where I have some class members that should only be
> done once. Essentially my problem looks like this:
>
> class Base(object):
> dataset = None
>
> def __init__(self, param):
> if type(self).dataset is None:
> # code t
Matteo skrev:
> OK - I'm going to assume your intervals are inclusive (i.e. 34-51
> contains both 34 and 51).
>
> If your intervals are all really all non-overlapping, one thing you
> can try is to put all the endpoints in a single list, and sort it.
> Then, you can use the bisect module to searc
Paul McNett wrote:
> Tempo wrote:
>> Has anyone sucesfully built a *.exe file on a mac operating system
>> before from a *.py file? I have been trying to do this with
>> pyinstaller, but I keep getting errors and I don't know how to install
>> UPX properly. I tried putting the linux UPX folder in m
Hi,
I have a situation where I have some class members that should only be
done once. Essentially my problem looks like this:
class Base(object):
dataset = None
def __init__(self, param):
if type(self).dataset is None:
# code to load dataset based on param, expensive
On Jun 13, 7:31 am, Paul Sijben <[EMAIL PROTECTED]> wrote:
> I ran into an internationalization issue. I need a consistent idea about
> the timezone my application is running on. However when I run the following:
> >>> import time
> >>> time.tzname
>
> I get back ('West-Europa (standaardtijd)', '
# writing/reading CSV files, tuple-unpacking, cmp() built-in
import csv
writer = csv.writer(open('stocks.csv', 'wb'))
writer.writerows([
('GOOG', 'Google, Inc.', 505.24, 0.47, 0.09),
('YHOO', 'Yahoo! Inc.', 27.38, 0.33, 1.22),
('CNET', 'CNET Networks, Inc.', 8.62, -0.13, -1.49)
])
sto
On Jun 13, 2:32 pm, Lee Sander <[EMAIL PROTECTED]> wrote:
> hi,
> I have the following problem which is turning out to be non-trivial. I
> realize that this is not
> exactly a python problem but more of an algorithm problem -- but I
> post it here because
> I want to implement this in python.
>
> I
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
| I can use list comprehension to create list quickly. So I expected that I
| can created tuple quickly with the same syntax. But I found that the
| same syntax will get a generator, not a tuple. Here is my example:
|
| In [147]: a = (i f
Okay. Great. Thanks for clarifying that for me.
--
http://mail.python.org/mailman/listinfo/python-list
Thanks folks!
jh
--
http://mail.python.org/mailman/listinfo/python-list
"Steve Howell" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
|
| You would just change the language definition to say
| that once you enter f(), any call to f() from within
| f() behaves as if the recursively called f() still
| points to the originally bound version of f.
I am pret
Tempo wrote:
> Has anyone sucesfully built a *.exe file on a mac operating system
> before from a *.py file? I have been trying to do this with
> pyinstaller, but I keep getting errors and I don't know how to install
> UPX properly. I tried putting the linux UPX folder in my python 2.4
> directory,
Hi, I need to charge a list when starts the program. I've tried a few
events like:
self.llistatids = wx.ListBox(self, -1, choices=['a'],
style=wx.LB_SINGLE|wx.LB_ALWAYS_SB)
self.llistatids.SetBackgroundColour(wx.Colour(255, 255, 220))
self.llistatids.Bind(wx.EVT_LISTBOX, self.carrega_llistatids)
On Wed, 2007-06-13 at 12:20 -0700, HMS Surprise wrote:
> How does one effect a goto in python?
One doesn't.
> I only want to use it for debug.
> I dasn't slap an "if" clause around the portion to dummy out, the
> indentation police will nab me.
If you want to disable a code block without indent
Rob Wolfe wrote:
> Steven Bethard <[EMAIL PROTECTED]> writes:
>
>>> I vote for example with ElementTree (without xpath)
>>> with a mention of using ElementSoup for invalid HTML.
>> Sounds good to me. Maybe something like::
>>
>> import xml.etree.ElementTree as etree
>> dinner_recipe = '''
>>
>>
On 12 jun, 17:06, "Martin v. Lo"wis" <[EMAIL PROTECTED]> wrote:
>
> What *is*INT64? It's not a builtin type of standard C, it isn't
> defined by Microsoft C, and it isn't predefined by Python.
>
> So it must be something that you have defined, and apparently
> incorrectly. How did you define it?
I
hi,
I have the following problem which is turning out to be non-trivial. I
realize that this is not
exactly a python problem but more of an algorithm problem -- but I
post it here because
I want to implement this in python.
I want to write a code that given an interval (integer tuple:
start,stop)
Steven Bethard <[EMAIL PROTECTED]> writes:
>> I vote for example with ElementTree (without xpath)
>> with a mention of using ElementSoup for invalid HTML.
>
> Sounds good to me. Maybe something like::
>
> import xml.etree.ElementTree as etree
> dinner_recipe = '''
>
> 24slicesbaguette
> 2+tbspol
> How does one effect a goto in python? I only want to use it for debug.
> I dasn't slap an "if" clause around the portion to dummy out, the
> indentation police will nab me.
http://entrian.com/goto/
--
http://mail.python.org/mailman/listinfo/python-list
Has anyone sucesfully built a *.exe file on a mac operating system
before from a *.py file? I have been trying to do this with
pyinstaller, but I keep getting errors and I don't know how to install
UPX properly. I tried putting the linux UPX folder in my python 2.4
directory, but that didn't work.
How does one effect a goto in python? I only want to use it for debug.
I dasn't slap an "if" clause around the portion to dummy out, the
indentation police will nab me.
Thanx,
jh
--
http://mail.python.org/mailman/listinfo/python-list
On 2007-06-13, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> On 2007-06-13, Anders J. Munch <[EMAIL PROTECTED]> wrote:
>> General tail-call optimisation is of course completely
>> out-of-bounds for Python, because it ruins tracebacks. Unlike
>> tail recursion, which could use recursion counters.
>
> I
On Wed, 2007-06-13 at 18:22 +, Neil Cerutti wrote:
> On 2007-06-13, Anders J. Munch <[EMAIL PROTECTED]> wrote:
> > General tail-call optimisation is of course completely
> > out-of-bounds for Python, because it ruins tracebacks. Unlike
> > tail recursion, which could use recursion counters.
>
On 2007-06-13, Anders J. Munch <[EMAIL PROTECTED]> wrote:
> General tail-call optimisation is of course completely
> out-of-bounds for Python, because it ruins tracebacks. Unlike
> tail recursion, which could use recursion counters.
Is it really ruined? To use a similar example:
def foo(x):
On Jun 13, 1:28 am, "James T. Dennis" <[EMAIL PROTECTED]> wrote:
> This sounds like a job for the Queue class/module to me.
> Could you create a Queue such that all your worker threads
> are producers to it and you have one dedicated thread as a
> consumer that relays log entries from the Queue
Elfine Peterson Tjio wrote:
> I'm trying to make a program that reads Fasta file and print it out. I used
> the SeqIO module and the results is:
>
> 'ATGGTCATSingleAlphabet()'
>
> For this purpose, should I use SeqIO or Fasta?
>
> for example:
>
> from Bio import SeqIO
>
> or
>
> from Bio
In <[EMAIL PROTECTED]>, Flyzone wrote:
> I need to run in thread a command, one thread for one parameter.
> So i made a for loop, creating 5 threads and waiting their stop with:
> Main {
>open file BW2 for write
>. (creating list of thread with a counter)
>Stopped=False
>wh
En Wed, 13 Jun 2007 07:13:18 -0300, <[EMAIL PROTECTED]> escribió:
> I'm very pleased to have your help about to solve a technical issue
> related to HTML Editlet Editor. In this I' m facing the problem that
You should ask the author - I don't think this product has anything to do
with Python.
On Jun 13, 12:57 pm, Ben Sizer <[EMAIL PROTECTED]> wrote:
> On 30 May, 16:20, Ben Sizer <[EMAIL PROTECTED]> wrote:
>
> > On 30 May, 15:42, Frank Millman <[EMAIL PROTECTED]> wrote:
>
> > > On May 30, 4:15 pm,BenSizer<[EMAIL PROTECTED]> wrote:
>
> > > > I've been looking for a Windows version of a li
Thomas Heller wrote:
> Just use the builtin __debug__ variable for that purpose.
> __debug__ is 'True' if Python is run normally, and 'False'
> if run with the '-O' or '-OO' command line flag.
> The optimizer works in the way you describe above (which
> it will not if you use a custom variable).
Hi, you could try this:
def parse(self, ifile):
id=""
seq=""
for line in open(ifile, 'r'):
if '>'==line[0]:
if id!="" and len(seq)>0:
yield id,seq
seq = ""
id=line[1:].strip("\n")
Ben Finney wrote:
> The symbol for "bit" is 'b'. The symbol for "byte" is 'B'. 'kb' is
> 'kilobit', i.e. 1000 bits. 'mb' is a "metre-bit", a combination of two
> units. And so on. The SI units have definitions that are only muddied
> by misusing them this way.
I have to disagree: 'mb' should stand
On 30 May, 16:20, Ben Sizer <[EMAIL PROTECTED]> wrote:
> On 30 May, 15:42, Frank Millman <[EMAIL PROTECTED]> wrote:
>
> > On May 30, 4:15 pm,BenSizer<[EMAIL PROTECTED]> wrote:
>
> > > I've been looking for a Windows version of a library to interface to
> > > PostgreSQL, but can only find ones compi
Alexander Schmolck wrote:
> "Anders J. Munch" <[EMAIL PROTECTED]> writes:
>
>> Like Steven said, tail-call optimisation is not necessary as you can always
>> hand-optimise it yourself.
>
> Care to demonstrate on some code written in CPS (a compiler or parser, say)?
I meant tail recursion, not ta
Neil Cerutti wrote:
> On 2007-06-12, Anders J. Munch <[EMAIL PROTECTED]> wrote:
>> Converting tail-recursion to iteration is trivial, and
>> perfectly reasonable for a human to do by hand.
>
> For simple recursive tail calls, yeah, it can be. Translating a
> tail-recursive Factorial function int
Please do not do business with
those cretins who without authorization
attaching the following text to my postings:
== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet
News==
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+
Newsgroups
= East and
Haha, you guys. Use it however you want. But trust me, if you put MiB
and GiB instead of the more-common mb and gb [MB and GB] in your
applications, your users will probably have a harder time
understanding what you mean.
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 13, 1:28 am, Tim Golden <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Hi all,
> > I'm currently using antiword to extract content from MS Word files.
> > Is there another way to do this without relying on any command prompt
> > application?
>
> Well you haven't given your environ
I have a list of parameters.
I need to run in thread a command, one thread for one parameter.
So i made a for loop, creating 5 threads and waiting their stop with:
for parameter in parameters
Thread{
write on BW2
}
Main {
open file BW2 for write
. (creating list of
Michael Hoffman schrieb:
> The peephole optimizer now takes things like
>
> if 0:
> do_stuff()
>
> and optimizes them away, and optimizes away the conditional in "if 1:".
>
> What if I had a function like this?
>
> def func(debug=False):
> for index in xrange(100):
> if de
Rob Wolfe wrote:
> Steve Howell wrote:
>
>> I suggested earlier that maybe we post multiple
>> solutions. That makes me a little nervous, to the
>> extent that it shows that the Python community has a
>> hard time coming to consensus on tools sometimes.
>
> We agree that BeautifulSoup is the bes
My company : EWT, LLC
EWT is a proprietary securities trading company and is a member firm
of major stock and futures exchanges. Founded in 2002, EWT was formed
to capitalize on the shift of the securities industry towards
electronic platforms in the United States and abroad.
Location: Beverly Hi
The peephole optimizer now takes things like
if 0:
do_stuff()
and optimizes them away, and optimizes away the conditional in "if 1:".
What if I had a function like this?
def func(debug=False):
for index in xrange(100):
if debug:
print index
do_stuff(i
Allen wrote:
> I use try catch, but cannot catch the execeptions of execution python
> method.
>
> PYCALL_API void PyCall(const char * pszModule, const char * pszFunc,
> void * pArg)
> {
> if (pszModule == NULL || pszFunc == NULL)
> {
> return;
> }
>
> Py_Initialize();
>
> PyObject * pModule =
On Wed, 13 Jun 2007 02:15:11 -0700, Frank Millman wrote:
> Thanks very much for all your attempts to help me, Steven. You have
> succeeded in getting me to think properly about my problem and come up
> with a much cleaner solution. I really appreciate it.
Glad to be of help.
--
Steven.
--
ht
> The
> httplib.HTTP class that you were using is very old and deprecated for
> several years now.
>
> --
> Gabriel Genellina
:-( oh , tks!
i took it from
www.ug.it.usyd.edu.au/~comp5315/lec-09.html
which class must i use?
tks in advance
--
http://mail.python.org/mailman/listinfo/python
Is there an easy way to pass arguments to a handler class that is used
by the standard TCPServer?
normally --> srvr =SocketServer.TCPServer(('',port_num), TCPHandlerClass)
I'd like to be able to: srvr =SocketServer.TCPServer(('',port_num),
TCPHandlerClass, (arg1,arg2))
And have arg1, arg2 avai
On 2007-06-13, supercooper <[EMAIL PROTECTED]> wrote:
> I have this string that is being returned from a query on a DBISAM
> database. The field must be some sort of blob, and when I connect to
> the database thru ODBC in MS Access, the field type comes thru as OLE
> Object, and Access cannot read
OOps .. yes I mean mod_python. I've been using PHP way too long :P ..
hence the typo
On Jun 13, 4:01 am, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> On Jun 13, 12:58 pm,arorap<[EMAIL PROTECTED]> wrote:
>
> > Thanks for your reply.
>
> > The reason I want to run it as CGI (even though mod_php is
I have this string that is being returned from a query on a DBISAM
database. The field must be some sort of blob, and when I connect to
the database thru ODBC in MS Access, the field type comes thru as OLE
Object, and Access cannot read the field (it usually crashes Access).
I can sorta pick out th
hi there,
does anybody know about shape / gesture recognition librarys for
python?
like cali: http://immi.inesc-id.pt/cali/
thx
joerg
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 13, 11:11 am, Allen <[EMAIL PROTECTED]> wrote:
> a = range(256)
> I want to output the formated string to be:
> 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
> 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
>
> f
The final release of version 0.6.1 of xlrd is now available from
http://www.lexicon.net/sjmachin/xlrd.htm and from the Cheeseshop
(http://cheeseshop.python.org/pypi/xlrd).
What is xlrd? It's a small (download approx 0.1 Mb) pure-Python
library for extracting information from Microsoft Excel (tm)
On 2007-06-13, Steve Howell <[EMAIL PROTECTED]> wrote:
> You would just change the language definition to say that once
> you enter f(), any call to f() from within f() behaves as if
> the recursively called f() still points to the originally bound
> version of f. To want any other behavior would
On 2007-06-12, Anders J. Munch <[EMAIL PROTECTED]> wrote:
> Paul Rubin wrote:
>> Steven D'Aprano <[EMAIL PROTECTED]> writes:
Not tail calls, in general, no.
>>> Sorry, how does that work? You're suggesting that there is an
>>> algorithm which the compiler could follow to optimize away
>>> tail
One way is to create an intermediate python function, which returns a
special value when an exception is caught.
def ExceptionCatcher(FunctionToCall):
def F():
try: FunctionToCall()
except: return -1
return 0
return F
Then instead of calling your function, you woul
Steve Howell wrote:
> I suggested earlier that maybe we post multiple
> solutions. That makes me a little nervous, to the
> extent that it shows that the Python community has a
> hard time coming to consensus on tools sometimes.
We agree that BeautifulSoup is the best for parsing HTML. :)
> Th
On Jun 13, 5:37 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> In <[EMAIL PROTECTED]>, Diez B. Roggisch wrote:
>
> > No need to create the intermediate list, a generator expression works just
> > fine:
>
> > a = tuple(i for i in range(10))
>
> But `range()` creates the intermediate list
On 13 Jun, 03:21, kernel1983 <[EMAIL PROTECTED]> wrote:
> I look it up in PyPI
[...]
> Django is a big project. Why no one maintain this? Did the guy lost
> his password?
Who knows? But then, if you're running a GNU/Linux distribution like
Debian, it's quite possible to use a system package, any
1 - 100 of 140 matches
Mail list logo