On Tue, 03 Sep 2019 08:29:31 +1000, Cameron Simpson wrote:
> Please describe this in more detail. Present a little pycurl output and
> then explain what portion of it should land in the log file.
See the following code from here:
http://pycurl.io/docs/latest/callbacks.html#xferinfofunction
On 01Sep2019 04:13, Hongyi Zhao wrote:
I want to append some log of pycurl's downloading info to file, and I
only want to reserve the last appended line when write. How to do this?
Please describe this in more detail. Present a little pycurl output and
then explain what portion of it s
On 9/1/19 4:02 PM, Spencer Du wrote:
> Hi
>
> I have code for GUI and MQTT. In GUI.py I have "def loadGUI" which loads up a
> GUI file if the file exists in current directory. I want to add the file name
> to a list when a file is imported and for each subsequent file that is
> imported I want
On 2019-09-01 21:02, Spencer Du wrote:
Hi
I have code for GUI and MQTT. In GUI.py I have "def loadGUI" which loads up a
GUI file if the file exists in current directory. I want to add the file name to a list
when a file is imported and for each subsequent file that is imported I want the file
On Monday, 2 September 2019 06:02:58 UTC+10, Spencer Du wrote:
> Hi
>
> I have code for GUI and MQTT. In GUI.py I have "def loadGUI" which loads up a
> GUI file if the file exists in current directory. I want to add the file name
> to a list when a file is imported and for each subsequent file
Hi
I have code for GUI and MQTT. In GUI.py I have "def loadGUI" which loads up a
GUI file if the file exists in current directory. I want to add the file name
to a list when a file is imported and for each subsequent file that is imported
I want the file name to be imported to the same list an
Hi:
I want to append some log of pycurl's downloading info to file, and I
only want to reserve the last appended line when write. How to do this?
--
https://mail.python.org/mailman/listinfo/python-list
On 10May2019 08:08, Madhavan Bomidi wrote:
I have to append requisite data matrix from multiple files into a
single variable using FOR loop.
outData = [];
for file in fileList:
allData = # an array of nrows and ncols.
outData = [outData; allData] # in MATLAB
On 10/05/2019 16:08, Madhavan Bomidi wrote:
Hi,
I have to append requisite data matrix from multiple files into a single
variable using FOR loop.
outData = [];
for file in fileList:
allData = # an array of nrows and ncols.
outData
Hi,
I have to append requisite data matrix from multiple files into a single
variable using FOR loop.
outData = [];
for file in fileList:
allData = # an array of nrows and ncols.
outData = [outData; allData] # in MATLAB
While the ncols are
On Sun, Oct 29, 2017 11:06 PM, Ho Yeung Lee wrote:
>
if run these function to decode in python interactive console,
>it can decode correct,
>
>but when run with a big project, it append a letter Y
>
>
>On Monday, October 30, 2017 at 9:48:36 AM UTC+8, Ho Yeung Lee wrote:
&
AM UTC+8, Ho Yeung Lee wrote:
> >> if run these function to decode in python interactive console,
> >> it can decode correct,
> >>
> >> but when run with a big project, it append a letter Y
> >>
> >>
> >> On Monday, October 30,
nt.
Thank you.
>
> On Monday, October 30, 2017 at 9:51:01 AM UTC+8, Ho Yeung Lee wrote:
>> if run these function to decode in python interactive console,
>> it can decode correct,
>>
>> but when run with a big project, it append a letter Y
>>
>>
> decode(r"\\",1,2)
> [[
>
> it double
>
> On Monday, October 30, 2017 at 9:51:01 AM UTC+8, Ho Yeung Lee wrote:
> > if run these function to decode in python interactive console,
> > it can decode correct,
> >
> > but when run with a big proje
run with a big project, it append a letter Y
>
>
> On Monday, October 30, 2017 at 9:48:36 AM UTC+8, Ho Yeung Lee wrote:
>> def leftrotate(l, n):
>> return l[n:] + l[:n]
>>
>> def rightrotate(l, n):
>> return l[-n:] + l[:-n]
>>
>> def encode(
> it can decode correct,
>
> but when run with a big project, it append a letter Y
>
>
> On Monday, October 30, 2017 at 9:48:36 AM UTC+8, Ho Yeung Lee wrote:
> > def leftrotate(l, n):
> > return l[n:] + l[:n]
> >
> > def rightrotate(l, n):
> >
if run these function to decode in python interactive console,
it can decode correct,
but when run with a big project, it append a letter Y
On Monday, October 30, 2017 at 9:48:36 AM UTC+8, Ho Yeung Lee wrote:
> def leftrotate(l, n):
> return l[n:] + l[:n]
>
> def righ
rn ''.join([chr(i - k) for i in l])
yesterday i add above code and run it with batch file
it can decode a correct password
then i install cx_freeze to produce executable file
but today when i run it, i see the source of encrypted password is correct
but the decode one, it append one more
On Thursday, March 2, 2017 at 9:33:14 PM UTC+5:30, Andrew Zyman wrote:
> Hello,
> please advise.
>
> I'd like search and append the internal list in the list-of-the-lists.
>
> Example:
> ll =[ [a,1], [b,2], [c,3], [blah, 1000] ]
>
> i want to search for the
On Thursday, March 2, 2017 at 3:53:25 PM UTC-5, Andrew Zyman wrote:
> On Thursday, March 2, 2017 at 3:31:36 PM UTC-5, Jussi Piitulainen wrote:
> > Andrew Zyman writes:
> >
> > > On Thursday, March 2, 2017 at 2:57:02 PM UTC-5, Jussi Piitulainen wrote:
> > >> Peter Otten <__pete...@web.de> writes:
>
On Thursday, March 2, 2017 at 3:31:36 PM UTC-5, Jussi Piitulainen wrote:
> Andrew Zyman writes:
>
> > On Thursday, March 2, 2017 at 2:57:02 PM UTC-5, Jussi Piitulainen wrote:
> >> Peter Otten <__pete...@web.de> writes:
> >>
> >> > Andrew Zyman wrote:
> >> >
> >> >> On Thursday, March 2, 2017 at 1
Andrew Zyman writes:
> On Thursday, March 2, 2017 at 2:57:02 PM UTC-5, Jussi Piitulainen wrote:
>> Peter Otten <__pete...@web.de> writes:
>>
>> > Andrew Zyman wrote:
>> >
>> >> On Thursday, March 2, 2017 at 11:27:34 AM UTC-5, Peter Otten wrote:
>> >>> Andrew Zyman wrote:
>> >>> .
>> >>> .
On Thursday, March 2, 2017 at 2:57:02 PM UTC-5, Jussi Piitulainen wrote:
> Peter Otten <__pete...@web.de> writes:
>
> > Andrew Zyman wrote:
> >
> >> On Thursday, March 2, 2017 at 11:27:34 AM UTC-5, Peter Otten wrote:
> >>> Andrew Zyman wrote:
> >>> .
> >>> .
> >>> > End result:
> >>> > ll
Peter Otten <__pete...@web.de> writes:
> Andrew Zyman wrote:
>
>> On Thursday, March 2, 2017 at 11:27:34 AM UTC-5, Peter Otten wrote:
>>> Andrew Zyman wrote:
>>> .
>>> .
>>> > End result:
>>> > ll =[ [a,1], [b,2], [c,3], [blah, 1000, 'new value'] ]
>>>
>>> >>> outer = [["a", 1], ["b", 2]
Andrew Zyman wrote:
> On Thursday, March 2, 2017 at 11:27:34 AM UTC-5, Peter Otten wrote:
>> Andrew Zyman wrote:
>> .
>> .
>> > End result:
>> > ll =[ [a,1], [b,2], [c,3], [blah, 1000, 'new value'] ]
>>
>> >>> outer = [["a", 1], ["b", 2], ["c", 3], ["blah", 1000]]
>> >>> for inner in out
On Thursday, March 2, 2017 at 11:27:34 AM UTC-5, Peter Otten wrote:
> Andrew Zyman wrote:
> .
> .
> > End result:
> > ll =[ [a,1], [b,2], [c,3], [blah, 1000, 'new value'] ]
>
> >>> outer = [["a", 1], ["b", 2], ["c", 3], ["blah", 1000]]
> >>> for inner in outer:
> ... if inner[0] == "b
Andrew Zyman wrote:
> Hello,
> please advise.
>
> I'd like search and append the internal list in the list-of-the-lists.
>
> Example:
> ll =[ [a,1], [b,2], [c,3], [blah, 1000] ]
>
> i want to search for the internal [] based on the string field and, if
>
Hello,
please advise.
I'd like search and append the internal list in the list-of-the-lists.
Example:
ll =[ [a,1], [b,2], [c,3], [blah, 1000] ]
i want to search for the internal [] based on the string field and, if
matches, append that list with a value.
if internal_list[0] ==
On 2017-01-12 18:32, Peter Otten wrote:
> Why did you add an explicit isdir() check? My understanding is that
> the names in dirs are known to be directories.
Ah, right. The code I had laying around that did something similar
but processes both the dirs and the files, so when the OP asked for
jus
Tim Chase wrote:
> def dir_iter(root):
> for fullpath in (
> os.path.join(path, dir_)
> for path, dirs, files in os.walk(root)
> for dir_ in dirs
> ):
> if os.path.isdir(fullpath):
> yield fullpath
Why did you add an explicit
On 2017-01-12 19:28, Iranna Mathapati wrote:
> Example:
> CLI Input: /root/user/branches/xyz
>
> find latest file and append to CLI path:
> "/root/user/branches/xyz/Apple"
I've used something like the below to find the most recent file in a
directory tree (i
On 12/01/17 13:58, Iranna Mathapati wrote:
Hi Team,
How to append file path and find the latest folder according to the latest
date:
CLI input :"/root/user/branches/xyz"
i want to find latest file within CLI input path and append to given CLI
path
Example:
CLI Input: /root/user/br
Hi Team,
How to append file path and find the latest folder according to the latest
date:
CLI input :"/root/user/branches/xyz"
i want to find latest file within CLI input path and append to given CLI
path
Example:
CLI Input: /root/user/branches/xyz
find latest file and append t
Peter Otten at 2016/11/19 5:40:34PM wrote:
> And now for something completely different ;)
>
> What if you only record the changes to the list? For a long list that would
> save space at the expense of calculation time. For example:
Excellent! Although not 100% fit into my application, I must st
jf...@ms4.hinet.net wrote:
> I have a working list 'tbl' and recording list 'm'. I want to append 'tbl'
> into 'm' each time when the 'tbl' was modified. I will record the change
> by append it through the function 'apl'.
&g
Oh, I don't know slice well enough:-(
So, slice tbl[:] will create a new object (a copy of tbl) which can be passed
as a function argument
m.append(tbl[:])
or bind to a new name
w=tbl[:]
or re-bind to itself
w[:]=tbl
Thanks you, Ian and Steve.
Steve D'Aprano at 2016/11/19 11:01:26AM wrote:
>
On Sat, 19 Nov 2016 12:44 pm, jf...@ms4.hinet.net wrote:
> I have a working list 'tbl' and recording list 'm'. I want to append 'tbl'
> into 'm' each time when the 'tbl' was modified. I will record the change
> by append it through t
On Nov 18, 2016 6:47 PM, wrote:
I have a working list 'tbl' and recording list 'm'. I want to append 'tbl'
into 'm' each time when the 'tbl' was modified. I will record the change by
append it through the function 'apl'.
For exampl
I have a working list 'tbl' and recording list 'm'. I want to append 'tbl' into
'm' each time when the 'tbl' was modified. I will record the change by append
it through the function 'apl'.
For example:
>>>tbl=[0,0]
>&g
declaratively (the buzzword FP!) or imperatively.
> Python is rather unique in the extent to which it allows both
> This also makes it uniquely difficult because its all too easy to garble the
> two styles as John's .append inside a LC illustrates.
>
> And the way to ungar
declaratively (the buzzword FP!) or imperatively.
> Python is rather unique in the extent to which it allows both
> This also makes it uniquely difficult because its all too easy to garble the
> two styles as John's .append inside a LC illustrates.
>
> And the way to ungar
2 its important that you always keep in front of you whether you want to
approach a problem declaratively (the buzzword FP!) or imperatively.
Python is rather unique in the extent to which it allows both
This also makes it uniquely difficult because its all too easy to garble the
two styles as Jo
> > I want to go threw and for each index error at [4] append a 0.
>
> You want to append 0 if the list does not have at least 5 items?
>
> > p = re.compile('\d+')
> > fups = p.findall(nomattr['firstup'])
> > [x[4] for x in fups if IndexErro
On Saturday, October 1, 2016 at 7:48:19 AM UTC+5:30, John Gordon wrote:
> In Sayth Renshaw writes:
>
> > I want to go threw and for each index error at [4] append a 0.
>
> You want to append 0 if the list does not have at least 5 items?
>
> > p = re.compile('\d
In <534d5506-1810-4a79-ac8f-95a664d17...@googlegroups.com> Sayth Renshaw
writes:
> I want to go threw and for each index error at [4] append a 0.
You want to append 0 if the list does not have at least 5 items?
> p = re.compile('\d+')
> fups = p.findall(nomattr[
['0', '0', '0', '0']
['0', '0', '0', '0']
['7', '2', '1', '0', '142647', '00']
['7', '2', '0', '1', '87080'
On Thu, Jun 16, 2016 at 2:45 AM, meInvent bbird wrote:
> the name in c# is not called concurrent list, it is called
> blockingcollection
>
> dictionary called concurrent dictionary
>
> thread safe these kind of things
>
> https://msdn.microsoft.com/en-us/library/dd267312(v=vs.110).aspx
>
> https:/
how can list be synchronized when multiprocessor working in it?
will one thread updating non-updated version, but another processor updating
the version?
On Thursday, June 16, 2016 at 4:30:33 PM UTC+8, Steven D'Aprano wrote:
> On Thursday 16 June 2016 17:28, meInvent bbird wrote:
>
> > is there
the name in c# is not called concurrent list, it is called
blockingcollection
dictionary called concurrent dictionary
thread safe these kind of things
https://msdn.microsoft.com/en-us/library/dd267312(v=vs.110).aspx
https://msdn.microsoft.com/en-us/library/dd997369(v=vs.110).aspx
https://msdn.
On Thursday 16 June 2016 17:28, meInvent bbird wrote:
> is there like c# have concurrent list ?
What is a concurrent list?
Can you link to the C# documentation for this?
To me, "concurrent" describes a style of execution flow, and "list" describes a
data structure. I am struggling to understan
is there like c# have concurrent list ?
i find something these, but how can it pass an initlist list variable
is it doing the same function as itertools.combinations ?
def comb(n, initlist): # the argument n is the number of items to select
res = list(itertools.combinations(initlist, n))
Gordon wrote:
> In meInvent bbird
> writes:
>
> > how to for loop append a list [] when using parallel programming
>
> items = []
> for item in parallelized_object_factory():
> items.append(item)
>
> If you want a more specific ans
In meInvent bbird
writes:
> how to for loop append a list [] when using parallel programming
items = []
for item in parallelized_object_factory():
items.append(item)
If you want a more specific answer, ask a more specific question.
--
John Gordon A is
how to for loop append a list [] when using parallel programming
--
https://mail.python.org/mailman/listinfo/python-list
On Sat, 30 Apr 2016 06:26 am, boB Stepp wrote:
> On Mon, Apr 25, 2016 at 8:51 PM, Steven D'Aprano
> wrote:
>
>> See here for the *start* of a more professional approach:
>>
>>
http://code.activestate.com/recipes/579097-safely-and-atomically-write-to-a-file/
>
> What else would I need to know/co
On Mon, Apr 25, 2016 at 8:51 PM, Steven D'Aprano wrote:
> See here for the *start* of a more professional approach:
>
> http://code.activestate.com/recipes/579097-safely-and-atomically-write-to-a-file/
What else would I need to know/consider in order to have a *complete*
professional approach?
On Tue, Apr 26, 2016, at 07:56 PM, Seymore4Head wrote:
> On Tue, 26 Apr 2016 11:53:57 +1000, Steven D'Aprano
> wrote:
>
> >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.
On Wed, Apr 27, 2016 at 12:56 PM, Seymore4Head
wrote:
> On Tue, 26 Apr 2016 11:53:57 +1000, Steven D'Aprano
> wrote:
>
>>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 a
On Tue, 26 Apr 2016 19:16:56 +0100, Michael
wrote:
>If you want to read an entire file, append a space and asterisk and write it
>to another file, this is the code you need:
>
>infile = open('win.txt', 'r')
>text = f.read()
>infile.close()
>text
On Tue, 26 Apr 2016 11:53:57 +1000, Steven D'Aprano
wrote:
>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 th
If you want to read an entire file, append a space and asterisk and write it to
another file, this is the code you need:
infile = open('win.txt', 'r')
text = f.read()
infile.close()
text += " *"
outfile = open('outfile.txt', 'w')
outfile.write
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
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
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
puters from the 1970s or 80s may have supported inserting... I seem
to recall that VMS may have allowed that... but don't quote me.)
So you can append to the *end* of a file without disrupting the content, but
you cannot insert to the middle or beginning of a file without overwriting.
The basi
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
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 it pl
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
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 = ope
removing some other character. It's safer to use
>line.rstrip("\n").
>
>> -Original Message-
>> From: Python-list
>> [mailto:python-list-bounces+joaquin.alzola=lebara@python.org] On Behalf
>> Of Seymore4Head
>> Sent: 25 April 2016 20:01
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
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 d
ine ending, so
line[:-1] could be removing some other character. It's safer to use
line.rstrip("\n").
-Original Message-
From: Python-list
[mailto:python-list-bounces+joaquin.alzola=lebara@python.org] On Behalf Of
Seymore4Head
Sent: 25 April 2016 20:01
To: python-list@python
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.
>>>
ist
[mailto:python-list-bounces+joaquin.alzola=lebara@python.org] On Behalf Of
Seymore4Head
Sent: 25 April 2016 20:01
To: python-list@python.org
Subject: Re: Python path and append
On Mon, 25 Apr 2016 18:24:02 - (UTC), Rob Gaddi
wrote:
>Seymore4Head wrote:
>
>> On Tue, 19 Apr 2016
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
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 l
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 do
n
handle = open("\\Winmx\New$\q.txt")
IOError: [Errno 2] No such file or directory: '\\Winmx\\New$\\q.txt'
What I would like to do is read a plain text file from a hidden
network drive and append a space and the * character to the end of
each line.
Start with this:
prin
2, in
> handle = open("\\Winmx\New$\q.txt")
> IOError: [Errno 2] No such file or directory: '\\Winmx\\New$\\q.txt'
>
> What I would like to do is read a plain text file from a hidden
> network drive and append a space and the * character to the end of
> each lin
t;\\Winmx\New$\q.txt")
IOError: [Errno 2] No such file or directory: '\\Winmx\\New$\\q.txt'
What I would like to do is read a plain text file from a hidden
network drive and append a space and the * character to the end of
each line.
Would someone be so kind as to fill in the
Paulo da Silva wrote:
> Às 21:10 de 13-04-2016, Paulo da Silva escreveu:
>> Hi all.
> ...
>
>> [6 rows x 4 columns]
>>
>>> dft=pd.DataFrame([[1,2,3,4]],
>> index=[datetime.date(2016,1,12)],columns=df.columns)
>>
>>> dft
>> A B C D
>> 2016-01-12 1 2 3 4
>>
>> [1 rows x 4 colu
Às 21:10 de 13-04-2016, Paulo da Silva escreveu:
> Hi all.
...
> [6 rows x 4 columns]
>
>> dft=pd.DataFrame([[1,2,3,4]],
> index=[datetime.date(2016,1,12)],columns=df.columns)
>
>> dft
> A B C D
> 2016-01-12 1 2 3 4
>
> [1 rows x 4 columns]
>
>> pd.concat([df,dft])
> Out[71]
Hi all.
I am learning pandas DataFrame and I want to add (eventually replace by
index) some rows.
For adding here is what I tried:
>df = pd.DataFrame(np.random.randn(6,4), index=dates, columns=list('ABCD'))
>df
A B C D
2013-01-01 -0.111621 1.126761 -2.4
Aaron Christensen wrote:
> Thanks for the response! Several things you stated definitely got me
> thinking. I really appreciate the response. I used what you said and I
> am able to accomplish what I needed.
Perhaps it becomes clearer when you write two helper functions
def read_record(key):
gt; Aaron Christensen wrote:
>
> > Hello,
> >
> > I am trying to figure out how to populate a shelve file with a nested
> > dictionary.
> >
> > These are my requirements:
> >
> > -Create shelve file called people.db
> > -Append the shelve file with new
Aaron Christensen wrote:
> Hello,
>
> I am trying to figure out how to populate a shelve file with a nested
> dictionary.
>
> These are my requirements:
>
> -Create shelve file called people.db
> -Append the shelve file with new people (person_1, person_2, etc.).
&
Hello,
I am trying to figure out how to populate a shelve file with a nested
dictionary.
These are my requirements:
-Create shelve file called people.db
-Append the shelve file with new people (person_1, person_2, etc.).
-Use a for loop to iterate through 'attributes' so that I do n
Hello,
I am trying to figure out how to populate a shelve file with a nested
dictionary.
These are my requirements:
-Create shelve file called people.db
-Append the shelve file with new people (person_1, person_2, etc.).
-Use a for loop to iterate through 'attributes' so that I do n
Pierre Rouleau writes:
> On a OS/X 101.10.5 (Yosemite) system, the system Python just got updated to
> 2.7.10 but it sys.path is partially invalid. How can I fix that?
> ... details removed ...
You have found out that the execution of "site.py" inserts
the invalid entries to "sys.path". I rememb
Hi,
On a OS/X 101.10.5 (Yosemite) system, the system Python just got updated to
2.7.10 but it sys.path is partially invalid. How can I fix that? I don't want
to add something in PYTHONPATH. I know I can create a softlink at the invalid
location to where the real files are located.I just w
Jason;
Thank you for your response. I’m just starting out with Python and the
tutorials I have done are on 2.7.9. I will looking on to python3. It is
preloaded on Mac :-).
Jason
___
jv92...@gmail.com
619-227-0927
> On Mar 6, 2015, at 9:37 PM, Jason Friedman w
On Fri, Mar 6, 2015 at 2:55 PM, Jason Venneri wrote:
> Hello, I'm using the urllib.urlretrieve command to retrieve a couple of lines
> of data. I want to combine the two results into one file not two.
>
> Any suggestions?
>
> Sample
> urllib.urlretrieve('http://www.airplanes.com/data/boeing1.htm
On Friday, March 6, 2015 at 1:55:31 PM UTC-8, Jason Venneri wrote:
> Hello, I'm using the urllib.urlretrieve command to retrieve a couple of lines
> of data. I want to combine the two results into one file not two.
>
> Any suggestions?
>
> Sample
> urllib.urlretrieve('http://www.airplanes.com
Hello, I'm using the urllib.urlretrieve command to retrieve a couple of lines
of data. I want to combine the two results into one file not two.
Any suggestions?
Sample
urllib.urlretrieve('http://www.airplanes.com/data/boeing1.html','B747A.txt')
urllib.urlretrieve('http://www.airplanes.com/dat
On Mon, Jan 26, 2015 at 11:23 AM, Ian Kelly wrote:
> $ python3 -m timeit 't = (1000, 2000, 3000)'
> 1 loops, best of 3: 0.0147 usec per loop
> $ python3 -m timeit 't = [1000, 2000, 3000]'
> 1000 loops, best of 3: 0.0678 usec per loop
> $ python3 -m timeit 't = tuple(range(1))'
> 10
On Mon, Jan 26, 2015 at 10:18 AM, Mark Lawrence wrote:
> IIRC, and probably from this list, creating tuples is way faster than
> creating lists, but accessing items is slower. Can anybody confirm this for
> us?
The first seems to be true as long as the tuples are small.
$ python3 -m timeit 't =
On 26/01/2015 16:29, Jussi Piitulainen wrote:
I've used tuples to convey the intention of immutability, as opposed
to using lists. For all I know, collecting a generator (from groupby)
into a tuple might be slower than collecting it into a list. I have no
intention to measure this. The programs
Ian Kelly writes:
> On Mon, Jan 26, 2015 at 8:50 AM, Adam Funk wrote:
> > On 2015-01-26, Peter Otten wrote:
> >
> >> Adam Funk wrote:
> >>
> >>> On 2015-01-09, Ned Batchelder wrote:
> for b in options.bar or ():
> do_stuff(b)
> >>>
> >>> Do you mean "for b in options.bar or
On Mon, Jan 26, 2015 at 8:50 AM, Adam Funk wrote:
> On 2015-01-26, Peter Otten wrote:
>
>> Adam Funk wrote:
>>
>>> On 2015-01-09, Ned Batchelder wrote:
for b in options.bar or ():
do_stuff(b)
>>>
>>> Do you mean "for b in options.bar or []:" ?
>>
>> Doesn't matter; in the c
1 - 100 of 554 matches
Mail list logo