On 11/7/2023 2:48 AM, Christian Buhtz via Python-list wrote:
Hello Dieter,
thanks for your reply.
Am 06.11.2023 19:11 schrieb Dieter Maurer:
One option is a test suite (--> Python's "unittest" package)
with a sufficiently high coverage (near 100 %).
Yes, that is the primary goal. But it is f
Hello Dieter,
thanks for your reply.
Am 06.11.2023 19:11 schrieb Dieter Maurer:
One option is a test suite (--> Python's "unittest" package)
with a sufficiently high coverage (near 100 %).
Yes, that is the primary goal. But it is far away in the related
project.
I got a hint that "pylint"
Dieter Maurer via Python-list ezt írta (időpont:
2023. nov. 6., H, 19:13):
> c.bu...@posteo.jp wrote at 2023-11-6 12:47 +:
> >I would like to know how to detect (e.g. via a linter) typos in function
> >names imported from another module.
>
> One option is a test suite (--> Python's "unittest"
c.bu...@posteo.jp wrote at 2023-11-6 12:47 +:
>I would like to know how to detect (e.g. via a linter) typos in function
>names imported from another module.
One option is a test suite (--> Python's "unittest" package)
with a sufficiently high coverage (near 100 %).
--
https://mail.python.org/
The function "baR()" does not exist in "foo". This cause an
AttributeError when run with a Python interpreter.
The described error is not detected in my IDE (Emacs with eglot, pylsp
and flake8) and not by flake8 on the shell. Because the involved tools
do not look inside the &
On Fri, Jan 7, 2022 at 8:47 AM <2qdxy4rzwzuui...@potatochowder.com> wrote:
>
> On 2022-01-06 at 14:21:48 -0700,
> Mats Wichmann wrote:
>
> > And at a more meta level: many functions in the Python world return
> > None as an indication that the operation did not succeed. It's useful
> > because i
On 2022-01-06 at 14:21:48 -0700,
Mats Wichmann wrote:
> And at a more meta level: many functions in the Python world return
> None as an indication that the operation did not succeed. It's useful
> because in many circumstances None is an "out of band" value - one
> that could not happen natura
kinter\__init__.py", line
>> 1705, in __call__
>> return self.func(*args)
>> File "D:/Python/Book Bank/New folder/PyCharm/Final/Excel.py", line 57, in
>> SaveBook
>> e_pissue.get(),
>> AttributeError: 'NoneType' object has no att
eturn self.func(*args)
> File "D:/Python/Book Bank/New folder/PyCharm/Final/Excel.py", line 57, in
> SaveBook
> e_pissue.get(),
> AttributeError: 'NoneType' object has no attribute 'get'
>
> Process finished with exit code 0
The error means tha
y", line 57, in
SaveBook
e_pissue.get(),
AttributeError: 'NoneType' object has no attribute 'get'
Process finished with exit code 0
--
https://mail.python.org/mailman/listinfo/python-list
ng
How to fix this issue.
Thanks in advance
Regards
Pranesh Kumar
9789411538
Sent from [2]Mail for Windows
From: [3]OmPs
Sent: 06 November 2021 00:01
To: [4]pranesh kumar
Cc: [5]python-list@python.org
Subject: Re: Vnev issue - AttributeError: module '
pycharm community version 2021.2.2.
>
>Trying to import Open CV in pycharm but not able to complete
>
>When creating new virtual environment error I got is "AttributeError:
>module 'sysconfig' has no attribute '_get_default_scheme'. Did y
Hi
Facing problem in creating virtual environment and in importing modules in
pycharm community version 2021.2.2.
Trying to import Open CV in pycharm but not able to complete
When creating new virtual environment error I got is "AttributeError:
module 'sysconf
On 30/09/21 7:28 am, dn wrote:
Oh yes! The D2 kit - I kept those books for years...
https://www.electronixandmore.com/adam/temp/6800trainer/mek6800d2.html
My 6800 system was nowhere near as fancy as that! It was the
result of replacing the CPU in my homebrew Miniscamp.
--
Greg
--
https://mai
Ah, Z80s (deep sigh). Those were the days! You could disassemble the
entire CP/M operating system (including the BIOS), and still have many
Kb to play with! Real programmers don't need gigabytes!
On 29/09/2021 03:03, 2qdxy4rzwzuui...@potatochowder.com wrote:
On 2021-09-29 at 09:21:34 +1000,
On 29/09/2021 19.16, Greg Ewing wrote:
> On 29/09/21 3:03 pm, 2qdxy4rzwzuui...@potatochowder.com wrote:
>> Who thinks in little
>> endian? (I was raised on 6502s and 680XX CPUs; 8080s and Z80s always
>> did things backwards.)
>
> The first CPU I wrote code for was a National SC/MP, which doesn't
On 2021-09-29 03:03, 2qdxy4rzwzuui...@potatochowder.com wrote:
On 2021-09-29 at 09:21:34 +1000,
Chris Angelico wrote:
On Wed, Sep 29, 2021 at 9:10 AM <2qdxy4rzwzuui...@potatochowder.com> wrote:
>
> On 2021-09-29 at 11:38:22 +1300,
> dn via Python-list wrote:
>
> > For those of us who remember
On 29/09/21 3:03 pm, 2qdxy4rzwzuui...@potatochowder.com wrote:
Who thinks in little
endian? (I was raised on 6502s and 680XX CPUs; 8080s and Z80s always
did things backwards.)
The first CPU I wrote code for was a National SC/MP, which doesn't
have an endianness, since it never deals with more
On Wed, Sep 29, 2021 at 12:06 PM <2qdxy4rzwzuui...@potatochowder.com> wrote:
> > ... Or, even better, to be able to read off a hex dump and see E8 03
> > and instantly read it as "1,000 little-endian".
>
> 59535 big endian. Warningm flamebait ahead: Who thinks in little
> endian? (I was raised o
On 2021-09-29 at 09:21:34 +1000,
Chris Angelico wrote:
> ... read off a hex dump and see E8
> 03 and instantly read it as "1,000 little-endian".
ITYM 000,1 little-endian. ;-)
(Or possibly 000.1, depending on your locale.)
--
https://mail.python.org/mailman/listinfo/python-list
On 2021-09-29 at 09:21:34 +1000,
Chris Angelico wrote:
> On Wed, Sep 29, 2021 at 9:10 AM <2qdxy4rzwzuui...@potatochowder.com> wrote:
> >
> > On 2021-09-29 at 11:38:22 +1300,
> > dn via Python-list wrote:
> >
> > > For those of us who remember/can compute in binary, octal, hex, or
> > > decimal a
On Wed, Sep 29, 2021 at 11:59 AM dn via Python-list
wrote:
> If I hold up two fingers, am I insulting you, or asking for three of
> something?
>
A Roman soldier walked into a bar holding up two fingers. "Five beers, please"
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
On 29/09/2021 12.21, Chris Angelico wrote:
> On Wed, Sep 29, 2021 at 9:10 AM <2qdxy4rzwzuui...@potatochowder.com> wrote:
>>
>> On 2021-09-29 at 11:38:22 +1300,
>> dn via Python-list wrote:
>>
>>> For those of us who remember/can compute in binary, octal, hex, or
>>> decimal as-needed:
>>> Why do p
On Wed, Sep 29, 2021 at 10:06 AM Greg Ewing wrote:
>
> On 29/09/21 12:21 pm, Chris Angelico wrote:
> > to the extent that you automatically read 65 and 0x41 as the same
> > number.
>
> Am I too geeky for reading both of them as 'A'?
>
Not even slightly, and I did deliberately choose a printable A
On 29/09/21 12:21 pm, Chris Angelico wrote:
to the extent that you automatically read 65 and 0x41 as the same
number.
Am I too geeky for reading both of them as 'A'?
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, Sep 29, 2021 at 9:10 AM <2qdxy4rzwzuui...@potatochowder.com> wrote:
>
> On 2021-09-29 at 11:38:22 +1300,
> dn via Python-list wrote:
>
> > For those of us who remember/can compute in binary, octal, hex, or
> > decimal as-needed:
> > Why do programmers confuse All Hallows'/Halloween for Chr
On 2021-09-29 at 11:38:22 +1300,
dn via Python-list wrote:
> For those of us who remember/can compute in binary, octal, hex, or
> decimal as-needed:
> Why do programmers confuse All Hallows'/Halloween for Christmas Day?
That one is also very old. (Yes, I know the answer. No, I will not
spoil i
On 29/09/2021 10.50, Stefan Ram wrote:
> (For Python programmers who have watched "Game of Thrones".)
>
> |>>> class girl:
> |... pass
> |...
> |>>> girl = girl()
> |>>> print( girl.name )
> |Traceback (most recent call last):
&g
On Thu, Aug 8, 2019 at 1:33 PM Peter Otten <__pete...@web.de> wrote:
>
> Larry Martell wrote:
>
> >> Pyke has been ported to py3. Here is the code that returns the data I
> >> am trying to process:
> >>
> >> return map(self.doctor_answer, it)
> >>
> >> I don't see anything calling imap.
> >
> > I g
Larry Martell wrote:
>> Pyke has been ported to py3. Here is the code that returns the data I
>> am trying to process:
>>
>> return map(self.doctor_answer, it)
>>
>> I don't see anything calling imap.
>
> I grepped through the entire pyke code and imap is not in there.
Fire up the python3 interp
On Thu, Aug 8, 2019 at 12:34 PM Rhodri James wrote:
>
> On 08/08/2019 17:16, Larry Martell wrote:
> > On Thu, Aug 8, 2019 at 11:30 AM Peter Otten <__pete...@web.de> wrote:
> >>
> >> Larry Martell wrote:
> [snip]
> >>> But in py3 that fa
On 08/08/2019 17:16, Larry Martell wrote:
On Thu, Aug 8, 2019 at 11:30 AM Peter Otten <__pete...@web.de> wrote:
Larry Martell wrote:
[snip]
But in py3 that fails with: AttributeError: module 'itertools' has no
attribute 'imap'
In Python 3 the map() builtin is &
vasculopathy_engine =
> > > knowledge_engine.engine((rule_base_source_folder,
> > > (compiled_rule_base_folder)))
> > > with vasculopathy_engine.prove_goal(...) as presentationGen:
> > > for vals, plan in presentationGen:
> > >
> > > But
> > with vasculopathy_engine.prove_goal(...) as presentationGen:
> > for vals, plan in presentationGen:
> >
> > But in py3 that fails with: AttributeError: module 'itertools' has no
> > attribute 'imap'
>
> In Python 3 the map() builtin is &q
import knowledge_engine
vasculopathy_engine =
knowledge_engine.engine((rule_base_source_folder,
(compiled_rule_base_folder)))
with vasculopathy_engine.prove_goal(...) as presentationGen:
for vals, plan in presentationGen:
But in py3 that fails with: AttributeError: module 'itertools
;
> from pyke import knowledge_engine
> vasculopathy_engine =
> knowledge_engine.engine((rule_base_source_folder,
> (compiled_rule_base_folder)))
> with vasculopathy_engine.prove_goal(...) as presentationGen:
> for vals, plan in presentationGen:
>
> But in py3 that fails wi
=
knowledge_engine.engine((rule_base_source_folder,
(compiled_rule_base_folder)))
with vasculopathy_engine.prove_goal(...) as presentationGen:
for vals, plan in presentationGen:
But in py3 that fails with: AttributeError: module 'itertools' has no
attribute 'imap'
I tried conver
in full_dispatch_request
rv = self.dispatch_request()
File
"/Users/aruprakshit/projects/flask-apps/todo-app/venv/lib/python3.7/site-packages/flask/app.py",
line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/Users/aruprakshit/projects/flask-apps/todo-app/app.py", line 14, in
index
g.couch['users'] = document
File
"/Users/aruprakshit/projects/flask-apps/todo-app/venv/lib/python3.7/site-packages/werkzeug/local.py",
line 348, in __getattr__
return getattr(self._get_current_object(), name)
AttributeError: '_AppCtxGlobals' object has no attribute ‘couch'
Can anyone help me to fix this?
Thanks,
Arup Rakshit
a...@zeit.io
--
https://mail.python.org/mailman/listinfo/python-list
info.strip('||')
> print g_info
> print info
> fp.close()
> Error:
> AttributeError: 'Popen' object has no attribute 'read'
You have to specify the stream/file, e. g.
g_info.stdout.read()
but when want both stdout and stderr your rea
On Fri, Jan 4, 2019 at 10:16 PM wrote:
>
> On Thursday, January 3, 2019 at 9:40:43 PM UTC+1, Chris Angelico wrote:
> > On Fri, Jan 4, 2019 at 7:37 AM Mohan Mohta wrote:
> > > I am no expert in python but I found grep is lot faster in than the
> > > methods of reading files from python point
On Thursday, January 3, 2019 at 9:40:43 PM UTC+1, Chris Angelico wrote:
> On Fri, Jan 4, 2019 at 7:37 AM Mohan Mohta wrote:
> > I am no expert in python but I found grep is lot faster in than the methods
> > of reading files from python point me to direction if you know of
> > anything faste
On Fri, Jan 4, 2019 at 7:37 AM Mohan Mohta wrote:
> I am no expert in python but I found grep is lot faster in than the methods
> of reading files from python point me to direction if you know of
> anything faster I would appreciate it.
>
Try doing things the simple and easy way in Python,
On Thursday, January 3, 2019 at 1:49:31 PM UTC-6, Chris Angelico wrote:
> On Fri, Jan 4, 2019 at 6:46 AM Mohan Mohta wrote:
> >
> > Hello,
> > I am trying to grep the keyword (which I got from report_file ) from
> > report_file
> >
> > I tried multiple ways but am unable to get it to work.
>
> H
n-list
[mailto:python-list-bounces+david.raymond=tomtom@python.org] On Behalf Of
Mohan Mohta
Sent: Thursday, January 03, 2019 2:44 PM
To: python-list@python.org
Subject: subprocess : AttributeError: 'Popen' object has no attribute 'read'
Hello,
I am trying to grep the keyword (w
On Fri, Jan 4, 2019 at 6:46 AM Mohan Mohta wrote:
>
> Hello,
> I am trying to grep the keyword (which I got from report_file ) from
> report_file
>
> I tried multiple ways but am unable to get it to work.
How about, instead, you simply open the file and iterate through it,
looking for the keywor
g_info=subprocess.Popen('cat report_file| grep -i '+var1,
stdout=subprocess.PIPE,stderr=subprocess.PIPE,shell=True)
g_info=g_info.read()
g_info=g_info.strip()
info=g_info.strip('||')
print g_info
print info
fp.close()
Error:
AttributeError: &
ile "C:\Python27\lib\multiprocessing\pool.py", line 102, in worker
task = get()
File "C:\Python27\lib\site-packages\joblib\pool.py", line 362, in get
return recv()
AttributeError: 'module' object has no attribute 'easysearch'
how to solve this bug?
imp
>
>
> is a perfectly good pattern to use.
>
Thanks looks nice :)
>
>
> >
> >
> > I am a Linux user on Python 2.7
>
> Have you considered moving to Python 3?
>
Not yet , but Is there something that I need to consider in the current
context?
Regards,
Ganesh
--
https://mail.python.org/mailma
f not Z_block:
>> return False
>>
>> return Z_block
>>
>>
>>
>>
>> I have a problem with if and else satement i.e if IF codition fails the
>> code would exit with "AttributeError: 'list' object has no attribute
a problem with if and else satement i.e if IF codition fails the
> code would exit with "AttributeError: 'list' object has no attribute
> 'data' " error
>
> Any suggestion on how this can be handled better , Will ignoring the
> exceptions in try -except
data.data[0][0]
else:
Z_block = disk_object.data.data.di_data[0]
if not Z_block:
return False
return Z_block
I have a problem with if and else satement i.e if IF codition fails the
code would exit with "AttributeError: 'list' object has no attribu
n_feature_columns=deep_columns,
> dnn_hidden_units=[100, 50])
>
> ...
>
> urllib.urlretrieve(r"/mnt/c/Users/hello/Documents/data.csv",
> train_file.name)
> urllib.urlretrieve(r"/mnt/c/Users/hello/Documents/dataTest.csv",
> test_file.name)
>
>
a.csv", train_file.name)
urllib.urlretrieve(r"/mnt/c/Users/hello/Documents/dataTest.csv", test_file.name)
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'urlretrieve'
--
https://mail.python.org/mailman/listinfo/python-list
transmutes internal AttributeErrors
into RuntimeErrors.
'''
def wrapper(*a, **kw):
try:
return func(*a, **kw)
except AttributeError as e:
raise RuntimeError("inner function %s raised %s" % (func, e))
return property(wrapper)
I was debugging a cla
icense" for more information.
>>> a = None
>>> try:
... _ = a.value
... except AttributeError:
... print('OK')
...
OK
>>>
But not in my code:
def call_settings_dialog(self):
try:
_ = self.video.category
self.
a = None
>>> try:
... _ = a.value
... except AttributeError:
... print('OK')
...
OK
>>>
But not in my code:
def call_settings_dialog(self):
try:
_ = self.video.category
self.core.artelive.configure_downloading(self.video)
On 07/03/2016 16:38, Tim Golden wrote:
On 07/03/2016 16:25, Xiang Zhang wrote:
Hi,
I know I can get the attribute name in some way, but since I just
want the attribute name when an AttributeError caused by it raised, I
really don't want to inspect the string or introduce one more layer
On Tuesday, March 8, 2016 at 12:38:31 AM UTC+8, Tim Golden wrote:
> On 07/03/2016 16:25, Xiang Zhang wrote:
> > Hi,
> >
> > I know I can get the attribute name in some way, but since I just
> > want the attribute name when an AttributeError caused by it raised, I
>
On 07/03/2016 16:25, Xiang Zhang wrote:
> Hi,
>
> I know I can get the attribute name in some way, but since I just
> want the attribute name when an AttributeError caused by it raised, I
> really don't want to inspect the string or introduce one more layer
> over getatt
Hi,
I know I can get the attribute name in some way, but since I just want the
attribute name when an AttributeError caused by it raised, I really don't want
to inspect the string or introduce one more layer over getattr. I hope I can
get the attribute which causes the exception fro
On 03/07/2016 09:46 AM, ZhangXiang wrote:
In python3, when I write code like this:
try:
fields = [getattr(Product, field) for field in fields.split(',')]
except AttributeError as e:
raise HTTPError(...)
I want to raise a new type of error giving a string telling the
On Monday, March 7, 2016 at 5:49:48 PM UTC+8, Peter Otten wrote:
> ZhangXiang wrote:
>
> > In python3, when I write code like this:
> >
> > try:
> > fields = [getattr(Product, field) for field in fields.split(',')]
> > except AttributeError as e
ZhangXiang wrote:
> In python3, when I write code like this:
>
> try:
> fields = [getattr(Product, field) for field in fields.split(',')]
> except AttributeError as e:
> raise HTTPError(...)
>
> I want to raise a new type of error giving a string tel
In python3, when I write code like this:
try:
fields = [getattr(Product, field) for field in fields.split(',')]
except AttributeError as e:
raise HTTPError(...)
I want to raise a new type of error giving a string telling the user which
attribute is not valid. But I don't
dunric...@gmail.com wrote:
> Hello,
>
> bellow is a simple Python2 example of a class which defines __getattr__
> method and a property, where AttributeError exception is raised:
>
> from __future__ import print_function
>
> class MyClass(object):
>
Hello,
bellow is a simple Python2 example of a class which defines __getattr__ method
and a property, where AttributeError exception is raised:
from __future__ import print_function
class MyClass(object):
def __getattr__(self, name):
print('__getattr__ <<', nam
On Tue, Sep 1, 2015 at 1:32 PM, Rustom Mody wrote:
> On Tuesday, September 1, 2015 at 3:46:15 AM UTC+5:30, Laura Creighton wrote:
>> Can you make the effort to move your cursor to the bottom of
>> the mail you are replying to, before you start typing,
>> so that your reply comes after what was sai
On Tuesday, September 1, 2015 at 3:46:15 AM UTC+5:30, Laura Creighton wrote:
> Can you make the effort to move your cursor to the bottom of
> the mail you are replying to, before you start typing,
> so that your reply comes after what was said before, instead of
> first thing, and thus before what
In a message of Mon, 31 Aug 2015 17:01:07 -0400, Saran Ahluwalia writes:
>Laura,
>
>It does not appear to be the case. I actually had to actually unset the
>PYTHONPATH.
>
>Thanks for your suggestion.
>
>Sincerely,
>Saran
Are you and kbtyo the same person?
If deleting your PYTHONPATH fixed it, th
Laura,
It does not appear to be the case. I actually had to actually unset the
PYTHONPATH.
Thanks for your suggestion.
Sincerely,
Saran
On Mon, Aug 31, 2015 at 4:17 PM, Laura Creighton wrote:
> Check and see if you have a file in your working directory with the
> very same name as a module yo
Check and see if you have a file in your working directory with the
very same name as a module you are trying to import, or the_same_name.py
If so, change the name of that file to something else.
Laura
--
https://mail.python.org/mailman/listinfo/python-list
well. I am not sure
where to start modifying the path and fear that I will break my initial setup.
I welcome feedback on next steps.
---
AttributeErrorTraceback (most recent call last)
C:\Program
On 2015-08-24 06:49, 344276105 wrote:
Hi all,
I am a python learner. I encountered a problem when i was testing the
following code. What is strange is that if I replace the object name
with zhang, the program would be ok. And if I replace the
Person.population with self.__class__.population, it w
Hi all,
I am a python learner. I encountered a problem when i was testing the following
code. What is strange is that if I replace the object name with zhang, the
program would be ok. And if I replace the Person.population with
self.__class__.population, it will also be ok. So what is the matter
Ltc Hotspot writes:
> So calling people stupid and ignorant on the internet makes you sexual
> arousal and to masturbate with yourself
With that, you have worn out your welcome here. Please don't post here
again until you can refrain from puerile demeaning insults.
--
\ “Alternative e
On Thu, 13 Aug 2015 02:41:55 -0700, Ltc Hotspot wrote:
>>> How do I define X?
> What are the values of X & Y from the code as follows:
> # print time: ['From', 'stephen.marqu...@uct.ac.za', 'Sat', 'Jan', '5',
'09:14:16', '2008']
This is the data you need to look at.
X is the position in the p
On Thu, Aug 13, 2015 at 2:15 AM, Denis McMahon wrote:
> On Wed, 12 Aug 2015 16:46:32 -0700, Ltc Hotspot wrote:
>
>> How do I define X?
>>
> -
>> Traceback reads:
>>
>> 10 f = open(filename,'r')
>> 11 for
On 12/08/2015 22:04, Ltc Hotspot wrote:
So calling people stupid and ignorant on the internet makes you sexual
arousal and to masturbate with yourself
*plonk* - please follow suit everybody, it's quite clear that he has no
interest in bothering with any of the data we've all provided.
--
My
On Wed, 12 Aug 2015 16:46:32 -0700, Ltc Hotspot wrote:
> How do I define X?
>
-
> Traceback reads:
>
> 10 f = open(filename,'r')
> 11 for l in f:
> ---> 12 h = int(l.split()[X].split(':')[Y])
>
So calling people stupid and ignorant on the internet makes you sexual
arousal and to masturbate with yourself
On Wed, Aug 12, 2015 at 1:38 PM, Denis McMahon wrote:
> On Wed, 12 Aug 2015 12:05:37 -0700, Ltc Hotspot wrote:
>
>>>Have a look at assignment_10_2_v_06.py.
>
>> What should I look at ass
On 2015-08-13 00:46, Ltc Hotspot wrote:
>> How do I define the file name in order to remove the traceback?
>>
> At this point I think I'll just let you figure that out for yourself...
>
> --
> https://mail.python.org/mailman/listinfo/python-list
MRAB,
How do I define X?
>> How do I define the file name in order to remove the traceback?
>>
> At this point I think I'll just let you figure that out for yourself...
>
> --
> https://mail.python.org/mailman/listinfo/python-list
MRAB,
How do I define X?
--
On 2015-08-13 00:05, Ltc Hotspot wrote:
On Wed, Aug 12, 2015 at 3:35 PM, MRAB wrote:
> On 2015-08-12 22:16, Denis McMahon wrote:
> [snip]
>
>> c = [0 for i in range(24)]
>> f = open(filename,'r')
>> for l in f:
>> h = int(l.strip().split()[X].split(':')[Y])
>> c[h] = c[h] + 1
>> f.clos
On 8/12/2015 4:05 PM, Ltc Hotspot wrote:
On Wed, Aug 12, 2015 at 3:35 PM, MRAB wrote:
On 2015-08-12 22:16, Denis McMahon wrote:
[snip]
c = [0 for i in range(24)]
f = open(filename,'r')
for l in f:
h = int(l.strip().split()[X].split(':')[Y])
c[h] = c[h] + 1
f.close()
for i in range
On Wed, Aug 12, 2015 at 3:35 PM, MRAB wrote:
> On 2015-08-12 22:16, Denis McMahon wrote:
> [snip]
>
>> c = [0 for i in range(24)]
>> f = open(filename,'r')
>> for l in f:
>> h = int(l.strip().split()[X].split(':')[Y])
>> c[h] = c[h] + 1
>> f.close()
>> for i in range(24):
>> print '
On 2015-08-12 22:16, Denis McMahon wrote:
[snip]
c = [0 for i in range(24)]
f = open(filename,'r')
for l in f:
h = int(l.strip().split()[X].split(':')[Y])
c[h] = c[h] + 1
f.close()
for i in range(24):
print '{:02d} {}'.format(i, c[i])
There's no need to strip whitespace just bef
On 12/08/2015 23:02, Ltc Hotspot wrote:
FOR GOD'S SAKE WILL YOU PLEASE STOP TOP POSTING AND TRIM DOWN YOUR
REPLIES. WHAT GRADE DO YOU EXPECT, A Z-?
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
--
https://mail.python.
The problem here is that these are home work assignment and to code an
else word assignment would be in contradiction to the academic
curriculum.
Specifically, I want to deploy a quick and simply dic solution:
Revised code:
c = [0 for i in range(24)]
filename = raw_input("Enter file name: ")
f =
On 12/08/2015 22:32, Emile van Sebille wrote:
@ltc -- read this -- then re-read all the responses you've been given.
Repeat ad nauseam. Until you can understand and incorporate advice
given you're wasting your time and ours asking.
This question has been asked on *THREE* different Python mai
On 12/08/2015 22:15, Clayton Kirkwood wrote:
I'm thinking we are being played by a Turing type machine.
crk
Will you please stop top posting, how many times do people have to be
asked until the message gets through?
--
My fellow Pythonistas, ask not what our language can do for you, ask
wh
On 8/12/2015 1:38 PM, Denis McMahon wrote:
On Wed, 12 Aug 2015 12:05:37 -0700, Ltc Hotspot wrote:
Have a look at assignment_10_2_v_06.py.
What should I look at assignment_10_2_v_06.py.:
You shouldn't. You should instead approach your tutor and tell him you
are too stupid to learn computer
On Wednesday 12 August 2015 15:05:37 Ltc Hotspot wrote:
> >Have a look at assignment_10_2_v_06.py.
>
> What should I look at assignment_10_2_v_06.py.:
>
>
> handle = """From stephen.marqu...@uct.ac.za Sat Jan 5 09:14:16 2008
> From lo...@media.berkeley.edu Fri Jan 4 18:10:48 2008
> """.split("\n
On Wed, 12 Aug 2015 11:35:03 -0700, Ltc Hotspot wrote:
> How do I define time in the revised code ?
I'm guessing that you have a line of input like:
word word word timestamp word word word word
and that timestamp looks something like:
hh:mm:ss
Start of by defining a list with 24 elements all
on.org
> Subject: Re: AttributeError
>
> On Wed, 12 Aug 2015 12:05:37 -0700, Ltc Hotspot wrote:
>
> >>Have a look at assignment_10_2_v_06.py.
>
> > What should I look at assignment_10_2_v_06.py.:
>
> You shouldn't. You should instead approach your tutor and tell h
On 12/08/2015 21:28, Denis McMahon wrote:
On Wed, 12 Aug 2015 09:29:50 -0700, Ltc Hotspot wrote:
Using the attached file of a diagram as a frame, why is there an
attribute message?
Perhaps you should read the message. It's very clear.
Not to Ltc Hotspot. I'm unsure as to whether he's sim
On Wed, 12 Aug 2015 12:05:37 -0700, Ltc Hotspot wrote:
>>Have a look at assignment_10_2_v_06.py.
> What should I look at assignment_10_2_v_06.py.:
You shouldn't. You should instead approach your tutor and tell him you
are too stupid to learn computer programming[1], and can you please
transfer
On Wed, 12 Aug 2015 09:29:50 -0700, Ltc Hotspot wrote:
> Using the attached file of a diagram as a frame, why is there an
> attribute message?
Perhaps you should read the message. It's very clear.
--
Denis McMahon, denismfmcma...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-li
On 2015-08-12 20:05, Ltc Hotspot wrote:
>Have a look at assignment_10_2_v_06.py.
What should I look at assignment_10_2_v_06.py.:
How "time" is defined!
handle = """From stephen.marqu...@uct.ac.za Sat Jan 5 09:14:16 2008
>From lo...@media.berkeley.edu Fri Jan 4 18:10:48 2008
""".split("\n")
>Have a look at assignment_10_2_v_06.py.
What should I look at assignment_10_2_v_06.py.:
handle = """From stephen.marqu...@uct.ac.za Sat Jan 5 09:14:16 2008
>From lo...@media.berkeley.edu Fri Jan 4 18:10:48 2008
""".split("\n")
# Snippet file data: mbox-short.txt
count = dict()
#fname = raw_i
On 2015-08-12 19:35, Ltc Hotspot wrote:
Emile
How do I define time in the revised code ?
Have a look at assignment_10_2_v_06.py.
---
Traceback Message reads:
In [66]: %run assignment_10_2_v_07
NameError
Traceback (most
1 - 100 of 391 matches
Mail list logo