harirammano...@gmail.com writes:
> Hi Jussi,
>
> i have seen you have written a definition to fulfill the requirement,
> can we do this same thing using xml parser, as i have failed to
> implement the thing using xml parser of python if the file is having
> the content as below...
>
> PUBLIC
Hi,
I need to write different sections into a file.
At any point of time, content can be added to any section.
I don't want keep each section into a temporary file.
What is the better way to store the contents of each section and write them
into a file at the end?
What is the better datatype to
Derek Klinge wrote:
Also, it seems to me if the goal is to use the smallest value of n to get a
particular level of accuracy, changing your guess of N by doubling seems to
have a high chance of overshoot.
If you want to find the exact n required, once you overshoot
you could use a binary search
Derek Klinge wrote:
> I found that the pattern of an additional digit of accuracy corresponding
> to 10*n did not hold as strongly for that value (I can post data if
> desired). I also got some results that seem to contradict the mathematical
> definition. For example try EulersNumber(10**15).Limi
Palpandi wrote:
> I need to write different sections into a file.
> At any point of time, content can be added to any section.
>
> I don't want keep each section into a temporary file.
> What is the better way to store the contents of each section and write
> them into a file at the end? What is
On Monday, April 25, 2016 at 12:47:14 PM UTC+5:30, Jussi Piitulainen wrote:
> harirammano...@gmail.com writes:
>
> > Hi Jussi,
> >
> > i have seen you have written a definition to fulfill the requirement,
> > can we do this same thing using xml parser, as i have failed to
> > implement the thing u
On Monday, April 25, 2016 at 3:19:15 PM UTC+5:30, hariram...@gmail.com wrote:
> On Monday, April 25, 2016 at 12:47:14 PM UTC+5:30, Jussi Piitulainen wrote:
> > harirammano...@gmail.com writes:
> >
> > > Hi Jussi,
> > >
> > > i have seen you have written a definition to fulfill the requirement,
> >
On Monday, April 25, 2016 at 1:01:12 PM UTC+5:30, Palpandi wrote:
> Hi,
>
> I need to write different sections into a file.
> At any point of time, content can be added to any section.
>
> I don't want keep each section into a temporary file.
> What is the better way to store the contents of each
On 25/04/2016 09:30, Palpandi wrote:
Hi,
I need to write different sections into a file.
At any point of time, content can be added to any section.
I don't want keep each section into a temporary file.
What is the better way to store the contents of each section and write them
into a file at
harirammano...@gmail.com wrote:
> Here is the code:
Finally ;)
> import xml.etree.ElementTree as ET
> ET.register_namespace("", "http://xmlns.jcp.org/xml/ns/javaee";)
I don't know what this does, but probably not what you expected.
> tree = ET.parse('sample.xml')
> root = tree.getroot()
>
> f
harirammano...@gmail.com writes:
> On Monday, April 25, 2016 at 12:47:14 PM UTC+5:30, Jussi Piitulainen wrote:
>> harirammano...@gmail.com writes:
>>
>> > Hi Jussi,
>> >
>> > i have seen you have written a definition to fulfill the requirement,
>> > can we do this same thing using xml parser, as
Peter Otten writes:
> harirammano...@gmail.com wrote:
>
>> Here is the code:
>
> Finally ;)
:)
--
https://mail.python.org/mailman/listinfo/python-list
harirammano...@gmail.com writes:
> On Monday, April 25, 2016 at 3:19:15 PM UTC+5:30, hariram...@gmail.com wrote:
[- -]
>> Here is the code:
>>
>> import xml.etree.ElementTree as ET
>> ET.register_namespace("", "http://xmlns.jcp.org/xml/ns/javaee";)
>> tree = ET.parse('sample.xml')
>> root = tre
On Monday, April 25, 2016 at 4:09:26 PM UTC+5:30, Jussi Piitulainen wrote:
> Peter Otten writes:
>
> > harirammano...@gmail.com wrote:
> >
> >> Here is the code:
> >
> > Finally ;)
>
> :)
name space issue can be resolved registering name space i have no issue with
that, only concern is xml pars
harirammano...@gmail.com writes:
> On Monday, April 25, 2016 at 4:09:26 PM UTC+5:30, Jussi Piitulainen wrote:
>> Peter Otten writes:
>>
>> > harirammano...@gmail.com wrote:
>> >
>> >> Here is the code:
>> >
>> > Finally ;)
>>
>> :)
>
> name space issue can be resolved registering name space i ha
On Monday, April 25, 2016 at 4:58:15 PM UTC+5:30, Jussi Piitulainen wrote:
> harirammano...@gmail.com writes:
>
> > On Monday, April 25, 2016 at 4:09:26 PM UTC+5:30, Jussi Piitulainen wrote:
> >> Peter Otten writes:
> >>
> >> > harirammano...@gmail.com wrote:
> >> >
> >> >> Here is the code:
> >>
I put some code I did before for the xmlns:
xml_root =
ET.ElementTree(ET.fromstring(xml_decoded)).getroot()
for elem in xml_root.getiterator():
if('{http://request.messagepush.interfaces.comv
harirammano...@gmail.com writes:
> On Monday, April 25, 2016 at 4:58:15 PM UTC+5:30, Jussi Piitulainen wrote:
>> harirammano...@gmail.com writes:
>>
>> > On Monday, April 25, 2016 at 4:09:26 PM UTC+5:30, Jussi Piitulainen wrote:
>> >> Peter Otten writes:
>> >>
>> >> > harirammano...@gmail.com wr
harirammano...@gmail.com wrote:
>> tree.write('output.xml')
>
> yup its working well if i include register namespace, else i am getting
> ns:0 in every line of output.xml.
>
> But its removing top line
>
The write() method allows you to specify an encoding and/or require an xml
declaration:
On 25 April 2016 at 08:39, Gregory Ewing wrote:
> Derek Klinge wrote:
>>
>> Also, it seems to me if the goal is to use the smallest value of n to get
>> a
>> particular level of accuracy, changing your guess of N by doubling seems
>> to
>> have a high chance of overshoot.
>
>
> If you want to find
for a simple code
[code]
vexList = [1, 2, 3]
print('vexList', list(vexList))
vexList=map(lambda e: e+1, vexList)
print('vexList', list(vexList))
vexList = list(vexList)
print('vexList', list(vexList))
vexList=map(lambda e: e*2,vexList)
print('vexList', list(vexList))
[/code]
py27 says
[quote]
A couple thoughts. I think my original approach would be faster than binary
search for finding the minimum value of N needed to get a decimal level of
absolute accuracy from Euler's number. Here is my reasoning:
EulerlersNumber(13).LimitMethod() - math.e < .1 and
EulersNumber(135).LimitMethod - mat
On 2016-04-24, Michael Torrie wrote:
> On 04/24/2016 12:58 PM, CM wrote:
>
>> 1. INPUT: What's the best way to scrape an email like this? The
>>email is to a Gmail account, and the content shows up in the
>>email as a series of basically 6x7 tables (HTML?), one table per
>>PO number/ta
oyster writes:
- -
> I found
> type(map(lambda e: e, vexList)) is in py2
> type(map(lambda e: e, vexList)) is in py3
>
> so, what produces this difference between py2 and py3 in nature? is
> there more examples? where can I find the text abiut his difference?
Yes, there are more ways obtain o
On 04/25/2016 08:13 AM, oyster wrote:
> so, what produces this difference between py2 and py3 in nature? is
> there more examples? where can I find the text abiut his difference?
One thing I see is that both your py2 and py3 examples are treating
print as a function. It's only a function in Py3.
On 2016-04-25, Palpandi wrote:
> Hi,
>
> I need to write different sections into a file. At any point of
> time, content can be added to any section.
>
> I don't want keep each section into a temporary file. What is the
> better way to store the contents of each section and write them into
> a f
Dear Group,
I have a list of tuples, as follows,
list1=[u"('koteeswaram/BHPERSN engaged/NA himself/NA in/NA various/NA
philanthropic/NA activities/NA ','class1')", u"('koteeswaram/BHPERSN is/NA
a/NA very/NA nice/NA person/NA ','class1')", u"('koteeswaram/BHPERSN came/NA
to/NA mumbai/LOC but/
On Mon, Apr 25, 2016 at 3:04 AM, Karim wrote:
>
>
> On 25/04/2016 09:30, Palpandi wrote:
>
>> Hi,
>>
>> I need to write different sections into a file.
>> At any point of time, content can be added to any section.
>>
>> I don't want keep each section into a temporary file.
>> What is the better w
On 25/04/2016 17:00, justin walters wrote:
On Mon, Apr 25, 2016 at 3:04 AM, Karim wrote:
On 25/04/2016 09:30, Palpandi wrote:
Hi,
I need to write different sections into a file.
At any point of time, content can be added to any section.
I don't want keep each section into a temporary fi
hi:
i want to decompress the string
"\x1F\x8B\x08\x00\x00\x00\x00\x00\x00\x00UP]k\xC3
\x14\xFD+\xC3\xE7\xCD\xA8\xF9X\xE2\xEBX\xA1\x0CF\x1F\xBA\xEE%\x10\xAC\xB1\xAD\xC4h\x88f%\x8C\xFD\xF7]\x1B\xDA\xAD\xF8\xE29\xE7z\xEE9~#\xE7\x11G\xAF\xBB\x1C=\x22\xDFv_j\x04H+@\xBAW\x1A\xEEe\x91>SF\x18+i\x9Ef\x0
I use aria2c to download files, aria2c has this feature of allocating the
memory to file before downloading the file and then it will download using
multiple connections so filling the data into this file concurrently.
So i wonder how to do it. I found a way to do that from here
http://stackoverfl
On 04/25/2016 07:13 AM, oyster wrote:
for a simple code
[code]
vexList = [1, 2, 3]
print('vexList', list(vexList))
vexList=map(lambda e: e+1, vexList)
print('vexList', list(vexList))
vexList = list(vexList)
print('vexList', list(vexList))
vexList=map(lambda e: e*2,vexList)
print('vexList', lis
Hello Associates,
Please go through the below job description and let me know your interest.
Please revert me: soura...@itscient.com or sourav524.itsci...@gmail.com.
Position: Websphere Message Broker
Location:Edison , NJ
Duration: 6+ MONTHS
Requisition Details:
Engineer with experience on w
On Tue, 26 Apr 2016 12:56 am, subhabangal...@gmail.com wrote:
> Dear Group,
>
> I have a list of tuples, as follows,
>
> list1=[u"('koteeswaram/BHPERSN engaged/NA himself/NA in/NA various/NA
[... 17 more lines of data ...]
Hi Subhabrata, and thanks for the question.
Please remember that we are
On 04/25/2016 08:39 AM, Grant Edwards wrote:
> Your normal gmail password is used for IMAP.
Actually, no, unless you explicitly tell Google to allow "less-secure"
authentication. Otherwise you are required to set up a special,
application-specific password.
https://support.google.com/accounts/an
On 2016-04-25, Michael Torrie wrote:
> On 04/25/2016 08:39 AM, Grant Edwards wrote:
>> Your normal gmail password is used for IMAP.
>
> Actually, no, unless you explicitly tell Google to allow "less-secure"
> authentication. Otherwise you are required to set up a special,
> application-specific p
On Tue, 19 Apr 2016 18:29:38 -0400, Seymore4Head
wrote:
I am going to forget using a directory path.
I would like to take the file win.txt and append a space and the *
symbol.
f = open('win.txt', 'r+')
for line in f:
f.read(line)
f.write(line+" *")
This doesn't work. Would someone fix
Seymore4Head wrote:
> On Tue, 19 Apr 2016 18:29:38 -0400, Seymore4Head
> wrote:
>
> I am going to forget using a directory path.
> I would like to take the file win.txt and append a space and the *
> symbol.
>
> f = open('win.txt', 'r+')
> for line in f:
> f.read(line)
> f.write(line+" *"
On Mon, 25 Apr 2016 18:24:02 - (UTC), Rob Gaddi
wrote:
>Seymore4Head wrote:
>
>> On Tue, 19 Apr 2016 18:29:38 -0400, Seymore4Head
>> wrote:
>>
>> I am going to forget using a directory path.
>> I would like to take the file win.txt and append a space and the *
>> symbol.
>>
>> f = open('win.
Strip() = white spaces.
Description
The method strip() returns a copy of the string in which all chars have been
stripped from the beginning and the end of the string (default whitespace
characters).
Use to remove return carriage--> line[:-1]
-Original Message-
From: Python-list
[mailt
Seymore4Head wrote:
> On Mon, 25 Apr 2016 18:24:02 - (UTC), Rob Gaddi
> wrote:
>
>>Seymore4Head wrote:
>>
>>> On Tue, 19 Apr 2016 18:29:38 -0400, Seymore4Head
>>> wrote:
>>>
>>> I am going to forget using a directory path.
>>> I would like to take the file win.txt and append a space and the
On 2016-04-25 20:08, Joaquin Alzola wrote:
Strip() = white spaces.
Description
The method strip() returns a copy of the string in which all chars have been
stripped from the beginning and the end of the string (default whitespace
characters).
Use to remove return carriage--> line[:-1]
1. In
Thanks for the tip.
Still broke. :(
f = open('wout.txt', 'r+')
for line in f:
if line=="":
exit
line=line[:-1]
line=line+" *"
f.write(line)
print line
f.close()
I did notice that it wrote the 3 lines of test file but it didn't
append the * after the third entry and
On Mon, Apr 25, 2016, at 16:15, Seymore4Head wrote:
> Thanks for the tip.
>
> Still broke. :(
>
> f = open('wout.txt', 'r+')
> for line in f:
> if line=="":
> exit
> line=line[:-1]
> line=line+" *"
> f.write(line)
> print line
> f.close()
Your problem is that after y
On Mon, 25 Apr 2016 15:56 , wrote:
> Dear Group,
>
> I have a list of tuples, as follows,
>
> list1=[u"('koteeswaram/BHPERSN engaged/NA himself/NA in/NA various/NA
> philanthropic/NA activities/NA ','class1')", u"('koteeswaram/BHPERSN is/NA
> a/NA very/NA nice/NA person/NA ','class1')", u"('kot
I am using a test file that is only 3 lines:
Punjabi .Mp3
Big Lake (DVD) SWV.avi
Blue Balloon.AHC.RH.mkv
The program correctly appends an * to the end of the line, but then it
goes into a loop printing random looking stuff.
f = open('wout.txt', 'r+')
for line in f:
if line=="":
exit
In <27nshbp40p1llr231dqm31p754tvurk...@4ax.com> Seymore4Head
writes:
> On Tue, 19 Apr 2016 18:29:38 -0400, Seymore4Head
> wrote:
> I am going to forget using a directory path.
> I would like to take the file win.txt and append a space and the *
> symbol.
> f = open('win.txt', 'r+')
> for line
Random832 wrote:
> On Mon, Apr 25, 2016, at 16:15, Seymore4Head wrote:
>> Thanks for the tip.
>>
>> Still broke. :(
>>
>> f = open('wout.txt', 'r+')
>> for line in f:
>> if line=="":
>> exit
>> line=line[:-1]
>> line=line+" *"
>> f.write(line)
>> print line
>> f.clos
On Mon, 25 Apr 2016 21:26:34 + (UTC), John Gordon
wrote:
>In <27nshbp40p1llr231dqm31p754tvurk...@4ax.com> Seymore4Head
> writes:
>
>> On Tue, 19 Apr 2016 18:29:38 -0400, Seymore4Head
>> wrote:
>
>> I am going to forget using a directory path.
>> I would like to take the file win.txt and app
On Tue, Apr 26, 2016 at 7:26 AM, John Gordon wrote:
> It's much easier to create a new file and then rename it afterwards,
> instead of rewriting the original file.
And more importantly, it's safer. If anything happens to your process
while it's doing its work, you'll have a junk file sitting aro
On Tue, 26 Apr 2016 05:00 am, Seymore4Head wrote:
> I was reading that. I have read it before. I don't use python enough
> to even remember the simple stuff. Then when I try to use if for
> something simple I forget how.
It is perfectly fine to forget things that you read weeks or months befor
On Tue, 26 Apr 2016 08:04 am, Seymore4Head wrote:
> BTW I was trying to use a line like yours that used an output file
> that didn't exist and was getting an error. I assume that import os
> fixes that.
Why would you assume that?
"Doctor, I have a problem with my arm, but I won't tell you wha
On Tue, 26 Apr 2016 11:51:23 +1000, Steven D'Aprano wrote:
> ... (Possible a few very old operating systems on supercomputers from
> the 1970s or 80s may have supported inserting... I seem to recall that
> VMS may have allowed that... but don't quote me.)
Some [non-supercomputer] OSes/filesystems
Hi,
I am trying send email through smtplib
import smtplib
import os
from libs import send_mail_status
send_mail_status('test', False, 'ABCD', os.getcwd())
libs.py has a function as below:
def send_status_mail(name, success, id, dir):
#SERVER = "localhost"
FROM = "localhost"
TO = ["a.
Hi All,
Pls let me why
"
def __init__(self):
"
declaration required, what's the use of this one.Pls explain me in details.
Thanks in advance.
--
https://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
(Possible a few very old operating systems on
supercomputers from the 1970s or 80s may have supported inserting... I seem
to recall that VMS may have allowed that... but don't quote me.)
I wouldn't be surprised if VMS provided some sort of indexed
random-access file struc
San writes:
> Pls let me why […] declaration required, what's the use of this one.
Welcome to Python! Congratulations on beginning to learn this language.
> Pls explain me in details.
You should participate in our collaborative tutoring forum, ‘tutor’
https://mail.python.org/mailman/listinfo/
57 matches
Mail list logo