Clayton Kirkwood wrote:
> Small problem:
> Import zlib
> For file in files:
> checksum = zlib.adler32(file)
>
> traceback
> checksum = zlib.adler32(file)
> TypeError: a bytes-like object is required, not 'str'
>
> Obvious question, how do I make a bytes-like object. I've read through the
I am pretty sure I installed python3. And, also, matplotlib, scipy, and
numpy. If I enter either python or python3, I get the >>> prompt, so I
may have both installed. How do I verify which versions of python and
numpy, matplotlib and scipy I have installed? I am pretty sure I have
matplotlib,
On 26/10/16 04:19, Ed Troy wrote:
> I am pretty sure I installed python3. And, also, matplotlib, scipy, and
> numpy. If I enter either python or python3, I get the >>> prompt, so I
> may have both installed.
Yes, that's normal. Ubuntu uses python 2 for some of its utilities.
> How do I verify
Ed Troy writes:
> I am pretty sure I installed python3. And, also, matplotlib, scipy,
> and numpy.
> How do I verify which versions of python and numpy, matplotlib and
> scipy I have installed?
The following commandline should list the version of installed python
packages required by the script
> Alan Gauld via Tutor writes:
>> On 26/10/16 04:19, Ed Troy wrote:
>> Would it be a help if I actually list the python program that I am
>> trying to run?
>
> Yes. I'm assuming you just cut n paste the code from the web site but
> something could have gone wrong with the formatting and Python
I found the problem. Originally, I was getting errors that were related
to formatting, apparently. It looked fine to me, but because I had
copied it from the web, there were, apparently, hidden characters. In an
effort to get rid of errors, I was eliminating some lines. I finally
added a line,
I've got three files as follows:
1:
#!/usr/bin/env python3
#
# file: experiment.py
#
# A simple python program that takes parameters.
import sys
info = sys.argv[1:]
print(info)
with open("/home/alex/junk.txt", 'w') as file_object:
for item in info:
file_object.write(''.join((item,'\
Hello,
I am currently writing a basic program to calculate and display the size of
folders with a drive/directory. To do this I am storing each directory in a
dict as the key, with the value being the sum of the size of all files in
that directories (but not directories).
For example:
{ "C:\\doc
On 26/10/16 19:06, Wish Dokta wrote:
> folders with a drive/directory. To do this I am storing each directory in a
> dict as the key, with the value being the sum of the size of all files in
> that directories (but not directories).
>
> For example:
>
> for "C:\\docs\\code" in key:
>
> Which wo
On Oct 26, 2016 2:07 PM, "Wish Dokta" wrote:
>
> Hello,
>
> I am currently writing a basic program to calculate and display the size
of
> folders with a drive/directory. To do this I am storing each directory in
a
> dict as the key, with the value being the sum of the size of all files in
> that d
10 matches
Mail list logo