On 08/04/2017 07:00 PM, Chris Angelico wrote:
> Again, don't stress about exactly when objects get
> disposed of; it doesn't matter.
Respectfully, I disagree strongly. Objects get build on the heap and
persist even when they go out of scope until such time garbage
collection takes place. This i
On 08/05/2017 03:21 PM, Chris Angelico wrote:
> After a 'with' block,
> the object *still exists*, but it has been "exited" in some way
> (usually by closing/releasing an underlying resource).
The containing object exists, but the things that the closing
logic explicitly released do not. In some
On 08/05/2017 11:16 AM, Ned Batchelder wrote:
> It uses
> reference counting, so most objects are reclaimed immediately when their
> reference count goes to zero, such as at the end of local scopes.
Given this code:
class SomeObject:
.
for foo in somelist:
a = SomeObject(foo)
b
On 08/05/2017 05:58 PM, Chris Angelico wrote:
> On Sun, Aug 6, 2017 at 7:32 AM, Tim Daneliuk wrote:
>> On 08/05/2017 03:21 PM, Chris Angelico wrote:
>>> After a 'with' block,
>>> the object *still exists*, but it has been "exited" in some way
On 08/05/2017 05:58 PM, Chris Angelico wrote:
> On Sun, Aug 6, 2017 at 7:32 AM, Tim Daneliuk wrote:
>> On 08/05/2017 03:21 PM, Chris Angelico wrote:
>>> After a 'with' block,
>>> the object *still exists*, but it has been "exited" in some way
On 08/05/2017 05:36 PM, Ned Batchelder wrote:
> On 8/5/17 5:41 PM, Tim Daneliuk wrote:
>> On 08/05/2017 11:16 AM, Ned Batchelder wrote:
>>> It uses
>>> reference counting, so most objects are reclaimed immediately when their
>>> reference count goes to zero
On 08/05/2017 05:36 PM, Ned Batchelder wrote:
> On 8/5/17 5:41 PM, Tim Daneliuk wrote:
>> On 08/05/2017 11:16 AM, Ned Batchelder wrote:
>>> It uses
>>> reference counting, so most objects are reclaimed immediately when their
>>> reference count goes to zero
On 08/10/2017 09:28 AM, Steve D'Aprano wrote:
> Every few years, the following syntax comes up for discussion, with some
> people
> saying it isn't obvious what it would do, and others disagreeing and saying
> that it is obvious. So I thought I'd do an informal survey.
>
> What would you expect t
On 2017-08-11 00:28, Steve D'Aprano wrote:
> What would you expect this syntax to return?
>
> [x + 1 for x in (0, 1, 2, 999, 3, 4) while x < 5]
[1, 2, 3]
I would see this "while-in-a-comprehension" as a itertools.takewhile()
sort of syntactic sugar:
>>> [x + 1 for x in takewhile(lambda m: m < 5
On 2017-08-14 00:36, Steve D'Aprano wrote:
> Python's comprehensions are inspired by Haskell's, but we made
> different choices than they did: we make the fact that a
> comprehension is a loop over values explicit, rather than implicit,
> and we use words instead of cryptic symbols.
I keep wanting
On 2017-08-22 08:21, Rick Johnson wrote:
> Grant Edwards wrote:
> > Abdur-Rahmaan Janhangeer wrote:
> > >
> > > Hi all, i am subscribed to different python lists and
> > > they put their names in the subject [name] subject hence
> > > i can at a glance tell which mail belongs to which list.
>
On 21/08/2017 15:34, Hamish MacDonald wrote:
I wanted to give a shout out to the wonderfully passionate contributions to
python I've witnessed following this and other mailing lists over the
last little bit.
The level of knowledge and willingness to help I've seen are truly
inspiring. Super mo
On 26/08/2017 03:22, Rick Johnson wrote:
Steve D'Aprano wrote:
Rustom Mody wrote:
Ian wrote:
"Larry Martell" wrote:
9:21 PM Rustom Mody wrote:
Statement 1: Aeroplanes fly. Statement 2: Submarines swim.
Are these two statements equally acceptable? [Inspired
by a talk by Noam Chomsky]
There
On 2017-08-31 23:30, Chris Angelico wrote:
> The method you proposed seems a little odd - it steps through the
> strings character by character and casefolds them separately. How is
> it superior to the two-line function? And it still doesn't solve any
> of your other cases.
It also breaks when ca
On 2017-08-31 18:17, Peter Otten wrote:
> A quick and dirty fix would be a naming convention:
>
> upcase_a = something().upper()
I tend to use a "_u" suffix as my convention:
something_u = something.upper()
which keeps the semantics of the original variable-name while hinting
at the normaliza
On 2017-08-31 07:10, Steven D'Aprano wrote:
> So I'd like to propose some additions to 3.7 or 3.8.
Adding my "yes, a case-insensitive equality-check would be useful"
with the following concerns:
I'd want to have an optional parameter to take locale into
consideration. E.g.
"i".case_insensitiv
On 2017-09-01 00:53, MRAB wrote:
> What would you expect the result would be for:
>
>>> "\N{LATIN SMALL LIGATURE FI}".case_insensitive_find("F")
0
>>> "\N{LATIN SMALL LIGATURE FI}".case_insensitive_find("I)
0.5
>>> "\N{LATIN SMALL LIGATURE FFI}".case_insensitive_find("I)
0.6
le. If I try to specify the full pathname by typing: python
> c:\Documents and Settings\-rest of path- I get an error message that
> python can't open c:\Documents.
>
add these directories to a text file called python.pth in your
python23 directory in the format
d:\dir1\dir2
hile since I
chuckled at code ...
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
tlook (my
work account) so I can't afford to add a specific one to trash his
emails...
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
types of spam messages to the list, but XL adds so many non-spam
terms that the from field gets declared a statistical anomaly :(
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
ions.html
Then try running the installer you downloaded (note any errors). Also,
since the packages are produced by different groups (ActiveState vs.
Python.org) perhaps you should uninstall the ActiveState package first
(in which case you may need to install the pywin packages).
Tim Delaney
--
htt
data source until it is no
longer the smallest element, at which time you switch to the data source with
the smallest element.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
On 07/10/05, rbt <[EMAIL PROTECTED]> wrote:
> I have written a python socketServer program and I have a few questions
This is a multithreaded non-blocking version of your server (not
tested), with a basic attempt to hande errors.
from socket import *
from SocketServer import *
import time, threa
On 10 Oct 2005 13:31:51 -0700, dcrespo <[EMAIL PROTECTED]> wrote:
> Hi. I found TSL, a Python Library that supports SRP.
> Do you know where can I find a sample client and server code? Thanks
> for your help.
http://trevp.net/tlslite/
It comes with examples. I use it in several servers and clie
Grig Gheorghiu wrote:
> "TurboGears: Python on Rails?" post:
>
>
http://developers.slashdot.org/developers/05/10/10/0650207.shtml?tid=156
Actually, since the submitter used a coral URL (.nyud.net:8090) the
TurboGears site survived remarkably well.
Tim Delaney
--
http://mail
3
>>>> I = iter(L)
>>>> I
>
>
> (it's probably not a good idea to rely on this behaviour...)
Absolutely not - this has recently been discussed on python-dev, and
Guido regrets that __len__ is exposed on any of the built-in iterators.
This behaviour may wel
of implementation has been discussed on python-dev. IIRC it
was decided by Guido that unless anyone wanted to implement it and show
a significant performance advantage without any regressions on any
platform, it wasn't worth it.
Basically, put up or shut up ;)
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
On 21 Oct 2005 02:34:40 -0700, [EMAIL PROTECTED]
<[EMAIL PROTECTED]>
>
> def email(HOST,FROM,TO,CC,SUBJECT,BODY):
> import smtplib
> import string, sys
> body = string.join((
> "From: %s" % FROM,
> "To: %s" % TO,
> "CC: %s % CC,
> "Subject: %s" % SUBJECT,
> "",
>
On 21/10/05, Steve Holden <[EMAIL PROTECTED]> wrote:
>
> Assuming that TO and CC are single addresses it would be saner to use:
>
:)
Assuming that the envelope TOs (inc CCs) are the same as the
Header-TOs and Header-CCs
Actually, I think this would be safer !
> def email(HOST,FROM,TO,CC, RECI
This site will help you get a useful answer:
http://www.catb.org/~esr/faqs/smart-questions.html
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
On 1 Nov 2005 20:02:41 -0800, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> hi
> i have a dictionary defined as
>
> execfunc = { 'key1' : func1 }
##
def __HELLO(x=' '):
print 'HELLO',x
def __BYE(x=' '):
print 'BYE',x
def __PRINT(x=None, y=None):
print 'PRINT',x,y
c
On 02/11/05, Steve Holden <[EMAIL PROTECTED]> wrote:
> Personally I didn't regard the reply as unhelpful, and I believe the
> replier was honestly trying to get you to see that your rather naive
> suggestion was most unlikely to make things better.
>
To the OP
A tip for curing your own problem -
Colin J. Williams wrote:
> Are there generally accepted guidelines on what is appropriate for the
> builtin namespace?
Yes. If Guido can be convinced it should be in builtins, it should be.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
On 18 Nov 2005 06:30:58 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]
> wrote:> I still don't get it. I tried to test with x = 0 and found that to
Informative print statements can help you to see and understand
the program flow, especially if the problem is conceptual, with
no *real* errors in yo
On 19 Nov 2005 19:40:58 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]
> wrote:hi, does anyone know of a library that can query domain registry or any
site that provide information to such an activity? as i want to build asimple domain name searching program for my own benefit.. thanks alot :D
[TW]
other languages onto it. There's nothing
wrong with bringing concepts across from other languages (look at the
"generators" history), but you need to understand how it will fit with
python before proposing it as a new feature.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
How can I find the port a server is listening on - at the commented
line in the code below. (ie self.serving_on_port_num =
? )
I have googled a lot. :-(
--
class BaseSrvr(SocketServer.ThreadingMixIn, SocketServer.TCPServer):
On 26/11/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
If I understand correctly, you're looking for the socket methodgetsockname(), documented at
http://docs.python.org/lib/socket-objects.htmlJeff
Many thanks Jeff, self.server.socket.getsockname() did the trick.
--
--
http://mail.py
t that to get
maximum performance out of pyrex, it's necessary to produce very
non-pythonic code.
FWIW, I'm strongly in favour of Pyrex eventually becoming part of the
Python distribution.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
7;s
messages on the djgpp port) but I think where it's not too arduous it's
worthwhile.
>From my quick scan, that's pop().
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
Was it *really* necessary to send 4 separate emails to reply to four
sections of the same email?
Good netiquette is to intersperse your comments with quoted sections in
a single email.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
Rick Wotnaz wrote:
> Good netiquette might also suggest quoting what you're replying to,
> wouldn't you think?
Damn - I trimmed [EMAIL PROTECTED] instead of python-list from the To:
list.
I stuffed up.
This one intentionally sent to python-list.
Tim Delaney
--
http://mail.py
tmail account to see what sort of headers each type has
(or hasn't).
Also, you may be better off using smtplib for the sending
portion, the error types will be more informative if there
is a connection or sending issue.
HTH :)
-- Tim Williams
--
http://mail.python.org/mailman/listinfo/python-list
On 09/12/05, Ben Finney <[EMAIL PROTECTED]> wrote:
The only validation you should be doing before sending the message ison the domain part. Since there are records available in DNS toverify, you can check those. Is there an MX record? Is the addressvalid? Do the mappings both way for that record ma
On 6/20/05, Michael Hoffman <[EMAIL PROTECTED]> wrote:
> Paul Watson wrote:
>
> > While printf() does tightly control formatting in C, it does not in
> > Python.
>
> There is no printf() in Python. You should not think of print as being a
> Python version of printf.
For quick and simple removal
process. And
it allowed me to use the entire screen for editing if I wished whilst
still having everything readily available.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
On 6/17/05, Tim Williams <[EMAIL PROTECTED]> wrote:
>
> > - Original Message -
> > From: "Tom Anderson" <[EMAIL PROTECTED]>
> >
> re: http://wipfw.sourceforge.net/?page=home
>
> Tom, this looks good. I had it downloaded, installe
On 27 Jun 2005 15:38:59 -0700, Inkiniteo <[EMAIL PROTECTED]> wrote:
> Hi guys. I have a script that sends the info by email, but i'd like to
> avoid the convertion to HTML by the email client or Gmail, because it
> ruins all the formatting i did (with tabs, mostly). Briefing, i wanna
> be able to s
On 28 Jun 2005 14:45:19 GMT, Odd-R. <[EMAIL PROTECTED]> wrote:
> I have a dictionary, and I want to convert it to a tuple,
> that is, I want each key - value pair in the dictionary
> to be a tuple in a tuple.
>
> If this is the dictionary {1:'one',2:'two',3:'three'},
> then I want this to be the r
>
>
> Hello All,
>
> Is there a way to know in a POP session of a message was seen (old) or not
> (new)?
>
You have to keep a persistant local list of viewed messages , UID
into a text file is often the simplest method.
HTH :)
--
http://mail.python.org/mailman/listinfo/python-list
Tom Anderson wrote:
> How about carrier?
Ends in an "a" (Australian ;)
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
Grant Edwards wrote:
> On 2005-06-30, Delaney, Timothy (Tim) <[EMAIL PROTECTED]> wrote:
>> Tom Anderson wrote:
>>
>>> How about carrier?
>>
>> Ends in an "a" (Australian ;)
>
> Right, but due to some wierd property requiring conservatio
On 7/4/05, Guy Lateur <[EMAIL PROTECTED]> wrote:
>
> Anything else I could try?
Lateral thinking ?
=== untested ===
import imaplib, time, sys
f = open(msg_file)
r = f.readlines()
f.close()
msg1 = ''.join(r)
server = 'my.exchangeserver.com' # or IP address
user = 'user'
pw = 'pw'
M = imaplib.
his is not the intended use, but it does happen.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
On 7/5/05, Guy Lateur <[EMAIL PROTECTED]> wrote:
> Thanks for the suggestion, Tim. Unfortunately, I get a 'connection refused'
> error on the line 'M = imaplib.IMAP4(server)'. It says "socket.error:
> (10061, 'Connection refused')". I'
On 7/5/05, Guy Lateur <[EMAIL PROTECTED]> wrote:
> > I just tried this and it failed with IP addresses but not
> > hostnames/machine names, try it again with the server name. :)
>
> Nope, same problem. I think TJG might be right, and our server probably
> doesn't have IMAP running (yet).
Could y
tance that does implement __iter__ will return the
iterator from the subclass __iter__.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
tml
http://www.python.org/
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
ts still don't work, but contain lots of premature optimisations that
combined have taken well over a week to put into place.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
Tony Meyer wrote:
> It would be interesting to know which JRE the Eclipse advocates are
> using, and which the people that dislike Eclipse are using...
For me, performance is the minor issue. Usability is the major issue. If
find Eclipse to be highly unusable, so I don't use it.
Using zipfile.Zipfile
How can I add a file to a zip file and keep its date and time correct?
Currently the date/time change to the time the file was added to the
zip.Zipinfo doesn't have a write method!
Solutions other than zipfile are welcome, with snippets if possible :)
ginmf in this ins
On 7/15/05, Alberto Vera <[EMAIL PROTECTED]> wrote:
>
> Hello
>
> Is it possible to open a mail and download its files attached in a hard-disk
> using a python script?
>
> Regards
> --
> http://mail.python.org/mailman/listinfo/python-list
>
yes, use the email module.
>>> msg = email.message_from_
On 7/21/05, Michael Hoffman <[EMAIL PROTECTED]> wrote:
> Will McGugan wrote:
>
> > I need a collection class that behaves like a dictionary but when it
> > reaches 'n' items it discards the oldest item so that the length never
> > goes above 'n'. (Its for caching search results)
> >
> > I have a v
On 7/26/05, praba kar <[EMAIL PROTECTED]> wrote:
> Dear All,
>
>Can any one let me know? How to build
> email in python? with some some examples.
>
> regards
> Prabahar
The email module is what you need.
http://docs.python.org/lib/module-email.html
hth :)
--
http://mail.python.org/mail
self.__x = value
x = property(fget=_getX, fset=_setX)
t = Test()
t.x = 1
print t.x
Note that this is almost completely different to what you asked about.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
to Path() and Path(os.path.dirname(os.cwd())
respectively, and the unary division operator (which can either preceed
or follow the object). Hey - paths are special enough to warrant
additional syntax, aren't they?
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
ibuteError, because the method actually
exists. In both cases though you need to know when you create the base
class how it's going to be used to work out whether a super() call is
needed.
One option is to do a try: except (AttributeError, NotImplementedError).
Yuk - talk about hiding errors :(
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
t = ['1', '1.2', '1.12', '1.1', '3.1']
decorated = [(numparts(txt), i, txt) for i, txt in enumerate(lst)]
decorated.sort()
lst[:] = [txt[-1] for d in decorated]
This emulates the 2.4 sorting using `key` i.e. only the key is
evaluated,
Scott David Daniels wrote:
> Delaney, Timothy (Tim) wrote:
>> Scott David Daniels wrote:
>>> For 2.3: (using DSU -- Decorate, Sort, Undecorate)
> ...
>>> lst = ['1', '1.2', '1.12', '1.1', '3.1']
>>&g
ng related - for example, you may want to test that changing a
timeout works over various time periods.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
erpreter, is it
possible that something you'd done before could have caused this?
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
ntrib files should be cleaned up once the
merge is complete ...
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
library ...
Thread starts here:
http://mail.python.org/pipermail/python-dev/2005-March/051915.html
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
Tom Anderson wrote:
> When you say [:], do you mean that you copy lists like this:
>
> l = someList()
> m = []
> m[:] = l
Forwarded to python-list, where it belongs. The idiom is actually:
a = [1, 2, 3]
b = a[:]
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
it was going to
be Laura Creighton?
:)
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
got his questions answered.
FWIW, I agree with you, but then I'm another one who directs people to
smart-questions. I also direct co-workers to it, and even myself on a
semi-regular basis.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
#x27;s easier (and
shorter) to express many concepts/algorithms in Python than in other
languages. This further contributes to it being more fun to code in
Python.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
Wouter van Ooijen (www.voti.nl) wrote:
>> No, not a tiny microcontroller environment. In the
>> microcontroller world, "tiny" means 100 bytes of ram and 4KB of
>> code space.
>
> That's medium :)
>
> PIC10F200: 256 12-bit instructions, 1
pythonprogrammer wrote:
> Does anyone know how to get pixeldata from the image of a button
> without taking a screenshot?
Yes.
http://www.catb.org/~esr/faqs/smart-questions.html
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/277940
For an even bigger improvement (in general), look at psyco:
http://psyco.sourceforge.net/.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
...if len(x) > 6: a.insert(0, x)
...
>>> a
['defenestrate', 'cat', 'window', 'defenestrate']
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
ore finally being decommissioned ...
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
7;s coded in python, then the generator
expression will probably be faster.
Use whatever reads better to you. Look at optimising when you need to,
and not before.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
rably faster version available at:
http://members.optusnet.com.au/tcdelaney/python.html#autosuper
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
> elif self.indent == 0:
> raise EndOfBlock, self.last
Please raise this as a bug report (with the patch) on Sourceforge, or it
almost certainly won't be fixed.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
Tim Roberts wrote:
> Everything works OK while your script runs. When the script exits,
> your "main" module goes to clean things up. Apparently, it does so
> alphabetically.
Nope - it would do it in the iteration order of the module's __dict__.
Not something tha
On 20/09/05, Chris Dewin <[EMAIL PROTECTED]> wrote:
>
> s = smtplib.SMTP("server")
> s.sendmail(fromaddress, toaddresess, msg)
>
> I know that in this instance, the toaddresses variable can be a variable
> of type list.
>
> Suppose the list contains well over 100 emails. Would that create some
>
On 20/09/05, Daniel Dittmar <[EMAIL PROTECTED]> wrote:
> Chris Dewin wrote:
> > Hi. I've been thinking about using smtplib to run a mailing list from my
> > website.
> >
> > s = smtplib.SMTP("server")
> > s.sendmail(fromaddress, toaddresess, msg)
> >
>
> Not really an answer to your question, bu
On 20/09/05, M.N.A.Smadi <[EMAIL PROTECTED]> wrote:
> hi;
> if i want to send a mail message using the "mail" client on a machine
> that has smtp protocol is there an easy way (i.e. like bash where you
> would just type mail -s SUBJECT message RECIPIENT) to do it from a
> python script?
Any mail c
On 11/12/05, John Walton <[EMAIL PROTECTED]> wrote:
Hello again! I'm still working on that instant messenger
(for science fair), and I have been reading about networking in some
Java tutorials. In one part of it, it said to have a connection with
another computer, you need to know the IP name of t
On 11/12/05, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] wrote:> Fairly new to python. In a try except how do you display the true> (raw) error message so it can be displayed back to the user?
assuming that "true" means "the message you would get if you hadn'tused a try/except", the
ory allocator works, the second bound
method created reused the same memory as the just-released bound method,
and hence gave the same id().
Now, if you hold onto the bound methods, you will see that they get
different IDs.
>>> class A:
... def m1 (self): print "m1"
... def m2 (self): print "m2"
...
>>> a = A()
>>> m1 = a.m1
>>> m2 = a.m2
>>> id(m1)
10378576
>>> id(m2)
10383408
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
__ == '__main__':
will run. The -c import invocation does not set the specified module as
the __main__ module.
The -m semantics are more normally what you want, and so -m has become
the one obvious way to do it (assuming Python 2.4 and up).
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
function, the binding to the old object is lost, and the name is bound
to a new object.
Mutability is irrelevant. You can access the object via the bound
parameter name, unless you rebind it.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
On 20/12/05, Kevin Yuan <[EMAIL PROTECTED]> wrote:
I tried the following getFilePath = lambda name: os.path.normpath('%s\\%s' % (sys.modules[name].prefix, sys.modules[name].__name__))
getFilePath('__main__')
getFilePath = sys.argv[0] ??
:)
--
http://mail.python.org/mailman/listinf
On 20/12/05, Suresh Jeevanandam <[EMAIL PROTECTED]> wrote:
Hi,I have a string like,s1 = '12e3's2 = 'junk'Now before converting these values to float, I want to check if theyare valid numbers.s1.isdigit returns False.
Is there any other function which
On 20 Dec 2005 15:01:02 +0100, Stefan Arentz <[EMAIL PROTECTED]> wrote:
Is there a JMS-like API available for Python? I would like toquickly receive messages through the network and then processthose slowly in the backgound. In the Java world I would simplycreate a (persistent) queue and tell the J
On 21 Dec 2005 03:15:47 -0800, Narendra <
[EMAIL PROTECTED]> wrote:
Hi All,i got a problem. I need to convert time from EST standard to PSTstandard.Thu, 15 Dec 2005 09:24:19 -0500 to PST
Quick and dirty, might not work for times at the end of DST
>>> import time
>>> from email import Utils
>>>
On 21 Dec 2005 01:43:13 -0800, Tim N. van der Leeuw <[EMAIL PROTECTED]> wrote:
Hi,I want to parse strings containing date-time, which look like thefollowing:
"Mon Dec 19 11:06:12:333 CET 2005"[snipped]What I want to get is some sort of sortable date; either as a number or(if no
7301 - 7400 of 7730 matches
Mail list logo