Dan Barbus schrieb:
> Hi,
>
> I have a problem with setting a property to a class instance, in
> python 2.5.1. The property is defined through get and set methods, but
> when I set it, the setter doesn't get called. Instead, I believe the
> property in the instance gets replaced with a new object
Hi,
I have a problem with setting a property to a class instance, in
python 2.5.1. The property is defined through get and set methods, but
when I set it, the setter doesn't get called. Instead, I believe the
property in the instance gets replaced with a new object (string).
I have the following
+1 for site packages and standard shebang, still lets you launch with
python first followed by .py file or followed by .py file
also for some clues, just open up a terminal in your Mac OS X computer
and check out your exports your PATH will be different depending on
all the software and developme
mmcclaf wrote:
I have to make some queries for 4 tables I have. The following
relations are:
Classes(class, type, country, numGuns, bore, displacement)
Ships (name, class, launched)
Battles (name, date)
Outcomes (ship, battle, result)
The three queries I'm stuck on are the following:
1. Find
Hi Cliff
Thanks so using elementree is the right way to handle this problem
regards
Hrishy
--- On Wed, 25/2/09, J. Clifford Dyer wrote:
> From: J. Clifford Dyer
> Subject: Re: XML Parsing
> To: hris...@yahoo.co.uk
> Cc: python-list@python.org, "Lie Ryan"
> Date: Wednesday, 25 February, 2009
Ha the guru himself responding :-)
--- On Wed, 25/2/09, Paul McGuire wrote:
> From: Paul McGuire
> Subject: Re: XML Parsing
> To: python-list@python.org
> Date: Wednesday, 25 February, 2009, 2:04 PM
> On Feb 25, 1:17 am, hrishy
> wrote:
> > Hi
> >
> > Something like this
> >
>
> >
> > Note i
On Feb 26, 3:16 pm, music24...@gmail.com wrote:
> On Feb 26, 9:03 am, Steve Holden wrote:
>
>
>
> > music24...@gmail.com wrote:
> > > On Feb 26, 2:35 am, Emile van Sebille wrote:
> > >> Peter Otten wrote:
> > >>> Maybe it's about access rights?
> > >>> $ mkdir alpha
> > >>> $ touch alpha/beta
> >
On Feb 26, 9:03 am, Steve Holden wrote:
> music24...@gmail.com wrote:
> > On Feb 26, 2:35 am, Emile van Sebille wrote:
> >> Peter Otten wrote:
> >>> Maybe it's about access rights?
> >>> $ mkdir alpha
> >>> $ touch alpha/beta
> >>> $ python -c"import os; print os.path.exists('alpha/beta')"
> >>>
I have to make some queries for 4 tables I have. The following
relations are:
Classes(class, type, country, numGuns, bore, displacement)
Ships (name, class, launched)
Battles (name, date)
Outcomes (ship, battle, result)
The three queries I'm stuck on are the following:
1. Find the classes that
music24...@gmail.com wrote:
> On Feb 26, 2:35 am, Emile van Sebille wrote:
>> Peter Otten wrote:
>>> Maybe it's about access rights?
>>> $ mkdir alpha
>>> $ touch alpha/beta
>>> $ python -c"import os; print os.path.exists('alpha/beta')"
>>> True
>>> $ chmod u-x alpha
>>> $ python -c"import os; pri
On Feb 26, 2:35 am, Emile van Sebille wrote:
> Peter Otten wrote:
> > Maybe it's about access rights?
>
> > $ mkdir alpha
> > $ touch alpha/beta
> > $ python -c"import os; print os.path.exists('alpha/beta')"
> > True
> > $ chmod u-x alpha
> > $ python -c"import os; print os.path.exists('alpha/beta
Thanks! All fixed!
--
http://mail.python.org/mailman/listinfo/python-list
Dictionaries just store references to objects, right? So is it thread
safe to lock a specific key/val pair on a dictionary and modify its
val and release the lock?
example snippet:
# assuming d_lock was initialized long ago in a thread-safe manner
d_lock.acquire()
d = {}
d[1] = (threading.Lock()
#
class MyError(Exception):
def __init__(self):
self.message = u'Some Chinese:中文'
def __str__(self):
return self.message.encode('utf8')
#
This is an exception that I defined.
On Feb 25, 2009, at 3:54 PM, Shawn Milochik wrote:
It is true that it would be fewer lines of code with the same
functionality, but it's better practice to have that framework in
place so that any changes made in the future wouldn't break any of the
code accessing my class. Obviously this is a fa
On Feb 24, 9:34 am, Dario Traverso wrote:
I've been trying to install the Python Image Library (PIL) on my Mac
OSX Leopard laptop, but have been running into some difficulties.
...
I've followed all of the installation instructions exactly. The build
summary reported everything was "ok". What c
En Wed, 25 Feb 2009 21:24:33 -0200, escribió:
On Wed, Feb 25, 2009 at 05:05:28PM -0200, Gabriel Genellina wrote:
I'd try to move all the global stuff in that module into a function,
"init". Importing the module will always succeed - you have to manually
call init() after importing it.
i nor
On Wed, 25 Feb 2009 08:48:27 -, Bruno Desthuilliers
wrote:
Ben Finney a écrit :
(snip - about using ALL_CAPS for pseudo-constants)
Perhaps I'd even
argue for an update to PEP 8 that endorses this as conventional.
+1
I've been a bit surprised last time I checked PEP8 to find out this
On Feb 25, 10:18 am, Xah Lee wrote:
> On Feb 25, 3:34 am, nick_keighley_nos...@hotmail.com wrote:
>
> > the nasty cons then only appears in a single function which
> > you can hide in a library
>
> I think the following answers that.
>
> Q: If you don't like cons, lisp has arrays and hashmaps, too
On Feb 25, 2009, at 3:20 PM, Vincent Davis wrote:
I have looked around for a good howto setup PYTHONPATH on Mac os x
10.5 Although I get many results I am not sure which is correct. I
am not
sure if it is different for 10.5 over previous versions. Does anyone
know of
a well documented set
On 26/02/2009 4:51 AM, Lorenzo wrote:
PS: Mark, this could be added to a kind of "Deployment" entry in
py2exe wiki, it would be useful.
IIRC, I've never edited the py2exe wiki (despite appearances to the
contrary sometimes, I don't formally maintain that package!).
But that is the cool thin
Hello,
I created a QTextEdit where I wanted to display log messages.
A logging.Handler should do this job.
It worked with one thread well, but when I start a QThread the text on all
widgets is removed and I get many errors in my konsole:
X Error: RenderBadGlyphSet (invalid GlyphSet parameter) 1
On Wed, Feb 25, 2009 at 05:05:28PM -0200, Gabriel Genellina wrote:
> I'd try to move all the global stuff in that module into a function,
> "init". Importing the module will always succeed - you have to manually
> call init() after importing it.
i normally do that anyway and would also have do
for a introduction to the multitude of query-options. I doubt that your
rather simple m:n-relationship is covered there.
s/is/isn't/
Diez
--
http://mail.python.org/mailman/listinfo/python-list
I think Django is fabulous for the admin-interface, a simple text
search and template inheritance. I will use Django for all of those.
What I'm not getting an answer to and cannot find an example of is a
complex search, where I have to retrieve data from multiple tables,
combine the data, remove
Tim Chase wrote:
> As an aside, as of the last time I read the PEP[1] on this, I
> believe it exhausts (or attempts to exhaust) any iterator. IMHO,
> I think this exhausting is a bad idea because it prevents things like
>
>def numbers(start=0):
> i = start
> while True:
>yi
On Wed, 25 Feb 2009 15:54:46 -0500, Shawn Milochik wrote:
On Wed, Feb 25, 2009 at 3:15 PM, Diez B. Roggisch wrote:
Not really. The point about properties is that you *can* make attribute
access trigger getter or setter code.
But not that you do unless there is an actual reason for that. The
i found the solution
This is my first attempt at memcaching html page using cheetah
since cheetah render needs locals() i use getCallerInfo() to get the
locals() and send to memcached
let me know if it is possible to better do this
*notice getCallerInfo
*
*utils.py*
@log_time_func
def renderpage(k
On 24 fév, 18:34, Dario Traverso wrote:
> I've been trying to install the Python Image Library (PIL) on my Mac
> OSX Leopard laptop, but have been running into some difficulties.
>
> I've built the library, using the included setup.py script. The build
> summary checks out ok, and sounds the
May a écrit :
On Feb 24, 10:36 am, "Diez B. Roggisch" wrote:
Thanks for all your suggestions. From what I've experienced in Django
and now that I know a little more about how Python functions, I will
probably use a combination of PHP and Django, instead of trying to get
Python to do the web po
On 2009-02-25, Diez B. Roggisch wrote:
> Don't waste time coding for a future you can't even pretend to
> know. Do what is needed to solve the actual problem.
Premature obfuscation is even worse than premature optimization.
--
Grant Edwards grante Yow! Well, O.K.
Peter Otten wrote:
Maybe it's about access rights?
$ mkdir alpha
$ touch alpha/beta
$ python -c"import os; print os.path.exists('alpha/beta')"
True
$ chmod u-x alpha
$ python -c"import os; print os.path.exists('alpha/beta')"
False
$
I Don't know how this is handled on Windows...
Here's one w
Shawn Milochik schrieb:
On Wed, Feb 25, 2009 at 3:15 PM, Diez B. Roggisch wrote:
Not really. The point about properties is that you *can* make attribute
access trigger getter or setter code.
But not that you do unless there is an actual reason for that. The way you
do it now is simply introdu
On Wed, 2009-02-25 at 15:54 -0500, Shawn Milochik wrote:
> On Wed, Feb 25, 2009 at 3:15 PM, Diez B. Roggisch wrote:
>
> > Not really. The point about properties is that you *can* make attribute
> > access trigger getter or setter code.
> >
> > But not that you do unless there is an actual reason
Shawn Milochik wrote:
> On Wed, Feb 25, 2009 at 3:15 PM, Diez B. Roggisch wrote:
>
>> Not really. The point about properties is that you *can* make attribute
>> access trigger getter or setter code.
>>
>> But not that you do unless there is an actual reason for that. The way you
>> do it now is s
On Wed, Feb 25, 2009 at 3:15 PM, Diez B. Roggisch wrote:
> Not really. The point about properties is that you *can* make attribute
> access trigger getter or setter code.
>
> But not that you do unless there is an actual reason for that. The way you
> do it now is simply introducing clutter, with
wongobongo wrote:
On Feb 24, 9:34 am, Dario Traverso wrote:
I've been trying to install the Python Image Library (PIL) on my Mac
OSX Leopard laptop, but have been running into some difficulties.
I've built the library, using the included setup.py script. The build
summary checks out ok,
I have looked around for a good howto setup PYTHONPATH on Mac os x
10.5 Although I get many results I am not sure which is correct. I am not
sure if it is different for 10.5 over previous versions. Does anyone know of
a well documented set of instructions.
In my python scripts I specify which pytho
>> On a 32-bit system, the dictionary can have up to 2**31 slots,
>> meaning that the maximum number of keys is slightly smaller
>> (about 2**30).
>
> Which, in practice, means that the size is limited by the available memory.
Right. Each slot takes 12 bytes, so the storage for the slots alone
wo
Shawn Milochik schrieb:
Thanks. I wasn't aware of the property() function, but I read up on
it. I modified the Vessels.py file, but not the board file (except
where necessary to handle the changes made to Vessels. Is this better?
http://shawnmilo.com/ships/ships2/
Not really. The point about
Alan G Isaac wrote:
> Great idea, but if you do it again, a bit
> more lead time would be helpful.
>
Appreciate that. Last-minute idea.
regards
Steve
--
Steve Holden+1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
--
http://mail.python.org/mailman
I'm glad I asked :)
Thanks all who posted for your replies, the else-statement is a nice
option.
Python again comes through to deal with those pesky feelings that
something could be better :)
Ross.
Chris Rebert wrote:
Yes. try-except-*else*.
try:
do_something_1()
do_something
Great idea, but if you do it again, a bit
more lead time would be helpful.
Cheers,
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
En Wed, 25 Feb 2009 16:48:16 -0200, escribió:
update: i've found one, but this only works if the exception is raised
at a point determined by the outside.
to explain why this is applicable: in the examples, i used `1/0` to
raise a zero division exception inside the module whose scope i want to
En Wed, 25 Feb 2009 16:19:35 -0200, Thorsten Kampe
escribió:
* Tim Golden (Wed, 25 Feb 2009 17:27:07 +)
Thorsten Kampe wrote:
> * Gabriel Genellina (Wed, 25 Feb 2009 14:00:16 -0200)
>> En Wed, 25 Feb 2009 13:40:31 -0200, Thorsten Kampe
[...]
>>> And I wonder why you would think the header
On Tue, Feb 24, 2009 at 03:27:19PM +0100, chr...@fsfe.org wrote:
> * is there a workaround?
> * especially, is there a workaround that works w/o rewriting the
> modules that raise the exceptions? (otherwise, wrapping all the
> stuff called in the __name__=="__main__" wrapper into a
Thanks. I wasn't aware of the property() function, but I read up on
it. I modified the Vessels.py file, but not the board file (except
where necessary to handle the changes made to Vessels. Is this better?
http://shawnmilo.com/ships/ships2/
--
http://mail.python.org/mailman/listinfo/python-list
RGK wrote:
> Any input appreciated :)
How about:
import logging
try:
# run your function
some_function()
except Exception:
# except only the exceptions you *really* want to catch
# at most you should except "Exception" since it doesn't
# catch KeyboardInterrupt and SystemExit
l
RGK wrote:
I'm still learning, so eager to see if there is some community wisdom
about use of the try/except structures in this situation
try:
do something 1
do something 2
do something 3
do something 4
...
do something 25
except:
print "Oops something didn't
En Wed, 25 Feb 2009 15:44:18 -0200, escribió:
Tab is not mentioned in RFC 2822 except to say that it is a valid
whitespace character. Header folding (insertion of ) can
occur most places whitespace appears, and is defined in section
2.2.3 thusly: [...]
So, the whitespace characters are suppose
* Tim Golden (Wed, 25 Feb 2009 17:27:07 +)
> Thorsten Kampe wrote:
> > * Gabriel Genellina (Wed, 25 Feb 2009 14:00:16 -0200)
> >> En Wed, 25 Feb 2009 13:40:31 -0200, Thorsten Kampe
[...]
> >>> And I wonder why you would think the header contains Unicode characters
> >>> when it says "us-ascii
On Feb 25, 3:34 am, nick_keighley_nos...@hotmail.com wrote:
> the nasty cons then only appears in a single function which
> you can hide in a library
I think the following answers that.
Q: If you don't like cons, lisp has arrays and hashmaps, too.
A: Suppose there's a lang called gisp. In gisp,
Steve Holden wrote:
> RGK wrote:
>>
>> I'm still learning, so eager to see if there is some community wisdom
>> about use of the try/except structures in this situation.
>>
>> I find myself with some potentially risky stuff and wrap it in a
>> try/except structure with good functional results, t
On Wed, Feb 25, 2009 at 9:36 AM, RGK wrote:
>
> I'm still learning, so eager to see if there is some community wisdom about
> use of the try/except structures in this situation.
>
> I find myself with some potentially risky stuff and wrap it in a try/except
> structure with good functional results
In article ,
David Cournapeau wrote:
[...]
>It is very unlikely the problem is in glibc - I would check your code
>carefully first :) On Linux, the following are useful:
You are right that it is extremely unlikely that the bug is in glibc.
However, it is not impossible. Several of my colleagues
On 17 feb, 19:44, Mark Hammond wrote:
> On 18/02/2009 5:49 AM, Sam Clark wrote:
>
> > I am receiving the message "Thisapplicationhasfailedtostartbecause
> > theapplicationconfiguration is incorrect" when I attempt to run a
> > compiled Python program on another machine. I have used py2exe on both
RGK wrote:
>
> I'm still learning, so eager to see if there is some community wisdom
> about use of the try/except structures in this situation.
>
> I find myself with some potentially risky stuff and wrap it in a
> try/except structure with good functional results, though my code leaves
> me a b
rdmur...@bitdance.com wrote:
[...]
>
>The process of moving from this folded multiple-line representation
>of a header field to its single line representation is called
>"unfolding". Unfolding is accomplished by simply removing any CRLF
>that is immediately followed by WSP. Each h
Steve Holden wrote:
> rdmur...@bitdance.com wrote:
> > Steve Holden wrote:
> > from email.header import decode_header
> > print
> >> decode_header("=?us-ascii?Q?Inteum_C/SR_User_Tip:__Quick_Access_to_Recently_Opened_Inteu?=\r\n\t=?us-ascii?Q?m_C/SR_Records?=")
> >> [('Inteum C/SR User Tip
I'm still learning, so eager to see if there is some community wisdom
about use of the try/except structures in this situation.
I find myself with some potentially risky stuff and wrap it in a
try/except structure with good functional results, though my code leaves
me a bit uneasy. Maybe it'
En Wed, 25 Feb 2009 15:01:08 -0200, Thorsten Kampe
escribió:
* Gabriel Genellina (Wed, 25 Feb 2009 14:00:16 -0200)
En Wed, 25 Feb 2009 13:40:31 -0200, Thorsten Kampe
escribió:
> * Roy H. Han (Wed, 25 Feb 2009 10:17:22 -0500)
>> Thanks, RDM, for stating the right approach.
>> Thanks, Steve, fo
Thorsten Kampe wrote:
* Gabriel Genellina (Wed, 25 Feb 2009 14:00:16 -0200)
En Wed, 25 Feb 2009 13:40:31 -0200, Thorsten Kampe
escribió:
* Roy H. Han (Wed, 25 Feb 2009 10:17:22 -0500)
Thanks, RDM, for stating the right approach.
Thanks, Steve, for teaching by example.
I wonder why the email
Steve Holden wrote:
> What, you are saying that
>
> os.path.exists(filename)
>
> is returning false when the file exists? I find that hard to believe.
>
> Please display some evidence so I can understand this.
Maybe it's about access rights?
$ mkdir alpha
$ touch alpha/beta
$ python -c"import
En Wed, 25 Feb 2009 14:50:18 -0200, Shawn Milochik
escribió:
On Wed, Feb 25, 2009 at 11:38 AM, Marco Mariani
wrote:
Yes it's in Python alright, but it's not Pythonese yet. You could try
avoiding the getter/setter stuff, and camelCase method naming, things
like
that, for a start.
What d
Shawn Milochik wrote:
> On Wed, Feb 25, 2009 at 11:38 AM, Marco Mariani wrote:
>> Yes it's in Python alright, but it's not Pythonese yet. You could try
>> avoiding the getter/setter stuff, and camelCase method naming, things like
>> that, for a start.
>>
>> --
>> http://mail.python.org/mailman/lis
* Gabriel Genellina (Wed, 25 Feb 2009 14:00:16 -0200)
> En Wed, 25 Feb 2009 13:40:31 -0200, Thorsten Kampe
> escribió:
> > * Roy H. Han (Wed, 25 Feb 2009 10:17:22 -0500)
> >> Thanks, RDM, for stating the right approach.
> >> Thanks, Steve, for teaching by example.
> >>
> >> I wonder why the emai
music24...@gmail.com wrote:
> On Feb 25, 8:57 pm, Steve Holden wrote:
>> music24...@gmail.com wrote:
>>> Hi all,
>>> I am new to Python, i have installed python 2.5.4 and it is my
>>> requirement.
>>> I need to retrieve the path of filename in python.
>>> I have found some API's to get this:
>>> f
On Wed, Feb 25, 2009 at 11:38 AM, Marco Mariani wrote:
>
> Yes it's in Python alright, but it's not Pythonese yet. You could try
> avoiding the getter/setter stuff, and camelCase method naming, things like
> that, for a start.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
What d
Shawn Milochik wrote:
> I'm not claiming it's bulletproof, but it works. I just kind of came
up with all the
methods off of the top of my head, so if anyone has any suggestions
for more elegant or efficient code, please let me know.
Yes it's in Python alright, but it's not Pythonese yet. You
I started learning Java for fun, and the first project assignment in
the book is to create a game like "Battleship." So, of course, I wrote
it in Python first, just for fun. I haven't had the time to look up
all the Java syntax.
So, here it is, fully functional. I thought I'd throw it out there an
En Wed, 25 Feb 2009 14:07:30 -0200, Seth escribió:
This is not my code and I am fairly new to Python. I did not know how
much it would take to convert pyserial to 3.0. Someone more
knowledgeable than me could do it better and faster. I just want to
see if I could help get it to work.
The la
On Feb 25, 8:57 pm, Steve Holden wrote:
> music24...@gmail.com wrote:
> > Hi all,
>
> > I am new to Python, i have installed python 2.5.4 and it is my
> > requirement.
>
> > I need to retrieve the path of filename in python.
>
> > I have found some API's to get this:
>
> > from os.path import real
On Wed, 25 Feb 2009 07:52:03 -0800, anti-suho wrote:
> In scipy module, there is a function named misc.lena which can return an
> array of numpy.ndarray type. If you use this array as parameter of
> matplotlib.pyplot.imshow and then call the matplotlib.pyplot.imshow
> function, an image will be sh
En Wed, 25 Feb 2009 13:51:20 -0200, Christian Meesters
escribió:
I have a problem using my software on my 64bit laptop, after an update
of my system. The same code still runs on 32bit Intel, but on my laptop
I provoke the crash in the title. The crash is caused - as narrowed
down by me - by r
This is not my code and I am fairly new to Python. I did not know how
much it would take to convert pyserial to 3.0. Someone more
knowledgeable than me could do it better and faster. I just want to
see if I could help get it to work.
I was wrong, it seems that if type(port) in (str, bytes): or i
En Wed, 25 Feb 2009 13:40:31 -0200, Thorsten Kampe
escribió:
* Roy H. Han (Wed, 25 Feb 2009 10:17:22 -0500)
Thanks, RDM, for stating the right approach.
Thanks, Steve, for teaching by example.
I wonder why the email.message_from_string() method doesn't call
email.header.decode_header() auto
music24...@gmail.com wrote:
> Hi all,
>
> I am new to Python, i have installed python 2.5.4 and it is my
> requirement.
>
> I need to retrieve the path of filename in python.
>
> I have found some API's to get this:
>
> from os.path import realpath
> print realpath("NEWS.txt") # here NEWS.txt
In scipy module, there is a function named misc.lena which can return
an array of numpy.ndarray type. If you use this array as parameter of
matplotlib.pyplot.imshow and then call the matplotlib.pyplot.imshow
function, an image will be shown. The shown image is generated by the
numpy.ndarray array.
Hi,
>> I have a problem using my software on my 64bit laptop, after an update
>> of my system. The same code still runs on 32bit Intel, but on my laptop
>> I provoke the crash in the title. The crash is caused - as narrowed
>> down by me - by returning a static PyObject from a C-extension
>> funct
En Wed, 25 Feb 2009 13:31:25 -0200, Gary Wood escribió:
Start looking at the error:
Traceback (most recent call last):
File "E:/python/handson/backAndForth4.py", line 97, in
main()
File "E:/python/handson/backAndForth4.py", line 90, in main
moveAllOnLine(faceList, -dx, dy, stepsAc
* Roy H. Han (Wed, 25 Feb 2009 10:17:22 -0500)
> Thanks, RDM, for stating the right approach.
> Thanks, Steve, for teaching by example.
>
> I wonder why the email.message_from_string() method doesn't call
> email.header.decode_header() automatically.
And I wonder why you would think the header co
Hi all,
I am new to Python, i have installed python 2.5.4 and it is my
requirement.
I need to retrieve the path of filename in python.
I have found some API's to get this:
from os.path import realpath
print realpath("NEWS.txt") # here NEWS.txt exists and it shows the
path of the file as C:\Pyt
Thanks David!
It's still not debugged, but indeed: I get a bunch of warnings. And this
already showed me that there are more potential problems than my first
guess indicated. Alas, for my specific problem I cannot work with ints
chars and doubles. I need to have unsigned longs at some points.
En Wed, 25 Feb 2009 10:40:23 -0200, Christian Meesters
escribió:
I have a problem using my software on my 64bit laptop, after an update of
my system. The same code still runs on 32bit Intel, but on my laptop I
provoke the crash in the title. The crash is caused - as narrowed down by
me - by r
'''Test animation of a group of objects making a face.
Combine the face elements in a function, and use it twice.
Have an extra level of repetition in the animation.
'''
from graphics import *
import time
def moveAll(shapeList, dx, dy):
''' Move all shapes in shapeList by (dx, dy).'''
Hi all,
I am new to Python, i have installed python 2.5.4 and it is my requirement.
I need to retrieve the path of filename in python.
I have found some API's to get this:
from os.path import realpath
print realpath("NEWS.txt") # here NEWS.txt exists and it shows the path of
the file as C:\Pyt
rdmur...@bitdance.com wrote:
> Steve Holden wrote:
> from email.header import decode_header
> print
>> decode_header("=?us-ascii?Q?Inteum_C/SR_User_Tip:__Quick_Access_to_Recently_Opened_Inteu?=\r\n\t=?us-ascii?Q?m_C/SR_Records?=")
>> [('Inteum C/SR User Tip: Quick Access to Recently Opene
Cool, it works!
Thanks, RDM, for stating the right approach.
Thanks, Steve, for teaching by example.
I wonder why the email.message_from_string() method doesn't call
email.header.decode_header() automatically.
On Wed, Feb 25, 2009 at 9:50 AM, wrote:
> Steve Holden wrote:
>> >>> from email.he
Seth wrote:
> I tried all three ways you guys listed nothing seems to convert the
> string to bytes.
>
> It may have to do with the makeDeviceName function, but I can't find
> where that is defined.
>
> Any thoughts??
>
> Here is the whole block of code:
>
> if type(port) in (str, bytes):
En Wed, 25 Feb 2009 12:42:32 -0200, Albert Hopkins
escribió:
On Wed, 2009-02-25 at 17:56 +0530, aditya saurabh wrote:
I defined two functions - lets say
fa = lambda x: 2*x
fb = lambda x: 3*x
Now I would like to use fa*fb in terms of x
is there a way?
Thanks in advance
I'm not sure what "us
I tried all three ways you guys listed nothing seems to convert the
string to bytes.
It may have to do with the makeDeviceName function, but I can't find
where that is defined.
Any thoughts??
Here is the whole block of code:
if type(port) in (str, bytes): #strings are taken directly
Origi
Steve Holden wrote:
> >>> from email.header import decode_header
> >>> print
> decode_header("=?us-ascii?Q?Inteum_C/SR_User_Tip:__Quick_Access_to_Recently_Opened_Inteu?=\r\n\t=?us-ascii?Q?m_C/SR_Records?=")
> [('Inteum C/SR User Tip: Quick Access to Recently Opened Inteum C/SR
> Records', 'us-asc
On Feb 24, 11:31 am, Nick Craig-Wood wrote:
> Ben wrote:
> > No, It uses the the S-lang for video, and input control. However, SLAG
> > is more of an abstract layer on top of that.
>
> > It has a Structures that contains menus and screens (menumodule /
> > screenmodule). One LOADS them up wit
On Wed, 2009-02-25 at 17:56 +0530, aditya saurabh wrote:
> I defined two functions - lets say
> fa = lambda x: 2*x
> fb = lambda x: 3*x
> Now I would like to use fa*fb in terms of x
> is there a way?
> Thanks in advance
I'm not sure what "use fa*fb in terms of x" means.
But if you mean fa(x) * fb
Martin v. Löwis wrote:
> intellimi...@gmail.com wrote:
>> Is there a limit to the size or number of entries that a single
>> dictionary can possess?
>
> On a 32-bit system, the dictionary can have up to 2**31 slots,
> meaning that the maximum number of keys is slightly smaller
> (about 2**30).
W
In article ,
Steve Holden wrote:
>
>Not a joke, but a genuine offer extended to anyone who has already
>contributed to some open source project. See my blog for full details,
>and please pass this on to non-Python programmers who are interested in
>learning the language.
>
> http://holdenweb.blo
Roy H. Han wrote:
> On Wed, Feb 25, 2009 at 8:39 AM, wrote:
[Top-posting corrected]
>> John Machin wrote:
>>> On Feb 25, 11:07=A0am, "Roy H. Han"
>>> wrote:
Dear python-list,
I'm having some trouble decoding an email header using the standard
imaplib.IMAP4 class and email.me
Thanks for writing back, RDM and John Machin. Tomorrow I'll try the
code you suggested, RDM. It looks quite helpful and I'll report the
results.
In the meantime, John asked for more data. The sender's email client
is Microsoft Outlook 11. The recipient email client is Lotus Notes.
Actual Su
On Feb 25, 1:17 am, hrishy wrote:
> Hi
>
> Something like this
>
>
> Note i am not a python programmer just a enthusiast and i was curious why
> people on the list didnt suggest a code like above
>
You just beat the rest of us to it - good example of ElementTree for
parsing XML (and I Iearned t
Thnak you all.
> In the future, explain "didn't work".
> Wrong output? give actual (copy and paste) and expected.
> Error message? give traceback (copy and paste).
I will be careful.
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 132 matches
Mail list logo