On Tue, 12 Jun 2007 19:32:38 +0200, reverse_gear <[EMAIL PROTECTED]>
wrote:
> hi,
> Does Tkinter has support for tamil/Indian Languages??
> I tried this code
> it is able to print both tamil and german text on console.. but on
> Tkinter Label it is printing only the german code
> Plz help
> from
samuraisam <[EMAIL PROTECTED]> wrote:
>
>Quick file size formatting for all those seekers out there...
>
>import math
>
>def filesizeformat(bytes, precision=2):
>"""Returns a humanized string for a given amount of bytes"""
>bytes = int(bytes)
>if bytes is 0:
>return '0bytes'
>
Hi all,
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 for i in range(10))
In [148]: b = [i for i in range(10)]
In
On Jun 12, 8:47 pm, samuraisam <[EMAIL PROTECTED]> wrote:
> Quick file size formatting for all those seekers out there...
>
> import math
>
> def filesizeformat(bytes, precision=2):
> """Returns a humanized string for a given amount of bytes"""
> bytes = int(bytes)
> if bytes is 0:
>
On Jun 13, 12:48 am, [EMAIL PROTECTED] wrote:
> On Jun 12, 8:47 pm, samuraisam <[EMAIL PROTECTED]> wrote:
>
>
>
> > Quick file size formatting for all those seekers out there...
>
> > import math
>
> > def filesizeformat(bytes, precision=2):
> > """Returns a humanized string for a given amount
On Jun 13, 12:48 am, [EMAIL PROTECTED] wrote:
> On Jun 12, 8:47 pm, samuraisam <[EMAIL PROTECTED]> wrote:
>
>
>
> > Quick file size formatting for all those seekers out there...
>
> > import math
>
> > def filesizeformat(bytes, precision=2):
> > """Returns a humanized string for a given amount
2007/6/12, WolfgangZ <[EMAIL PROTECTED]>:
> hzqij schrieb:
> > i have a python source code test.py
> >
> > # -*- coding: UTF-8 -*-
> >
> > # s is a unicode string, include chinese
> > s = u'张三'
> >
> > then i run
> >
> > $ python test.py
> > UnicodeDecodeError: 'utf8' codec can't decode bytes in po
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> But you already have "multiline" lambdas right now in that sense, no
> need to add anything. I think you were talking about lambdas *with*
> statements inside.
>
> bin = lambda x:((x&8 and '*' or '_') +
> (x&4 and '*' or '_') +
>
James Stroud schrieb:
>
> There are sweatshops in developing countries that provide this service.
>
> James
But since this is for fun/convenience for me only Id rather not make
anyone break asweat... Great advice, helpful too
--
http://mail.python.org/mailman/listinfo/python-list
Evan Klitzke wrote:
> On 6/12/07, why? <[EMAIL PROTECTED]> wrote:
> > Im working with Python 2.2 on my red hat linux system. Is there any
> > way to write python codes in separate files and save them so that i
> > can view/edit them in the future? Actually I've just started with
> > python and wou
On 13 Cze, 09:45, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> 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
On 6/13/07, why? <[EMAIL PROTECTED]> wrote:
>
> Evan Klitzke wrote:
> > On 6/12/07, why? <[EMAIL PROTECTED]> wrote:
> > > Im working with Python 2.2 on my red hat linux system. Is there any
> > > way to write python codes in separate files and save them so that i
> > > can view/edit them in the fut
markacy wrote:
> On 13 Cze, 09:45, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>> Hi all,
>>
>> 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. Her
Hi Robert,
Thanks a lot for your kindness.
Robert Kern wrote:
> [EMAIL PROTECTED] wrote:
>> Hi all,
>>
>> I have two questions about scipy.
>
> You're likely to get a better response from the scipy mailing list. Here,
you'll
> primarily get me, and I have to rush out right now.
>
> http://www.
On 13 Cze, 10:06, why? <[EMAIL PROTECTED]> wrote:
> Evan Klitzke wrote:
> > On 6/12/07, why? <[EMAIL PROTECTED]> wrote:
> > > Im working with Python 2.2 on my red hat linux system. Is there any
> > > way to write python codes in separate files and save them so that i
> > > can view/edit them in the
On 6/13/07, Andre Engels <[EMAIL PROTECTED]> wrote:
> 2007/6/12, WolfgangZ <[EMAIL PROTECTED]>:
> > hzqij schrieb:
> > > i have a python source code test.py
> > >
> > > # -*- coding: UTF-8 -*-
> > >
> > > # s is a unicode string, include chinese
> > > s = u'张三'
> > >
> > > then i run
> > >
> > > $
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 available
> on my local computer
Why do you keep mentioning mod_php, surely you mean mod_python.
> is that the target machine to which I will
> finally be
[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 environment, but is there
anything to stop you from controlling Word itself vi
Hi,
class UserDict:
def __init__(self, dict=None):
self.data = {}
if dict is not None: self.update(dict)
I just don't understant this code, as it is not also mention in the
book. the update is a method of a dict right? in my understanding the
last statement should be self.data
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
f0 f1 f2 f3 f4 f5 6 f7 f8 f9 fa fb fc fd fe ff
How to do it?
--
On Jun 13, 1:24 am, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> On Tue, 12 Jun 2007 08:53:11 -0700, Frank Millman wrote:
>
> Ah, if I had ever read that there were two instances involved, I hadn't
> noticed. Sorry!
>
No problem - I really appreciate your input.
I snipped the rest of your post, a
On 13 Jun, 06:35, Tim Roberts <[EMAIL PROTECTED]> wrote:
> Captain Paralytic <[EMAIL PROTECTED]> wrote:
> >On 11 Jun, 07:37, Tim Roberts <[EMAIL PROTECTED]> wrote:
> >| Not in standard SQL. MySQL supports a REPLACE extension that does
> >| an UPDATE if the key already exists, and an INSERT if it d
On 6 13 , 11 55 , "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> > I used INT64 and initialize its value from PyArg_ParseTuple.
> > The code is PyArg_ParseTuple(args, "l", &nValue).
> > It should be PyArg_ParseTuple(args, "L", &nValue).
>
> That's still incorrect. For the L format flag, use PY_LO
> On my 3 year old 3Ghz Pentium III it takes about 8 seconds to zip 20Mb file.
> So what is the problem? Not updating the process for 8-10 seconds
> should be just fine for most applications.
>
> -Larry
The problem, that:
- I want to process 100-200 MB zip files.
- I want to abort in process
-
samuraisam <[EMAIL PROTECTED]> writes:
> Quick file size formatting for all those seekers out there...
>
> import math
>
> def filesizeformat(bytes, precision=2):
> """Returns a humanized string for a given amount of bytes"""
> bytes = int(bytes)
> if bytes is 0:
> return '0byt
In article <[EMAIL PROTECTED]>,
HMS Surprise <[EMAIL PROTECTED]> wrote:
> I thought if I could do this:
> >>> a = b = ''
a and b refer to the same object (the empty string)
> >>> a = 'a'
You are assigning a new value to a - it now refers to the string 'a',
while b refers to the same thing it
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();
PyObjec
james_027 <[EMAIL PROTECTED]> writes:
> class UserDict:
> def __init__(self, dict=None):
> self.data = {}
> if dict is not None: self.update(dict)
The code confusingly shadows the builtin 'dict' type with a
poorly-chosen parameter name. See if this makes things less
confusing:
> class UserDict:
> def __init__(self, dict=None):
> self.data = {}
> if dict is not None: self.update(dict)
>
> I just don't understant this code, as it is not also mention in the
> book. the update is a method of a dict right? in my understanding the
> last statement should be
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> I can use list comprehension to create list quickly. So I expected
> that I can created tuple quickly with the same syntax.
Nope. The list comprehension syntax creates lists.
> But I found that the same syntax will get a generator, not a
> tuple.
Terry Reedy wrote:
> "Markus Schöpflin" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> | Hello,
> |
> | I just stumbled accross a difference between cStringIO in Python 2.4
> | and 2.5. You can no longer feed arrays to cStringIO.
> [snip]
> | Has this change been done on purpose
On Jun 13, 2:40 am, james_027 <[EMAIL PROTECTED]> wrote:
> Hi,
>
> class UserDict:
> def __init__(self, dict=None):
> self.data = {}
> if dict is not None: self.update(dict)
>
> I just don't understant this code, as it is not also mention in the
> book. the update is a method of
Markus Schöpflin wrote:
[...]
> I think I'll file a bug at SF... maybe someone else will spot something.
Should have checked the bugtracker first... it was reported the day
after my original post:
http://sourceforge.net/tracker/index.php?func=detail&aid=1730114&group_id=5470&atid=105470
And i
Hi Dear
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
I'm getting unable to find the particular coding which lets this HTML
Editor to be focused after loading on the page. Actually I'm using
this HTML Edit
On 12 jun 2007, at 12.03, Allen wrote:
> My C extension works wrong, and debug it, found that sizeof (INT64) =
> 4, not 8.
> I compile on Windows XP platform.
> Please tell me how to fix it to support INT64?
> Thanks.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
On compi
--- Steven Bethard <[EMAIL PROTECTED]> wrote:
> Stefan Behnel wrote:
> > Steven Bethard wrote:
> >> If you want to parse invalid HTML, I strongly
> encourage you to look into
> >> BeautifulSoup. Here's the updated code:
> >>
> >> import ElementSoup #
> http://effbot.org/zone/element-soup.htm
Kay Schluehr:
> >>> int(cpuSpeed.split(":")[1].strip())
Probably this suffices:
int(cpuSpeed.split(":")[1])
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
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 anyway. ;-)
a = tuple(xrange(10))
Ciao,
Marc 'BlackJack' Rintsch
--
ht
[EMAIL PROTECTED] a écrit :
> Hi all,
>
> 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 for i in range(10))
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
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
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
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
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
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
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
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 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
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
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
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
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
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
> 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
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
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 =
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
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
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
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
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
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
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
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
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
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
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
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
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")
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).
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
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.
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
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
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
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 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, 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
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
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.
http://entrian.com/goto/
--
http://mail.python.org/mailman/listinfo/python-list
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
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)
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
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 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
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)
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,
"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
Thanks folks!
jh
--
http://mail.python.org/mailman/listinfo/python-list
Okay. Great. Thanks for clarifying that for me.
--
http://mail.python.org/mailman/listinfo/python-list
<[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
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
# 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, 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)', '
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
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
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
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
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 |
1 - 100 of 140 matches
Mail list logo