Hello,
I have a Python class with data members, say:
class Foo:
def __init__(self):
self.a=7
self.b[]={1,3,4}
#couple of more lists, tuples, etc
I would like to know if "Pickling" the class object is the only way of
writing
On 22 Sep., 00:36, Cristian <[EMAIL PROTECTED]> wrote:
> Yeah, I agree, that does look pretty ugly. Correct me if I'm wrong,
> but I thought the way Python determines a block is by the whitespace
> of the first line. So, as long as the spacing (or !tabbing!) is
> consistent from line to line the p
On Fri, 21 Sep 2007 16:25:20 -0700, Python Maniac wrote:
> On Sep 21, 3:02 pm, "Matt McCredie" <[EMAIL PROTECTED]> wrote:
>
>> Isn't D compiled to machine code? I would expect it to win hands down.
>> That is, unless it is horribly unoptimized.
>>
>>
> Well D code is compiled into machine code tha
Carl Banks <[EMAIL PROTECTED]> writes:
> Especially someone like an
> engineer (in the classical sense), who isn't building versatile software
> packages, won't need to resort to functional programming much.
http://www.math.chalmers.se/~rjmh/Papers/whyfp.html
--
http://mail.python.org/mailman/
On Fri, 21 Sep 2007 17:09:04 -0700, http://members.lycos.co.uk/dariusjack/
wrote:
> On Sep 21, 1:26 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>>
> Is Python not fit to a task of this kind ?
It is, and it should be quite simple.
> Is there no a library of Python free scripts to accomplis
On Fri, 21 Sep 2007 19:52:41 -0400, Carl Banks wrote:
> First of all, let me say that I think "functions as first class data" is
> helpful, but not crucial, to programming in Python, and there are many
> people who simply don't need the lesson. Especially someone like an
> engineer (in the cla
On Sat, 22 Sep 2007 05:06:42 +, Stargaming wrote:
> On Fri, 21 Sep 2007 23:44:00 -0400, Carl Banks wrote:
>
>> Anyone with me here? (I know the deadline for P3 PEPs has passed; this
>> is just talk.)
>>
>> Not many people are bit-fiddling these days.
>
> Why did we invent the `binary litera
En Fri, 21 Sep 2007 14:36:34 -0300, Jd <[EMAIL PROTECTED]> escribi�:
> Hi
> I have the following situation.. Have a worker thread, that does the
> "work" given to it. While doing work, some of the objects use thread
> local storage for storing that requires explicit close. e.g. connection
> hand
On 2007-09-22, Carl Banks <[EMAIL PROTECTED]> wrote:
> Anyone with me here? (I know the deadline for P3 PEPs has passed; this
> is just talk.)
Not me.
> Not many people are bit-fiddling these days.
I do.
> One of the main uses of bit fields is flags, but that's not
> often done in Python bec
Gabriel Genellina wrote:
> En Thu, 20 Sep 2007 08:46:29 -0300, Steven D'Aprano
>
>> Another way is to use this class:
>>
>> class HashableList(list):
>> def __hash__(self):
>> return hash(tuple(self))
>
> ...and that will stop working as soon as the list is mutated (which is
> exact
En Fri, 21 Sep 2007 13:34:40 -0300, Jeroen Hegeman
<[EMAIL PROTECTED]> escribi�:
> So the first time around the file gets read in in ~0.1 seconds, the
> second time around it needs almost four seconds! As far as I can see
> this is related to 'something in memory being copied around' since if
>
On Fri, 21 Sep 2007 23:44:00 -0400, Carl Banks wrote:
> Anyone with me here? (I know the deadline for P3 PEPs has passed; this
> is just talk.)
>
> Not many people are bit-fiddling these days.
Why did we invent the `binary literals`_ (0b101) then?
> One of the main uses of
> bit fields is fl
On Sep 21, 4:48 pm, "Matt McCredie" <[EMAIL PROTECTED]> wrote:
> > It would be nice if Python could be made to automatically detect the
> > LC and string translation patterns used by the unoptimized Python code
> > and make them into optimized Python code on the fly at runtime. I am
> > more than
In message <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> Though I don't know how useful it is, I did open the python libraries
> in wordpad, and though most of the file wasn't legible, I did find
> strings "Py_NoneStruct," "Py_RefTotal," and "PyExc_IndexError."
Do you have some equivalent of t
On Sep 20, 2007, at 7:46 PM, Arvind Singh wrote:
file('/var/lock/Application.lock', 'w').write(str(os.getpid()))
Which to be honest appears to run just fine, when I look in that
file it always contains the correct process ID, for instance, 3419
or something like that.
I honestly doubt th
Anyone with me here? (I know the deadline for P3 PEPs has passed; this
is just talk.)
Not many people are bit-fiddling these days. One of the main uses of bit
fields is flags, but that's not often done in Python because of keyword
arguments and dicts, which are lot more versatile. Another ma
On Sep 22, 2:34 am, Jeroen Hegeman <[EMAIL PROTECTED]> wrote:
[snip]
> ...processing all 2 files found
> --> 1/2: ./test_file0.txt
> Now reading ...
> DEBUG readLines A took 0.093 s
> ...took 8.85717201233 seconds
Your code does NOT include any statements that could have produced the
above line of
On Sep 21, 7:04 pm, "Sean Tierney" <[EMAIL PROTECTED]> wrote:
> someone could contrast Zope w/ another Python framework like Twisted.
> I've been investing some time in learning Zope/Plone and would love to
> hear someone speak to alternatives.
Twisted is a networking engine, Zope is a web appli
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> En Fri, 21 Sep 2007 11:49:53 -0300, Tim Arnold <[EMAIL PROTECTED]>
> escribi�:
>
>> Hi, I'm using elementtree and elementtidy to work with some HTML files.
>> For
>> some of these files I need to enclose the body
hi all... I'm trying to get a event when a pipe of a process is no longer
receiving data, in this case a EOF...
the process start with no problems... but... the gobject_io_add_watch does
not trigger the test method when the file in mplayer has finish... any
ideas??
Thks :)
the codes is this (the r
Cristian wrote:
> On Sep 21, 3:44 pm, Ron Adam <[EMAIL PROTECTED]> wrote:
>
>> I think key may be to discuss names and name binding with your friend.
Here's an idea:
import math
def sin_integral(start, finish, dx):
total = 0.0
y0 = math.sin(start)
for n in range(1, 1 + int((finis
On Sep 21, 7:15 pm, Ricardo Aráoz <[EMAIL PROTECTED]> wrote:
> Hi, I know I'm being dumb but, why does it not work?
>
> >>> class MyList(list):
>
> ... def __init__(self):
> ... self.calls = 0
> ... def __getattr__(self, name):
> ... self.calls += 1
> ... return list
On Fri, 21 Sep 2007 22:07:55 +, Cristian wrote:
> True, there is lambda, but that is very limited. It might be useful for
> key arguments, but not much else.
No, lambda is useful for anything that any other function is useful for,
provided that you can write it as a single expression and not
Cristian wrote:
> On Sep 21, 3:44 pm, Ron Adam <[EMAIL PROTECTED]> wrote:
>
>> I think key may be to discuss names and name binding with your friend. How
>> a name is not the object it self, like a variable is in other languages.
>> For example show him how an object can have more than one name
On Fri, 21 Sep 2007 21:37:18 +, Cristian wrote:
> Although his learning experience has gone mostly smoothly, he's hit a
> lot of speed bumps with functions. Specifically, he's having trouble
> thinking of functions as first order data (don't worry, I haven't
> confused him with such terminology
For instance cookie headers? I want to login to a site and make sure the
site remembers im logged in using python and cgi.
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 21, 1:26 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>
>
> > Please help and let me know your terms.
>
> There are websites dedicated to this - like e.g.
>
> http://www.guru.com/
>
> Make an offer there.
>
> Diez
Ok Diez,
Do you really think only Gurus from Guru.com can help me ?
Do
On Sep 21, 4:47 pm, "Sean Tierney" <[EMAIL PROTECTED]> wrote:
> Just tell him that "functions are like all other variables and can
> therefore be passed by other functions or returned by other functions.
> "
>
I could """Just tell him that "functions are like all other variables
and can
theref
On Sep 21, 4:27 pm, "J. Cliff Dyer" <[EMAIL PROTECTED]> wrote:
> Cristian wrote:
> > On Sep 21, 3:44 pm, Ron Adam <[EMAIL PROTECTED]> wrote:
>
> >> I think key may be to discuss names and name binding with your friend. How
> >> a name is not the object it self, like a variable is in other language
On 9/21/07, Sean Tierney <[EMAIL PROTECTED]> wrote:
> Just tell him that "functions are like all other variables and can
> therefore be passed by other functions or returned by other functions.
> "
>
> If your friend understands variables and functions and he can't make
> the "leap" (and assuming
Hi,
I have installed xlrd for windows but I can't used it succesfully. If I have a
file "file.xls", what lines I can write from python to import and visualize
this file.
Thank you.--
http://mail.python.org/mailman/listinfo/python-list
> It would be nice if Python could be made to automatically detect the
> LC and string translation patterns used by the unoptimized Python code
> and make them into optimized Python code on the fly at runtime. I am
> more than a little amazed nobody has chosen to build a JIT (Just In-
> Time compi
Just tell him that "functions are like all other variables and can
therefore be passed by other functions or returned by other functions.
"
If your friend understands variables and functions and he can't make
the "leap" (and assuming you're right, of course) then your friend
doesn't understand va
On Fri, 21 Sep 2007 10:47:02 -0400, Steve Holden wrote:
[snippity-doo-dah]
>> but of course __init__ is automatically called.
>>
>>
>> Any suggestions for doing something like this?
>>
>>
> Easy: use a method whose name is something other than __init__, then
> don't bother to implement __init
In article <[EMAIL PROTECTED]>,
Cristian <[EMAIL PROTECTED]> wrote:
...
> To someone who's learning to program wouldn't a syntax like the
> further give them all they need and also reinforces the idea that
> functions are data just like everything else?
>
> my_function = function(foo, bar): pass
On Sep 21, 3:02 pm, "Matt McCredie" <[EMAIL PROTECTED]> wrote:
> > Now I think I will code this little scrambler using nothing but the D
> > Language just to see whether there is any benefit in using D over
> > Python for this sort of problem.
>
> Isn't D compiled to machine code? I would expect it
Cristian wrote:
> On Sep 21, 3:44 pm, Ron Adam <[EMAIL PROTECTED]> wrote:
>
>
>> I think key may be to discuss names and name binding with your friend. How
>> a name is not the object it self, like a variable is in other languages.
>> For example show him how an object can have more than one na
Hi, I know I'm being dumb but, why does it not work?
>>> class MyList(list):
... def __init__(self):
... self.calls = 0
... def __getattr__(self, name):
... self.calls += 1
... return list.__getattribute__(self, name)
>>> a = MyList()
>>> a
[]
>>> a.append(1)
>>> a
On Sep 21, 3:44 pm, Ron Adam <[EMAIL PROTECTED]> wrote:
> I think key may be to discuss names and name binding with your friend. How
> a name is not the object it self, like a variable is in other languages.
> For example show him how an object can have more than one name. And discus
> how names
It might help if someone could contrast Zope w/ another Python
framework like Twisted.
I've been investing some time in learning Zope/Plone and would love to
hear someone speak to alternatives.
"part of the brain" -- would that speak to the "event-based" approach
of Twisted? The "event-based" a
Cristian wrote:
> My hope is to subtly reinforce the notion that functions are data
> and can be passed around. The current function declaration doesn't
> help with this. Creating a function and assigning it to a name is
> exactly what Python does, why not have it come out in the syntax? It's
> n
On Sep 21, 3:22 pm, [EMAIL PROTECTED] wrote:
> On Sep 21, 6:07 pm, Cristian <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Sep 21, 2:48 pm, [EMAIL PROTECTED] wrote:
>
> > > There are already anonymous functions in Python.
>
> > > lambda x, y, z: x + y + z
>
> > > is the same as:
>
> > > def _(x, y, z): re
On Sep 21, 6:07 pm, Cristian <[EMAIL PROTECTED]> wrote:
> On Sep 21, 2:48 pm, [EMAIL PROTECTED] wrote:
>
>
>
> > There are already anonymous functions in Python.
>
> > lambda x, y, z: x + y + z
>
> > is the same as:
>
> > def _(x, y, z): return x + y + z
>
> > As for the method stuff, check out sta
En Fri, 21 Sep 2007 11:49:53 -0300, Tim Arnold <[EMAIL PROTECTED]>
escribi�:
> Hi, I'm using elementtree and elementtidy to work with some HTML files.
> For
> some of these files I need to enclose the body content in a new div tag,
> like this:
>
>
>original contents...
>
>
>
> I f
On Sep 21, 2:48 pm, [EMAIL PROTECTED] wrote:
> There are already anonymous functions in Python.
>
> lambda x, y, z: x + y + z
>
> is the same as:
>
> def _(x, y, z): return x + y + z
>
> As for the method stuff, check out staticmethod(). If you assign
> staticmethod() to an object, it will be treat
> Now I think I will code this little scrambler using nothing but the D
> Language just to see whether there is any benefit in using D over
> Python for this sort of problem.
Isn't D compiled to machine code? I would expect it to win hands down.
That is, unless it is horribly unoptimized.
Matt
--
Thomas Jollans wrote:
> On Friday 21 September 2007, [EMAIL PROTECTED] wrote:
>
>> Not specific to Python, but it will be implemented in it... how do I
>> compile a RE to catch everything between two know values? Here's what
>> I've tried (but failed) to accomplish... the knowns here are START a
On Sep 21, 1:00 pm, Python Maniac <[EMAIL PROTECTED]> wrote:
> My best runtime with Ruby using the same machine and OS was 67.797
> secs which is 29.8x slower than the fastest Python runtime. This
> makes Ruby almost as slow as Python was made faster. The irony with
> Ruby was that the use of a
On Sep 21, 5:37 pm, Cristian <[EMAIL PROTECTED]> wrote:
> A friend of mine is an engineer and he's been needing to do more and
> more programming as he goes on with is career. I convinced him to
> learn Python instead of Perl and he's really started to like it. He
> usually comes to me when he can'
A friend of mine is an engineer and he's been needing to do more and
more programming as he goes on with is career. I convinced him to
learn Python instead of Perl and he's really started to like it. He
usually comes to me when he can't accomplish a task with his current
knowledge and I introduce h
On Thursday, Sep 20th 2007 at 18:14 +0100, quoth Paul Rudin:
=>"W. Watson" <[EMAIL PROTECTED]> writes:
=>
=>> Thanks, but no thanks. The learning curve is way too steep.
=>
=>Up to you but, these days emacs comes with all sorts of
=>pointing-clicky-menu-y type things - you don't really have to lea
On Sep 21, 2007, at 4:04 PM, crybaby wrote:
> import re
>
> s1 =' 25000 '
> s2 = ' 5.5910 '
>
> mypat = re.compile('[0-9]*(\.[0-9]*|$)')
> rate= mypat.search(s1)
> print rate.group()
>
> rate=mypat.search(s2)
> print rate.group()
> rate = mypat.search(s1)
> price = float(rate.group())
> print pri
crybaby wrote:
> import re
>
> s1 =' 25000 '
> s2 = ' 5.5910 '
>
> mypat = re.compile('[0-9]*(\.[0-9]*|$)')
> rate= mypat.search(s1)
> print rate.group()
>
> rate=mypat.search(s2)
> print rate.group()
> rate = mypat.search(s1)
> price = float(rate.group())
> print price
>
> I get an error when
On Fri, 21 Sep 2007 22:29:37 +0200, Ivo <[EMAIL PROTECTED]> wrote:
>Ivo wrote:
>> Richard Townsend wrote:
>>> If I have a windows shortcut to a URL, is there a way to get the URL
>>> in a Python app?
>>>
>>> I found some code that uses pythoncom to resolve shortcuts to local
>>> files, but I haven
On Sep 21, 5:04 pm, crybaby <[EMAIL PROTECTED]> wrote:
> import re
>
> s1 =' 25000 '
> s2 = ' 5.5910 '
>
> mypat = re.compile('[0-9]*(\.[0-9]*|$)')
> rate= mypat.search(s1)
> print rate.group()
>
> rate=mypat.search(s2)
> print rate.group()
> rate = mypat.search(s1)
> price = float(rate.group())
>
import re
s1 =' 25000 '
s2 = ' 5.5910 '
mypat = re.compile('[0-9]*(\.[0-9]*|$)')
rate= mypat.search(s1)
print rate.group()
rate=mypat.search(s2)
print rate.group()
rate = mypat.search(s1)
price = float(rate.group())
print price
I get an error when it hits the whole number, that is in this forma
David <[EMAIL PROTECTED]> writes:
> Another method is for the apps to run continuously and serve on non-80
> port (or on 80 from another host), and your main web server on port 80
> reverse proxies to it when appropriate.
You can also pass the open sockets around between processes instead of
rever
Well, you may. Unfortunately, there are many NGs that do the opposite.
Bruno Desthuilliers wrote:
> W. Watson a écrit :
>> How about in the case of MS Win?
>>
>> Ben Finney wrote:
>>>
>>> (Please don't top-post. Instead, reply below each point to which
>>> you're responding, removing quoted text i
On Sep 21, 4:09 pm, Thomas Jollans <[EMAIL PROTECTED]> wrote:
> On Friday 21 September 2007, [EMAIL PROTECTED] wrote:
>
> > Not specific to Python, but it will be implemented in it... how do I
> > compile a RE to catch everything between two know values? Here's what
> > I've tried (but failed) to a
Ivo wrote:
> Richard Townsend wrote:
>> If I have a windows shortcut to a URL, is there a way to get the URL
>> in a Python app?
>>
>> I found some code that uses pythoncom to resolve shortcuts to local
>> files, but I haven't found any examples for URLs.
>>
>> The PyWin32 help mentions the PyIUnif
Ivo wrote:
> Richard Townsend wrote:
>> If I have a windows shortcut to a URL, is there a way to get the URL
>> in a Python app?
>>
>> I found some code that uses pythoncom to resolve shortcuts to local
>> files, but I haven't found any examples for URLs.
>>
>> The PyWin32 help mentions the PyIUnif
> I wondering if is this a good pattern to apply, i like the way it looks
> like, at least to me it looks `natural', but...im calling every method
> twice here? One in v_dict and again on the dict iteration?
>
> Any suggestion will be great!
Another suggestion is to use a naming convention for you
On Sep 18, 9:03 am, "dimitri pater" <[EMAIL PROTECTED]> wrote:
> Hello,
> both python2.3 and python2.5 are installed on my Debian webserver. For
> some reason, I would like to uninstall Python2.5 which was installed
> from source (make install) and keep 2.3.
> I have tried make uninstall and search
On Friday 21 September 2007, [EMAIL PROTECTED] wrote:
> Not specific to Python, but it will be implemented in it... how do I
> compile a RE to catch everything between two know values? Here's what
> I've tried (but failed) to accomplish... the knowns here are START and
> END:
>
> data = "asdfasgSTA
Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote:
>In message <[EMAIL PROTECTED]>, John J. Lee wrote:
>> Seriously for a moment, I read something recently (maybe here?) about
>> an Apple study that claimed to show that people who perceived keyboard
>> bindings as being much faster than mouseing did
Richard Townsend wrote:
> If I have a windows shortcut to a URL, is there a way to get the URL
> in a Python app?
>
> I found some code that uses pythoncom to resolve shortcuts to local
> files, but I haven't found any examples for URLs.
>
> The PyWin32 help mentions the PyIUniformResourceLocator
Dear Experts,
There seem to be multiple versions of python modes for emacs? Could someone
point me to the mainterers of either the "official" one or the one that is
being maintained most vigorously?
I've tried both python.el and python-mode.el. Both seem to have various
minor foibles which I'd be
Tim Arnold wrote:
> Hi, I'm using elementtree and elementtidy to work with some HTML files. For
> some of these files I need to enclose the body content in a new div tag,
> like this:
>
>
>original contents...
>
>
>
> I figure there must be a way to do it by creating a 'div' SubEleme
On Sep 21, 3:32 pm, [EMAIL PROTECTED] wrote:
> > You'll want to use a non-greedy match:
> > x = re.compile(r"START(.*?)END", re.DOTALL)
> > Otherwise the . will match END as well.
>
> On Sep 21, 3:23 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
>
> > Only if there's a later END in the string, in whi
> re.search(expr, string) compiles and searches every time. This can
> potentially be more expensive in calculating power. especially if you
> have to use the expression a lot of times.
The re module-level helper functions cache expressions and their
compiled form in a dict. They are only compiled
On Sep 20, 7:44 pm, Norm <[EMAIL PROTECTED]> wrote:
> without meaning to start a flame war between the various python web
> tools, I was wondering if anyone had a review of the status of Zope.
> For example, is it being used for new projects or just maintenance?
Zope is heavily used. It is a matu
On Fri, Sep 21, 2007 at 12:05:51PM -0700, [EMAIL PROTECTED] wrote regarding Re:
RE Help:
>
> >
> > x = re.compile('START(.*)END', re.DOTALL)
>
> You'll want to use a non-greedy match:
>
> x = re.compile(r"START(.*?)END", re.DOTALL)
>
> Otherwise the . will match END as well.
The . will only c
> You'll want to use a non-greedy match:
> x = re.compile(r"START(.*?)END", re.DOTALL)
> Otherwise the . will match END as well.
On Sep 21, 3:23 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> Only if there's a later END in the string, in which case the user's
> requirements will determine whether
If I have a windows shortcut to a URL, is there a way to get the URL
in a Python app?
I found some code that uses pythoncom to resolve shortcuts to local
files, but I haven't found any examples for URLs.
The PyWin32 help mentions the PyIUniformResourceLocator Object, but I
couldn't find an exampl
> OK, thanks. Would you know what technique the custom web server uses
> to invoke a C++ app (ditto for Java and Python) CGI is supposed to be
> too slow for large sites.
For large sites you would have modules loaded into your web server so
that executables don't have to be shelled for each reques
[EMAIL PROTECTED] wrote:
> On Sep 21, 2:44 pm, David <[EMAIL PROTECTED]> wrote:
>>> data = "asdfasgSTARTpruyerfghdfjENDhfawrgbqfgsfgsdfg"
>>> x = re.compile('START.END', re.DOTALL)
>> This should work:
>>
>> x = re.compile('START(.*)END', re.DOTALL)
>
> You'll want to use a non-greedy match:
>
>
Jd wrote:
> Steve Holden wrote:
>> Jd wrote:
>>> Hi
>>>I have a multi-threaded application. For certain operations to the
>>> server, I would like to explicitly set timeout so that I get correct
>>> status from the call and not timed out exception.
>>>Does anyone know how to go about doing
Ulysse wrote:
> Hello,
>
> I've installed Python 2.5 on my WRT54G Linksys Router. On this router
> a script is executed. This script write a little Pickle database in
> the router memory.
>
> I would like to write another Python script which will be able to :
>
> 1. Stop and start the remote scr
On Sep 21, 2:44 pm, David <[EMAIL PROTECTED]> wrote:
> > data = "asdfasgSTARTpruyerfghdfjENDhfawrgbqfgsfgsdfg"
> > x = re.compile('START.END', re.DOTALL)
>
> This should work:
>
> x = re.compile('START(.*)END', re.DOTALL)
You'll want to use a non-greedy match:
x = re.compile(r"START(.*?)END", re.
crybaby wrote:
> On Sep 20, 4:12 pm, Tobiah <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] wrote:
>>> I need to extract the number on each >> i.e 49.950 from the following:
>>> 49.950
>>> The actual number between: 49.950 can be any number of
>>> digits before decimal and after decimal.
>>> #
Steve Holden wrote:
> Jd wrote:
>> Hi
>>I have a multi-threaded application. For certain operations to the
>> server, I would like to explicitly set timeout so that I get correct
>> status from the call and not timed out exception.
>>Does anyone know how to go about doing it ?
>>
> The easi
> data = "asdfasgSTARTpruyerfghdfjENDhfawrgbqfgsfgsdfg"
> x = re.compile('START.END', re.DOTALL)
This should work:
x = re.compile('START(.*)END', re.DOTALL)
--
http://mail.python.org/mailman/listinfo/python-list
Not specific to Python, but it will be implemented in it... how do I
compile a RE to catch everything between two know values? Here's what
I've tried (but failed) to accomplish... the knowns here are START and
END:
data = "asdfasgSTARTpruyerfghdfjENDhfawrgbqfgsfgsdfg"
x = re.compile('START.END', r
[EMAIL PROTECTED] wrote:
> On Sep 21, 12:32 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>> Hi,
>>
>> I'm trying to create my own lib of functions, but it seems like I can
>> only import them if they are in pythons lib folder.
>>
>> Example
>> I have a folder called
>> K:\mypython
>>
>> Now
On Fri, 21 Sep 2007 20:16:29 +0200, David <[EMAIL PROTECTED]> wrote:
>On 9/21/07, cyril giraudon <[EMAIL PROTECTED]> wrote:
>> Hello,
>>
>> I 'd like to know if a std::setw() equivalent function exists in
>> python ?
>>
>> i thought of something like :
>>
>> a = 16
>> "%ai" % 12
>>
>> But it is not
On Fri, 2007-09-21 at 20:16 +0200, David wrote:
> Or, more ugly:
>
> "%%%di" % a % 12
Or, less ugly: "%*i" % (a,12)
--
Carsten Haese
http://informixdb.sourceforge.net
--
http://mail.python.org/mailman/listinfo/python-list
On 9/21/07, cyril giraudon <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I 'd like to know if a std::setw() equivalent function exists in
> python ?
>
> i thought of something like :
>
> a = 16
> "%ai" % 12
>
> But it is not correct.
>
> Any Idea ?
("%i" % 12).rjust(a)
Or, more ugly:
"%%%di" % a % 12
Robin Becker wrote:
> Bruno Desthuilliers wrote:
>> Robin Becker a écrit :
>>> John J. Lee wrote:
>>>
Robin Becker <[EMAIL PROTECTED]> writes:
> I see a folder .python-eggs in my home directory on one of our servers
> with various .so files
>
> ~/.python-eggs/MySQL_python-
Hello,
I 'd like to know if a std::setw() equivalent function exists in
python ?
i thought of something like :
a = 16
"%ai" % 12
But it is not correct.
Any Idea ?
Thanks a lot,
Cyril.
--
http://mail.python.org/mailman/listinfo/python-list
Bruno Desthuilliers <[EMAIL PROTECTED]>
writes:
> Norm a écrit :
>> Hi,
>>
>> without meaning to start a flame war between the various python web
>> tools, I was wondering if anyone had a review of the status of Zope.
>> For example, is it being used for new projects or just maintenance?
>>
>> I
On Sep 21, 12:32 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I'm trying to create my own lib of functions, but it seems like I can
> only import them if they are in pythons lib folder.
>
> Example
> I have a folder called
> K:\mypython
>
> Now in the interactive python shell I type
Jd wrote:
> Hi
>I have a multi-threaded application. For certain operations to the
> server, I would like to explicitly set timeout so that I get correct
> status from the call and not timed out exception.
>Does anyone know how to go about doing it ?
>
The easiest way is to use socket.setd
Hi
I have the following situation.. Have a worker thread, that does the
"work" given to it. While doing work, some of the objects use thread
local storage for storing that requires explicit close. e.g. connection
handles. These objects are long living. The worker, does not have any
direct access
Hi,
I'm trying to create my own lib of functions, but it seems like I can
only import them if they are in pythons lib folder.
Example
I have a folder called
K:\mypython
Now in the interactive python shell I type
Import k:\mypython\listall
And get a error on :
If I store listall.py in pythons li
Hi
I have a multi-threaded application. For certain operations to the
server, I would like to explicitly set timeout so that I get correct
status from the call and not timed out exception.
Does anyone know how to go about doing it ?
/Jd
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 21, 12:56 am, Duncan Booth <[EMAIL PROTECTED]>
wrote:
> George Sakkis <[EMAIL PROTECTED]> wrote:
> > It has to do with the input string length; try multiplying it by 10 or
> > 100. Below is a more complete benchmark; for largish strings, the imap
> > version is the fastest among those using
Dear Pythoneers,
I'm moderately new to python and it got me completely lost already.
I've got a bunch of large (30MB) txt files containing one 'event' per
line. I open files after each other, read them line by line and from
each line build a 'data structure' of a main class (HugeClass)
cont
Gary Jefferson wrote:
> On Sep 20, 10:43 pm, Gary Jefferson <[EMAIL PROTECTED]>
> wrote:
>> I've got a python extension that comes with its own standard autoconf/
>> automake system, and I can "python setup.py build" just fine with it
>> as long as I have previously done "./configure" in that direc
Gary Jefferson wrote:
> On Sep 20, 10:43 pm, Gary Jefferson <[EMAIL PROTECTED]>
> wrote:
>> I've got a python extension that comes with its own standard autoconf/
>> automake system, and I can "python setup.py build" just fine with it
>> as long as I have previously done "./configure" in that direc
Shawn Minisall wrote:
> I'm trying to write a program that gets the first letter of every word
> of a phrase and prints it on screen. I'm having problems with it. I'm
> thinking a for loop would be good since I don't know the exact number of
> words the user is going to enter, but after that I
1 - 100 of 165 matches
Mail list logo