think you ,i get it .
message = email.message_from_bytes(text)
print(message['Subject']) #can get the subject
But how can i get the body content of message?
message['Body'] or message['Content'] can get none.
On 8/9/2014 7:01 PM, John Gordon wrote:
In luofeiyu
writes:
message = email.
message = email.message_from_bytes(text)
I get it ,
print(message['Subject']) #can get the subject
But how can i get the body content of message?
no , message['Body'] or message['Content']
On 8/9/2014 7:01 PM, John Gordon wrote:
In luofeiyu
writes:
message = email.message_from_string(s
mikemixon...@gmail.com writes:
> I need a tutorial or lesson on Xpath syntax from the ground up. I am totally
> confused on how to assemble an Xpath. All the //a[wizardmojo]::stuffgoeshere
> is confusing as hell
"XPath" is a public standard. You can find its specification
at "http://www.w3.or
On Saturday, August 9, 2014 8:27:15 PM UTC-5, mikemi...@gmail.com wrote:
> I need a tutorial or lesson on Xpath syntax from the ground up. I am totally
> confused on how to assemble an Xpath. All the //a[wizardmojo]::stuffgoeshere
> is confusing as hell, and all the information I find, only tel
In luofeiyu
writes:
> message = email.message_from_string(str(text)).get('subject')
> message # nothing displayed
Try using email.message_from_bytes() instead.
Also have a look at
http://stackoverflow.com/questions/19508393/python-email-parsing-issue
for a question very similar to yours. Pe
In
mikemixon...@gmail.com writes:
> I need a tutorial or lesson on Xpath syntax from the ground up. I am
> totally confused on how to assemble an Xpath. All the
> //a[wizardmojo]::stuffgoeshere is confusing as hell, and all the
> information I find, only tells you very basic examples,
I'm con
I am in python3.4
typ, data = x.con.fetch(b'1', '(RFC822)') #get the first email
text = data[0][1]
message = email.message_from_string(text).get('subject')
Traceback (most recent call last):
File "", line 1, in
File "D:\Python34\lib\email\__init__.py", line 40, in message_from_string
To kind whom it may concern:
I want to draw a map using python, not really a map with full information,
just a get together of a series of small shapes to reflect land use.
The data is like below
1 2 2 3 3 22 3 3 1 1 21 1 1 1 3 33 3 3 3 4 1
Each number represents one land use type. and their po
I need a tutorial or lesson on Xpath syntax from the ground up. I am totally
confused on how to assemble an Xpath. All the //a[wizardmojo]::stuffgoeshere
is confusing as hell, and all the information I find, only tells you very basic
examples, they don't really teach you assuming you know noth
Roy Smith wrote:
> But, putting on my instructor's hat, I think it's important to answer
> questions at a level that can be understood by the student. Painting
> with a broad brush, there's three or four kinds of people asking
> questions on this list:
[...]
> I think suggesting comprehensions in
On 8/9/2014 2:14 PM, Fabien wrote:
On 09.08.2014 19:29, Terry Reedy wrote:
If possible, functions should *return* their results, or yield their
results in chunks (as generators). Let the driver function decide where
to put results. Aside from separating concerns, this makes testing much
easier.
Chris “Kwpolska” Warrick Wrote in message:
> On Sat, Aug 9, 2014 at 7:56 PM, luofeiyu wrote:
>> When i input usb line with my android phone into the pc , there are two
>> disks j: and k: (type :removable disk) displayed in win7.
>>
>> i can get my android phone bluetooth mac address .
>>
>> impo
On Sun, Aug 10, 2014 at 3:43 AM, Terry Reedy wrote:
> And if attendance was part of your grade?
>
Then it'd be easy enough to prove that you were actually there, and
therefore that the "find a Bluetooth device" method is flawed.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
On 09.08.2014 19:29, Terry Reedy wrote:
If possible, functions should *return* their results, or yield their
results in chunks (as generators). Let the driver function decide where
to put results. Aside from separating concerns, this makes testing much
easier.
I see. But then this is also true
Hi all,
You have until tomorrow to submit your talk to Python Brasil [10].
http://2014.pythonbrasil.org.br/dashboard/proposals/
The conference will be amazing! See why:
Our Keynotes -> http://2014.pythonbrasil.org.br/speakers/
Our Venue -> http://2014.pythonbrasil.org.br/news/the-conference-ve
On 8/9/2014 12:26 PM, Dennis Lee Bieber wrote:
On Sat, 09 Aug 2014 14:01:53 -0700, luofeiyu
declaimed the following:
I want to write a program to help my teacher to take attendence.
There are 300 students in a big room,everyone has android phone.
I have matched them with my pc in win7 .
when
On 8/9/2014 7:48 AM, Fabien wrote:
BUT, my "problem" is that several options really are "universal" options
to the program, such as the output directory for example. This
information (where to write their results) is given to most of the
functions as parameter.
If possible, functions should *r
Hi,
On 09.08.2014 18:16, Dennis Lee Bieber wrote:
Better, in my view, is to have the import module set up default values
for everything, AND have a function at the bottom of the form
def initialize(fid=None):
if fid:
# parse file "fid" replacing the module level items
On 2014-08-09 13:48, Fabien wrote:
> So I had the idea to define a super-object which parses the config
> file and input data and is given as a single parameter to the
> processing functions, and the functions take the information they
> need from it. This is tempting because there is no need for
>
In article <338e8fb0-c9ec-462a-b560-1c1ff77de...@googlegroups.com>,
Rustom Mody wrote:
> [To the OP]
> Yeah I am in the minority at least out here in considering
> comprehensions simpler than loops. Take your pick
When comprehensions first came out, I stubbornly refused to get my head
around t
2014-08-09 2:38 GMT+02:00 Nicholas Cannon :
> Ok so I am working on a little project and I cant seem to solve something
> with it. I have a label and then a clear button and I want all the numbers in
> the label to clear when I push the button. This button is on a separate frame
> to the buttons
Hi Ben,
On 09.08.2014 14:17, Ben Finney wrote:
Have one module of your application be responsible for the configuration
of the application::
# app/config.py
import configparser
parser = configparser.ConfigParser()
parser.read("app.conf")
Thanks for the suggestion. This w
Fabien writes:
> So I had the idea to define a super-object which parses the config
> file and input data and is given as a single parameter to the
> processing functions, and the functions take the information they need
> from it.
That's not a bad idea, you could do that without embarrassment.
On 8/9/14 1:35 PM, luofeiyu wrote:
>>> x=["x1","x3","x7","x5","x3"]
>>> x.index("x3")
1
if i want the result of 1 and 4 ?
If you tell us more about your problem, and what you will do with the 1
and 4, there might be an even better way to do what you want.
On 8/8/2014 7:25 PM, Larry Mart
On 09.08.2014 19:22, luofeiyu wrote:
x=["x1","x3","x7","x5"]
y="x3"
>
> how can i get the ordinal number by some codes?
>
> for id ,value in enumerate(x):
> if y==value : print(id)
>
> Is more simple way to do that?
print(x.index(y))
HTH,
Johannes
--
>> Wo hattest Du das Beben
in the http://homepages.ius.edu/rwisman/C490/html/PythonandBluetooth.htm
*Discovery*
The address and name of enabled devices within range can be
discovered by other Bluetooth devices. Discovery can take some time
to complete, given that radio communications is unreliable. The
followi
luofeiyu wrote:
> I want to write a program to help my teacher to take attendence.
>
> There are 300 students in a big room,everyone has android phone.
If your students allow strange devices to connect to their android phones,
then they won't remain their android phones for very long. They will
Folks,
I am not a computer scientist (just a scientist) and I'd like to ask
your opinion about a design problem I have. It's not that I can't get my
program to work, but rather that I have trouble to find an "elegant"
solution to the problem of passing information to my program's elements.
I
I want to write a program to help my teacher to take attendence.
There are 300 students in a big room,everyone has android phone.
I have matched them with my pc in win7 .
when all of them seated on the classroom,
import bluetooth
nearby_devices = bluetooth.discover_devices(lookup_names = True)
p
On Sat, Aug 9, 2014 at 7:56 PM, luofeiyu wrote:
> When i input usb line with my android phone into the pc , there are two
> disks j: and k: (type :removable disk) displayed in win7.
>
> i can get my android phone bluetooth mac address .
>
> import bluetooth
> nearby_devices = bluetooth.discover_d
On Sat, Aug 9, 2014 at 1:49 AM, Ian Kelly wrote:
> On Sat, Aug 9, 2014 at 12:52 AM, Paul Wolf wrote:
>> On Friday, 8 August 2014 23:03:18 UTC+1, Ian wrote:
>>> Have you given any thought to adding a validation mode, where the user
>>> provides a template and a string and wants to know if the str
On Sat, Aug 9, 2014 at 12:52 AM, Paul Wolf wrote:
> On Friday, 8 August 2014 23:03:18 UTC+1, Ian wrote:
>> Have you given any thought to adding a validation mode, where the user
>> provides a template and a string and wants to know if the string
>> matches the template?
>
> Isn't that what regula
elearn wrote:
> str='(\\HasNoChildren \\Junk) "/" "[Gmail]/&V4NXPpCuTvY-"'
> x=str.split(' "')
> [i.replace('"','') for i in x]
> ['(\\HasNoChildren \\Junk)', '/', '[Gmail]/&V4NXPpCuTvY-']
>
> x.strip(" ") will create four parts.
>
> is there more simple to do that ?
Here's another way:
>>> s
33 matches
Mail list logo