In this case, [True] and [False] are not lists, rather you're
accessing the items of the list with the index True or False, as per
the following example:
>>> a_list = ['a', 'b']
>>> a_list[True]
'b'
>>> a_list[False]
'a'
This happens because the __getitem__ method takes its argument (which
in thi
kath wrote:
> Hi,
>
> Can any one please tell me how is the following code is working?
> ['a','b'] is a list of string
Yes.
> and [True] is list of boolean value.
No. It's the subscription operator applied to the list of strings.
a = ['a', 'b']
a[True]
may be clearer.
> How is it making effe
True stands for 1 and False stands for 0
so list[True] is equivalent to list[1]
and list[False] is equivalent to list[0]
On 7/5/07, kath <[EMAIL PROTECTED]> wrote:
Hi,
Can any one please tell me how is the following code is working?
['a','b'] is a list of string, and [True] is list of boolean
Hi Kelvie and RBH,
Thanks for your quick reply. That was very much helpful indeed.
regards,
kath.
--
http://mail.python.org/mailman/listinfo/python-list
En Thu, 05 Jul 2007 01:19:32 -0300, Stuart <[EMAIL PROTECTED]>
escribió:
> What command do you mean when you say "update main_dict with
> dlfl_dict"?
I think Alex Martelly was refering to use main_dict.update(dlfl_dict)
(Python code) or PyDict_Update(main_dict, dlfl_dict) (in C code).
> I tr
Hi,
I have already install Microsoft visual studio .NET 2003 and MinGw,
when I try to build a extension:
python my_extension_setup.py build ( or install ) , I get an error:
LINK : fatal error LNK1141: failure during build of exports file
error: command '"C:\Program Files\Microsoft Visual Studio
Alan Franzoni <[EMAIL PROTECTED]> writes:
> I have a serious "leak" issue; even though I clear all those sets
> and I delete all the references I can have to the current namespace,
> memory is not freed.
Maybe the memory is freed (marked as available for further use by
Python), just not released
David Abrahams wrote:
>
> on Wed Jul 04 2007, Peter Otten <__peter__-AT-web.de> wrote:
>
Explicitly passed, see
>>
http://genshi.edgewall.org/browser/trunk/genshi/filters/tests/transform.py
>>>
>>> IIRC I ran doctest on the file I cited, not the one you're pointing
>>> at. Is th
On Jul 5, 3:41 am, [EMAIL PROTECTED] (Alex Martelli) wrote:
>
Alex already explained everything beautifully. I will just add a link
to
the definite guide to descriptors:
http://users.rcn.com/python/download/Descriptor.htm
Michele Simionato
(who spent lot of brain cycles studying descriptors *
En Thu, 05 Jul 2007 05:08:58 -0300, <[EMAIL PROTECTED]>
escribió:
> I have already install Microsoft visual studio .NET 2003 and MinGw,
> when I try to build a extension:
Is this for Python 2.4? I think you can't compile Python 2.5 with VS2003.
> python my_extension_setup.py build ( or install
On Wed, 04 Jul 2007 21:51:34 +0200, O.R.Senthil Kumaran
<[EMAIL PROTECTED]> wrote:
> Following is a tk code, which will display a checkbutton, and when
> checkbox is
> enabled, it will show the below present Label.
>
> What I was trying is, when checkbox is enabled the Label should be shown
>
Bruno Desthuilliers skrev:
> Paul Rubin a écrit :
>> Bruno Desthuilliers <[EMAIL PROTECTED]> writes:
>>
>>> Haskell - as other languages using type-inference like OCaml - are in
>>> a different category. Yes, I know, don't say it, they are statically
>>> typed - but it's mostly structural typing, n
[EMAIL PROTECTED] wrote:
> I'm looking at the source for the module sre_compile.py and it does
> this import:
>
> import _sre
>
> But I can't find a file related to _sre anywhere. Where is it?
If you want the source code, have a look at
http://svn.python.org/view/python/trunk/Modules/_sre.c
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Wed, 04 Jul 2007 11:21:14 +, Neil Cerutti wrote:
>
> > If the escaped quotes didn't function in raw strings, I'd be
> > unable to construct (with a single notation) a regex that
> > included both kinds of quotes at once.
> >
> > re.c
[EMAIL PROTECTED] wrote:
> I have already install Microsoft visual studio .NET 2003 and MinGw,
> when I try to build a extension:
>
> python my_extension_setup.py build ( or install ) , I get an error:
>
> LINK : fatal error LNK1141: failure during build of exports file
> error: command '"C:\Prog
Steven D'Aprano skrev:
> On Wed, 04 Jul 2007 23:53:15 -0400, David Abrahams wrote:
>
>> on Wed Jul 04 2007, "Steven D'Aprano"
>> wrote:
>>
>>> On Wed, 04 Jul 2007 14:37:34 +, Marc 'BlackJack' Rintsch wrote:
>>>
On Wed, 04 Jul 2007 09:59:24 -0400, David Abrahams wrote:
> Here's
i made MyThread(Thread)
when isDaemon() == 0:
everything works
when isDaemon() == 1:
nothing works
why???
--
http://mail.python.org/mailman/listinfo/python-list
Hi I need to call a widget from a button in WXPYTHON. I've tried to
this from a function like this, but when push the button, the program
opens a window and do error.
Any idea?
.
def DialogRRHH(self,event):
prog = wx.PySimpleApp(0)
wx.InitAllImageHandlers()
DialogRR
On Jul 5, 11:17 am, Michele Simionato <[EMAIL PROTECTED]>
wrote:
> On Jul 5, 3:41 am, [EMAIL PROTECTED] (Alex Martelli) wrote:
>
> >
>
> Alex already explained everything beautifully. I will just add a link
> to
> the definite guide to
> descriptors:http://users.rcn.com/python/download/Descriptor
Thanks for the links and replies, taking care.
My another aim is: Can i develop graphical applications (like in
Windows) which contain menus, interactive dialog boxes etc. using
Ptyhon?
I got it quite but not sure. I don't know Ptyhon's capability skills
for creating interactive softwares like in
On Do, 5.07.2007, 03:45, greg wrote:
> [EMAIL PROTECTED] wrote:
>
>> wxWidgets will give you native looking apps on both Linux and Windows
>
> Well, maybe. There's more to getting a native feel than
> just using the right widgets. I once saw a Qt-based app on
> MacOSX that had tiny little buttons t
On Jul 3, 8:12 pm, [EMAIL PROTECTED] (Cameron Laird) wrote:
> Python is simply easier than C++; you might
> well find that a debugger, for example, doesn't feel as essential
> as it is for you with C++.
That's what I love most about the Python community. Whenever there is
just a non-standard, pla
As far as I understand the issue, any Python process has a sort of
"main" thread. When the main thread exits, the Python process will
exit
if there are only daemon threads around. If there are any non-daemon
threads, the Python process will only exit after those threads are
finished.
Or, as the doc
thanx benjamin )
no more questions
--
http://mail.python.org/mailman/listinfo/python-list
kimiraikkonen schrieb:
> My another aim is: Can i develop graphical applications (like in
> Windows) which contain menus, interactive dialog boxes etc. using
> Ptyhon?
>
> I got it quite but not sure. I don't know Ptyhon's capability skills
> for creating interactive softwares like in Windows's c
Kay Schluehr schrieb:
> That's what I love most about the Python community. Whenever there is
> just a non-standard, platform-dependent or crappy implementation of a
> feature you get told that you don't need it. When printf was good for
> little David print is good enough for me.
>
That's a pro
I run this string to produce a error "x+1"
PyRun_SimpleStringFlags() return -1, so that i know this is a script
with error inside...
but now - how can i get error message?
i tested some py-functions - but this functions do not work... i
called this functions direct after PyRun_SimpleStringFlags
Jan Vorwerk <[EMAIL PROTECTED]> wrote:
> [ lots of sensible stuff to discover "reversed" ]
> >>> print reversed.__doc__
See also:
>>> help(reversed)
--
\S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/
"Frankly I have no feelings towards penguins one way or the other"
-- Arth
I'd like to think of building a chat program, could you advise me if
python is good enough for people to get all of my source code ?
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
QOTW?
Gregor Horvath schrieb:
> That's a property of open source projects.
> Features nobody really needs are not implemented.
>
> Gregor
--
http://mail.python.org/mailman/listinfo/python-list
Alex Popescu wrote:
> On Jul 5, 11:17 am, Michele Simionato <[EMAIL PROTECTED]>
> wrote:
>> On Jul 5, 3:41 am, [EMAIL PROTECTED] (Alex Martelli) wrote:
>>
>>>
>> Alex already explained everything beautifully. I will just add a link
>> to
>> the definite guide to
>> descriptors:http://users.rcn.co
Marcpp wrote:
> Hi I need to call a widget from a button in WXPYTHON. I've tried to
> this from a function like this, but when push the button, the program
> opens a window and do error.
> Any idea?
>
Well, one *really* good idea would be to copy the error message and
paste it into your message.
On Jul 5, 3:32 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> Alex Popescu wrote:
> > On Jul 5, 11:17 am, Michele Simionato <[EMAIL PROTECTED]>
> > wrote:
> >> On Jul 5, 3:41 am, [EMAIL PROTECTED] (Alex Martelli) wrote:
>
> >>>
> >> Alex already explained everything beautifully. I will just add a l
On Jul 5, 11:16 am, Alex Popescu <[EMAIL PROTECTED]>
wrote:
> Guys, I appreciate a lot your help and explanations. It looks like I
> have to read/play a bit more as some of the terms/ideas are pretty new
> to me (coming to Python with a 10 years Java bag, and only with a
> small dynlang bag - Ruby,
Paul Rubin wrote:
> John Nagle <[EMAIL PROTECTED]> writes:
>> This has been tried. Original K&R C had non-enforced static typing.
>> All "struct" pointers were equivalent. It wasn't pretty.
>>
>> It takes strict programmer discipline to make non-enforced static
>> typing work. I've see
> From: Paul Rubin
>
> greg <[EMAIL PROTECTED]> writes:
> > > E.g. your program might pass its test and run properly for years
> > > before some weird piece of input data causes some regexp to not
quite
> > > work.
> >
> > Then you get a bug report, you fix it, and you add a test
> > for it so tha
Brett Cannon was doing some work with the Firefox security model to
allow Python coding from within Firefox. He may have stopped doing the
work because it would not lead to a PhD. I am really looking forward to
seeing someone making this a possibility.
Stefan Sonnenberg-Carstens wrote:
> On Do
What is the best way to re-raise any exception with a message
supplemented with additional information (e.g. line number in a
template)? Let's say for simplicity I just want to add "sorry" to every
exception message. My naive solution was this:
try:
...
except Exception, e:
raise e.__
In article <[EMAIL PROTECTED]>,
Nicola Musatti <[EMAIL PROTECTED]> wrote:
> On Jul 5, 1:23 pm, Gregor Horvath <[EMAIL PROTECTED]> wrote:
> [...]
> > That's a property of open source projects.
> > Features nobody really needs are not implemented.
>
> No, no, you got it all wrong. It's in *commerc
On Jul 5, 1:23 pm, Gregor Horvath <[EMAIL PROTECTED]> wrote:
[...]
> That's a property of open source projects.
> Features nobody really needs are not implemented.
No, no, you got it all wrong. It's in *commercial* projects that
features nobody really needs are not implemented. Profit is
fundament
Can someone suggest some criterion for selecting Python, JPython or Iron
Python for COM Scripting?
I have not looked: I assume there are multiple eclipse plugins for
Python/JPython/Iron Python. Could someone recommend one? I'll also try out
eric that was mentioned previously.
I figured out my
On Jul 5, 3:17 pm, Alex Popescu <[EMAIL PROTECTED]>
wrote:
> The true story is that
> while working on Groovy (I am a committer on this dynlang meant to run
> on the Java VM:http://groovy.codehaus.org) and reading some Python
> materials, my interest grew exponentially. And now I have decided to
>
On 5 jul, 14:51, Steve Holden <[EMAIL PROTECTED]> wrote:
> Marcpp wrote:
> > Hi I need to call a widget from a button in WXPYTHON. I've tried to
> > this from a function like this, but when push the button, the program
> > opens a window and do error.
> > Any idea?
>
> Well, one *really* good idea
Christoph Zwerschke schrieb:
> What is the best way to re-raise any exception with a message
> supplemented with additional information (e.g. line number in a
> template)?
I have the impression that you do NOT want to change the exceptions,
instead you want to print the traceback in a customized
Kay Schluehr wrote:
> On Jul 3, 8:12 pm, [EMAIL PROTECTED] (Cameron Laird) wrote:
>
> > Python is simply easier than C++; you might
> > well find that a debugger, for example, doesn't feel as essential
> > as it is for you with C++.
>
> That's what I love most about the Python community. Whenever t
Thomas Heller wrote:
> I have the impression that you do NOT want to change the exceptions,
> instead you want to print the traceback in a customized way. But I may be
> wrong...
No, I really want to modify the exception, supplementing its message
with additional information about the state of
In article <[EMAIL PROTECTED]>,
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>
>My main feeling is that any such function should be a set method rather
>than a built-in function like len(). The name change was comparatively
>unimportant.
Look up at the Subject: line. There never was any suggestion
On Jul 5, 9:21 am, Roy Smith <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> Nicola Musatti <[EMAIL PROTECTED]> wrote:
>
> > On Jul 5, 1:23 pm, Gregor Horvath <[EMAIL PROTECTED]> wrote:
> > [...]
> > > That's a property of open source projects.
> > > Features nobody really needs are
On 2007-07-05, Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
> Thomas Heller wrote:
>> I have the impression that you do NOT want to change the
>> exceptions, instead you want to print the traceback in a
>> customized way. But I may be wrong...
>
> No, I really want to modify the exception, suppl
On 2007-07-05, Paul McGuire <[EMAIL PROTECTED]> wrote:
> On Jul 5, 9:21 am, Roy Smith <[EMAIL PROTECTED]> wrote:
>> In article <[EMAIL PROTECTED]>,
>> Nicola Musatti <[EMAIL PROTECTED]> wrote:
>>
>> > On Jul 5, 1:23 pm, Gregor Horvath <[EMAIL PROTECTED]> wrote:
>> > [...]
>> > > That's a property
In article <[EMAIL PROTECTED]>,
Kay Schluehr <[EMAIL PROTECTED]> wrote:
>On Jul 3, 8:12 pm, [EMAIL PROTECTED] (Cameron Laird) wrote:
>
>> Python is simply easier than C++; you might
>> well find that a debugger, for example, doesn't feel as essential
>> as it is for you with C++.
>
>That's what I
greg wrote:
> [EMAIL PROTECTED] wrote:
>
> > wxWidgets will give you native looking apps on both Linux and Windows
>
> Well, maybe. There's more to getting a native feel than
> just using the right widgets. I once saw a Qt-based app on
> MacOSX that had tiny little buttons that were too small
> for
On Jul 5, 4:08 pm, Nicola Musatti <[EMAIL PROTECTED]> wrote:
> On Jul 5, 1:23 pm, Gregor Horvath <[EMAIL PROTECTED]> wrote:
> [...]
>
> > That's a property of open source projects.
> > Features nobody really needs are not implemented.
>
> No, no, you got it all wrong. It's in *commercial* projects
On Jul 5, 9:04 am, Marcpp <[EMAIL PROTECTED]> wrote:
> On 5 jul, 14:51, Steve Holden <[EMAIL PROTECTED]> wrote:
>
>
>
> > Marcpp wrote:
> > > Hi I need to call a widget from a button in WXPYTHON. I've tried to
> > > this from a function like this, but when push the button, the program
> > > opens a
Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> En Thu, 05 Jul 2007 01:19:32 -0300, Stuart <[EMAIL PROTECTED]>
> escribió:
>
> > What command do you mean when you say "update main_dict with
> > dlfl_dict"?
>
> I think Alex Martelly was refering to use main_dict.update(dlfl_dict)
> (Python code)
On Jul 5, 4:21 pm, Roy Smith <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> Nicola Musatti <[EMAIL PROTECTED]> wrote:
>
> > On Jul 5, 1:23 pm, Gregor Horvath <[EMAIL PROTECTED]> wrote:
> > [...]
> > > That's a property of open source projects.
> > > Features nobody really needs are
On 5 Jul., 18:07, infidel <[EMAIL PROTECTED]> wrote:
> On Jul 5, 8:58 am, Hardy <[EMAIL PROTECTED]> wrote:
>
>
>
> > I experience a problem with append(). This is a part of my code:
>
> > for entity in temp:
> > md['module']= entity.addr.get('module')
> > md['id']=en
On Jul 5, 8:58 am, Hardy <[EMAIL PROTECTED]> wrote:
> I experience a problem with append(). This is a part of my code:
>
> for entity in temp:
> md['module']= entity.addr.get('module')
> md['id']=entity.addr.get('id')
> md['type']=entity.addr.get('type')
On Jul 4, 12:14 pm, [EMAIL PROTECTED] wrote:
> On Jul 4, 12:40 am, Tim Roberts <[EMAIL PROTECTED]> wrote:
>
>
>
> > KuhlmannSascha <[EMAIL PROTECTED]> wrote:
>
> > >i tried now for several hours to read through a win32com API to access
> > >Itunes and read out myplaylists.
>
> > >First of all the C
I experience a problem with append(). This is a part of my code:
for entity in temp:
md['module']= entity.addr.get('module')
md['id']=entity.addr.get('id')
md['type']=entity.addr.get('type')
#print md
mbusentities.append(md)
Hardy wrote:
> I experience a problem with append(). This is a part of my code:
>
> for entity in temp:
> md['module']= entity.addr.get('module')
> md['id']=entity.addr.get('id')
> md['type']=entity.addr.get('type')
> #print md
>
On Thursday 05 July 2007, HangZhou Monty Boy wrote:
> I'd like to think of building a chat program, could you advise me if
> python is good enough for people to get all of my source code ?
I'm not sure what the language you use has to do with how people acquire your
source code, but (remember: th
On Thu, 05 Jul 2007 07:34:28 -0700, Aahz wrote:
> In article <[EMAIL PROTECTED]>,
> Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>>
>>My main feeling is that any such function should be a set method rather
>>than a built-in function like len(). The name change was comparatively
>>unimportant.
>
>
On 7/5/07, Captain Poutine <[EMAIL PROTECTED]> wrote:
> I'm simply trying to read a CSV into a dictionary.
>
> (if it matters, it's ZIP codes and time zones, i.e.,
> 35983,CT
> 39161,CT
> 47240,EST
>
>
>
> Apparently the way to do this is:
>
> import csv
>
> dictZipZones = {}
>
> reader = csv.reade
On 7/2/07, Douglas Alan <[EMAIL PROTECTED]> wrote:
> Lenard Lindstrom <[EMAIL PROTECTED]> writes:
> > If they are simply a performance tweak then it's not an issue *. I
> > was just concerned that the calls were necessary to keep resources
> > from being exhausted.
>
> Well, if you catch an excepti
with every iteration your previous values are overwritten ('md' is a
dictionary) so thats why your are observing this ouput..
check if the following patch solves your problem
for entity in temp:
md['module']= entity.addr.get('module')
md['id']=entity.addr.get('id')
I'm simply trying to read a CSV into a dictionary.
(if it matters, it's ZIP codes and time zones, i.e.,
35983,CT
39161,CT
47240,EST
Apparently the way to do this is:
import csv
dictZipZones = {}
reader = csv.reader(open("some.csv", "rb"))
for row in reader:
# Add the row to the dictiona
In article <[EMAIL PROTECTED]>,
Gregor Horvath <[EMAIL PROTECTED]> wrote:
>kimiraikkonen schrieb:
>
>> My another aim is: Can i develop graphical applications (like in
>> Windows) which contain menus, interactive dialog boxes etc. using
>> Ptyhon?
>>
>> I got it quite but not sure. I don't know P
> On 2007-07-05, Alan Isaac <[EMAIL PROTECTED]> wrote:
>>Once upon a time, `coerce` was documented
>>with the other built-ins.
Neil Cerutti wrote:
> It's now documented in Library Reference 2.2 Non-essential
> Built-in Functions.
> Apparently it is no longer needed or useful, but only kept for
>
On Thu, 05 Jul 2007 01:48:58 +, richyjsm wrote:
> On Jul 4, 8:14 pm, Steven D'Aprano
> <[EMAIL PROTECTED]> wrote:
>> However, there's a very subtle flaw in the idea. While "the intersection"
>> of two sets is well-defined, "these two sets intersect" is (surprisingly!)
>> _not_ well-defined.
>
On Jul 5, 8:30 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> gert schrieb:
>
> > tried reseting password but i can not login anymore to upload my new
> > source code ?
>
> Please try again. It was a misconfiguration which should be fixed now.
>
> Regards,
> Martin
thank you, it works.
--
ht
I just wanted a simple answer to my simple question, however topic has
messed up. Think questioner as a beginner and use more understandable
terms to help :)
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
> Just because I've never come across it doesn't mean it exists, so
> I'd be grateful for any reference to a technical definition, or
> even references to any mathematician using intersect as a verb in a
> vigorous, non-hand-waving way. Here's a link to get you started:
On Jul 1, 3:30 pm, "Sönmez Kartal" <[EMAIL PROTECTED]> wrote:
"Emacs is the best for anything for me."
Me too.
Also, as pointed out by some others, a debugger is not really all that
necessary for an interpreted language like Python.
> > Hi,
> > For experienced with Pyhton users, which developing
While messing about with some deliberate socket timeout code I got an
unexpected
timeout after 20 seconds when my code was doing socket.setdefaulttimeout(120).
Closer inspection revealed that this error in fact seemed to come from the os
(in this case windows xp).
By inspection of test cases t
On 2007-07-05, Captain Poutine <[EMAIL PROTECTED]> wrote:
> I'm simply trying to read a CSV into a dictionary.
>
> (if it matters, it's ZIP codes and time zones, i.e.,
> 35983,CT
> 39161,CT
> 47240,EST
>
>
>
> Apparently the way to do this is:
>
> import csv
>
> dictZipZones = {}
>
> reader = csv.r
hello all,
i have a c function from some modbus documentation that i need to
translate into python.
it looks like this:
unsigned short CRC16(puchMsg, usDataLen)
unsigned char *puchMsg ;
unsigned short usDataLen ;
{
unsigned char uchCRCHi = 0xFF ;
unsigned char uchCRCLo = 0xFF ;
unsigne
Marcpp schreef:
> Hi I need to call a widget from a button in WXPYTHON. I've tried to
> this from a function like this, but when push the button, the program
> opens a window and do error.
> Any idea?
>
> .
> def DialogRRHH(self,event):
> prog = wx.PySimpleApp(0)
> wx.InitA
Neil Cerutti wrote:
> On 2007-07-05, Captain Poutine <[EMAIL PROTECTED]> wrote:
>> I'm simply trying to read a CSV into a dictionary.
>>
>> (if it matters, it's ZIP codes and time zones, i.e.,
>> 35983,CT
>> 39161,CT
>> 47240,EST
>>
>>
>>
>> Apparently the way to do this is:
>>
>> import csv
>>
>>
Neil Cerutti wrote:
> On 2007-07-05, Captain Poutine <[EMAIL PROTECTED]> wrote:
>> I'm simply trying to read a CSV into a dictionary.
>>
>> (if it matters, it's ZIP codes and time zones, i.e.,
>> 35983,CT
>> 39161,CT
>> 47240,EST
>>
>>
>>
>> Apparently the way to do this is:
>>
>> import csv
>>
>>
Neil Cerutti wrote:
> The documentation for BaseException contains something that might
> be relevant:
>
>[...] If more data needs to be attached to the exception,
>attach it through arbitrary attributes on the instance. All
>
> Users could get at the extra info you attached, but it wouldn
On Jul 5, 10:30 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
>
> I don't think anyone has suggested that. Let me be clear about *my*
> position: When you need to ensure that a file has been closed by a
> certain time, you need to be explicit about it. When you don't care,
> just that it will be cl
Peter Otten wrote:
> Neil Cerutti wrote:
>
>> On 2007-07-05, Captain Poutine <[EMAIL PROTECTED]> wrote:
>>> I'm simply trying to read a CSV into a dictionary.
>>>
>>> (if it matters, it's ZIP codes and time zones, i.e.,
>>> 35983,CT
>>> 39161,CT
>>> 47240,EST
>>>
>>>
>>>
>>> Apparently the way to
Is it possible to run a SMTP server that sends mail to recipients
using standard libraries, without using twisted framework, and also
without using any relay server?
--
http://mail.python.org/mailman/listinfo/python-list
On Thursday 05 July 2007, Captain Poutine wrote:
> Peter Otten wrote:
> > Neil Cerutti wrote:
> >> On 2007-07-05, Captain Poutine <[EMAIL PROTECTED]> wrote:
> >>> I'm simply trying to read a CSV into a dictionary.
> >>>
> >>> (if it matters, it's ZIP codes and time zones, i.e.,
> >>> 35983,CT
> >>>
If you just want to send mail, you should be able to use the standard
smtplib module (http://docs.python.org/lib/module-smtplib.html). If
your recipients are on the Internet, you would need to handle MX
resolution yourself.
I know you said you want to avoid a relay server, but it's probably
the be
On Jul 5, 1:34 pm, "Jeff McNeil" <[EMAIL PROTECTED]> wrote:
> If you just want to send mail, you should be able to use the standard
> smtplib module (http://docs.python.org/lib/module-smtplib.html). If
> your recipients are on the Internet, you would need to handle MX
> resolution yourself.
>
How
On Jun 29, 3:48 am, "Mark Dufour" <[EMAIL PROTECTED]> wrote:
> I have just released version 0.0.22 of Shed Skin, an experimental
> Python-to-C++ compiler. Among other things, it has the exciting new
> feature of being able to generate (simple, for now) extension modules,
> so it's much easier to c
On 2007-07-05, Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
> Neil Cerutti wrote:
>> The documentation for BaseException contains something that might
>> be relevant:
>>
>>[...] If more data needs to be attached to the exception,
>>attach it through arbitrary attributes on the instance.
So, I think I understand what python's scoping is doing in the
following situation:
>>> x = [ lambda: ind for ind in range(10) ]
>>> x
[ at 0x00BEC070>, at 0x00BEC7F0>,
at 0x00BECA70>, at 0x00C1EBF0>,
at 0x00C1EE30>, at 0x00C228F0>,
at 0x00C228B0>, at 0x00C28730>,
at 0x00C286F0>, at 0x00C2
Nis Jørgensen wrote:
> The problem is, these functions can be read as "X is [consisting only
> of] digit[s]", "X is lower [case]" etc, where the bits in brackets have
> been removed for brewity. In the case of "s1 is intersect s2" there is
> no way I can see of adding words to get a correct sentenc
On Thu, 05 Jul 2007 18:56:49 -, _spitFIRE <[EMAIL PROTECTED]> wrote:
>On Jul 5, 1:34 pm, "Jeff McNeil" <[EMAIL PROTECTED]> wrote:
>> If you just want to send mail, you should be able to use the standard
>> smtplib module (http://docs.python.org/lib/module-smtplib.html). If
>> your recipients ar
In article <[EMAIL PROTECTED]>,
Paul Boddie <[EMAIL PROTECTED]> wrote:
> However, it's interesting to consider the work that sometimes needs to
> go in to specify data structures in some languages - thinking of ML
> and friends, as opposed to Java and friends. The campaign for optional
> static t
On 2007-07-05, Captain Poutine <[EMAIL PROTECTED]> wrote:
> "Reader objects (DictReader instances and objects returned by
> the reader() function) have the following public methods:
Lucky for you and me, Peter Otten corrected my mistaken advice.
> next( )
> Return the next row of the
I had nothing better to do, so I thought I would make a database that
contained the songs played on the internet radio station I listen to
(hardradio.com) so I could see how many differents songs/artists they
played. I stored the data like this:
dates = {} #; year = {}; week = {}; date = {};
Inline...
On 7/5/07, _spitFIRE <[EMAIL PROTECTED]> wrote:
> On Jul 5, 1:34 pm, "Jeff McNeil" <[EMAIL PROTECTED]> wrote:
> > If you just want to send mail, you should be able to use the standard
> > smtplib module (http://docs.python.org/lib/module-smtplib.html). If
> > your recipients are on the I
Neil Cerutti wrote:
> You may need the traceback module to get at the error message, if
> trying to read e.message can fail.
>
> Something like this mess here: ;)
>
>...
>except Exception, e:
> etype, evalue, etb = sys.exc_info()
> ex = traceback.format_exception_only(etype, eva
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] says...
> i have a c function from some modbus documentation that i need to
> translate into python.
>
> it looks like this:
>
>
> unsigned short CRC16(puchMsg, usDataLen)
> unsigned char *puchMsg ;
> unsigned short usDataLen ;
> {
>unsigne
On Jul 5, 2:21 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
> You need to do a DNS MX lookup. There's nothing in the Python stdlib
> which provides this functionality. There are several libraries available
> which do this, though (Twisted among them ;). You can probably find them
> with a
On Jul 5, 2:37 pm, "Jeff McNeil" <[EMAIL PROTECTED]> wrote:
> You could try pyDNS (http://pydns.sourceforge.net). You should simply
> be able to call the 'DNS.mxlookup' function. The other option would
> be twisted.names...
>
Thanks for the pointers.
> What about simply running an SMTP server o
1 - 100 of 165 matches
Mail list logo