On 11/20/2017 10:18 AM, Steven D'Aprano wrote:
On Mon, Nov 20, 2017 at 08:18:41AM -0500, Stephen P. Molnar wrote:
I'm not really looking for someone to do the programming for me. I know
that the code works, because it did and produced the attached plot. I
just don't know why it stopped workin
On 11/20/2017 09:34 AM, William Ray Wing wrote:
On Nov 19, 2017, at 3:14 PM, Stephen P. Molnar
mailto:s.mol...@sbcglobal.net>> wrote:
On 11/19/2017 03:10 PM, William Ray Wing wrote:
On Nov 19, 2017, at 11:36 AM, Stephen P. Molnar
mailto:s.mol...@sbcglobal.net>> wrote:
I have written a sh
On 20/11/17 11:24, Steven D'Aprano wrote:
On Mon, Nov 20, 2017 at 10:26:50AM +, Alan Gauld via Tutor wrote:
Actually, pasting code etc is safer since the server removes
attachments. And while it is supposed to preserve plain text
attachments it will throw them away if it sees *anything*
tha
> On Nov 20, 2017, at 9:55 AM, Stephen P. Molnar wrote:
>
>
> On 11/20/2017 09:34 AM, William Ray Wing wrote:
[byte]
>> As an experiment, I took the code and moved it to my laptop (MacOS, running
>> 10.12.6 where there is a complete Anaconda installation that contains
>> self-consistent ve
> On Nov 19, 2017, at 3:14 PM, Stephen P. Molnar wrote:
>
>
> On 11/19/2017 03:10 PM, William Ray Wing wrote:
>>> On Nov 19, 2017, at 11:36 AM, Stephen P. Molnar
>>> wrote:
>>>
>>> I have written a short Python 3 script to plot three curves (one plot) of
>>> data from a FORTRAN program. In
On Mon, Nov 20, 2017 at 08:18:41AM -0500, Stephen P. Molnar wrote:
> I'm not really looking for someone to do the programming for me. I know
> that the code works, because it did and produced the attached plot. I
> just don't know why it stopped working. Actually, all of my programming
> expe
On 11/20/2017 06:24 AM, Steven D'Aprano wrote:
On Mon, Nov 20, 2017 at 10:26:50AM +, Alan Gauld via Tutor wrote:
Actually, pasting code etc is safer since the server removes
attachments. And while it is supposed to preserve plain text
attachments it will throw them away if it sees *anythin
On Mon, Nov 20, 2017 at 10:26:50AM +, Alan Gauld via Tutor wrote:
> Actually, pasting code etc is safer since the server removes
> attachments. And while it is supposed to preserve plain text
> attachments it will throw them away if it sees *anything*
> that it thinks looks like binary.
Let's
I'll echo everything Steve says except:
On 20/11/17 00:23, Steven D'Aprano wrote:
- Ensure your code and data are ATTACHED to the email as separate
files, not copy and pasted into the body. We should be able to
save the files directly to our own computers without the risk
of introducin
On Sun, Nov 19, 2017 at 03:14:11PM -0500, Stephen P. Molnar wrote:
[...]
> >>I have written a short Python 3 script to plot three curves (one plot) of
> >>data from a FORTRAN program.
[...]
Stephen, please remember that we are volunteers offering services for
free, not paid consultants. If you
On Sun, Nov 19, 2017 at 04:51:06PM -0500, William Ray Wing wrote:
> Unfortunately your mail reader/program has pasted it in as an RTF file
> and this makes it almost impossible to look at in a text editor or
> hand to the Python interpreter. What we see looks like the following
> (I’ve pasted
On 11/19/2017 09:36 AM, Stephen P. Molnar wrote:
> I have written a short Python 3 script to plot three curves (one plot)
> of data from a FORTRAN program. Initially the code worked and produced
> the plot which is attached. I have also attached the code and the input
> data,
>
> In all candor,
On 19/11/17 20:14, Stephen P. Molnar wrote:
In all candor, I don't have the faintest idea as to whst the problem
(or problens) might be and would greatly appreciate a pointer towards
the solution.
You really need to post the entire error message not just the summary line.
Especially since yo
On 11/19/2017 03:10 PM, William Ray Wing wrote:
On Nov 19, 2017, at 11:36 AM, Stephen P. Molnar wrote:
I have written a short Python 3 script to plot three curves (one plot) of data
from a FORTRAN program. Initially the code worked and produced the plot which
is attached. I have also attac
> On Nov 19, 2017, at 3:14 PM, Stephen P. Molnar wrote:
>
>
> On 11/19/2017 03:10 PM, William Ray Wing wrote:
>>> On Nov 19, 2017, at 11:36 AM, Stephen P. Molnar
>>> wrote:
>>>
>>> I have written a short Python 3 script to plot three curves (one plot) of
>>> data from a FORTRAN program. In
> On Nov 19, 2017, at 11:36 AM, Stephen P. Molnar
> wrote:
>
> I have written a short Python 3 script to plot three curves (one plot) of
> data from a FORTRAN program. Initially the code worked and produced the plot
> which is attached. I have also attached the code and the input data,
>
I have written a short Python 3 script to plot three curves (one plot)
of data from a FORTRAN program. Initially the code worked and produced
the plot which is attached. I have also attached the code and the input
data,
In all candor, I don't have the faintest idea as to whst the problem (or
On 18/08/15 02:04, Steven D'Aprano wrote:
Has anyone else answered this question? I haven't seen a response, but
perhaps I missed it.
There have been several further mails - some off list.
The upshot is that he has submitted what he believes is
a working solution to his assignment.
--
Alan G
Has anyone else answered this question? I haven't seen a response, but
perhaps I missed it.
More comments below.
On Tue, Aug 11, 2015 at 09:53:03PM -0700, Ltc Hotspot wrote:
> Hi Steven,
>
> Message heard loud and clear:
>
> Question: What sorted function should I write to produce the desired
Hi Steven,
Message heard loud and clear:
Question: What sorted function should I write to produce the desired
output, below:
Desired output:
04 3
06 1
07 1
09 2
10 3
11 6
14 1
15 2
16 4
17 2
18 1
19 1
Latest revised code:
count = dict()
fname = raw_input("Enter file name: ")#
handle = open (f
Steven,
Visit the URL links below to view the latest revised code:
Output: 09:14:16
Syntax message: val is not defined
Raw data code, available at http://tinyurl.com/ob89r9p
Embedded data code, available at http://tinyurl.com/qhm4ppq
Visualization URL link, available at http://tinyurl.com/ozzmff
On Tue, Aug 11, 2015 at 07:38:21PM -0700, Ltc Hotspot wrote:
> Steven,
>
> Visit the URL links below to view the latest revised code:
I don't think so. I don't have access to the web right now, but I do
have access to email. And even if I did, I'm lazy and wouldn't follow
links and then have to
On 12/08/2015 03:01, Steven D'Aprano wrote:
On Tue, Aug 11, 2015 at 04:24:39PM -0700, Ltc Hotspot wrote:
Hi Everyone,
Why is there an AttributeError, line 12, below : 'tuple' object has no
attribute 'sort'?
Haven't I see this exact same question, complete with solutions, on the
python-list ma
On Tue, Aug 11, 2015 at 04:24:39PM -0700, Ltc Hotspot wrote:
> Hi Everyone,
>
> Why is there an AttributeError, line 12, below : 'tuple' object has no
> attribute 'sort'?
Haven't I see this exact same question, complete with solutions, on the
python-list mailing list?
The answer found there is
On 12/08/15 00:24, Ltc Hotspot wrote:
Why is there an AttributeError, line 12, below : 'tuple' object has no
attribute 'sort'?
Having answered that in my last email I just
noticed another problem...
count = dict()
fname = raw_input("Enter file name: ")#
handle = open (fname, 'r')#
for line i
On 12/08/15 00:24, Ltc Hotspot wrote:
Why is there an AttributeError, line 12, below : 'tuple' object has no
attribute 'sort'?
Because a tuple has no attribute sort.
A tuple is immutable - you can't change it. Therefore,
you can't sort it.
You can however use the sorted() function on it to
re
Hi Everyone,
Why is there an AttributeError, line 12, below : 'tuple' object has no
attribute 'sort'?
count = dict()
fname = raw_input("Enter file name: ")#
handle = open (fname, 'r')#
for line in handle:
if line.startswith("From "):
address = line.split()[5]
line = line.rstri
> Please don't top post on this list. Please don't try telling me what to
> do or not do. Thanks in anticipation.
Oh the irony.
Ramit
This email is confidential and subject to important disclaimers and conditions
including on offers for the purchase or sale of securities, accuracy and
compl
On 12/06/2014 17:51, jason sam wrote:
The last question i hadn't asked yet..and if u are not interested in
answering the question then also refrain from commenting please!
On Thu, Jun 12, 2014 at 9:47 PM, Mark Lawrence mailto:breamore...@yahoo.co.uk>> wrote:
On 12/06/2014 05:51, jason sam w
jason sam Wrote in message:
>
(Please use text mail, as html gets distorted and/or jumbled.
Also, many people here cannot see attachments, so you should
paste them into your text message. And be sure to put a marker
before each file indicating it's original filename)
self.update_grid()
F
The last question i hadn't asked yet..and if u are not interested in
answering the question then also refrain from commenting please!
On Thu, Jun 12, 2014 at 9:47 PM, Mark Lawrence
wrote:
> On 12/06/2014 05:51, jason sam wrote:
>
>> Hi All,
>> I am new to wxPython.I have made a simple GUI that
Thnx for all the suggestions...Now i have made amendments to my program and
its working now...but there is a new problem nowI am now calling a
python script generated by GNU Radio Companion(for those who know about GRC
will understand my question better)...when i press the execute button i get
On 12 June 2014 13:11, Steven D'Aprano wrote:
> On Thu, Jun 12, 2014 at 11:41:58AM +0100, Walter Prins wrote:
>
>> (What made you think that modules have a magic method
>> start() that causes them to run?) You should probably learn more
>> about Python itself, name binding, module objects etc.
>
On Thu, Jun 12, 2014 at 05:47:23PM +0100, Mark Lawrence wrote:
> I suspect that you'll get better answers on the wxpython list,
> especially consdiering that you asked there all of two minutes before
> asking here.
This is not aimed specifically at Mark.
Can we please stop chastising people fo
On 12/06/2014 05:51, jason sam wrote:
Hi All,
I am new to wxPython.I have made a simple GUI that contains a button and
by pressing that button i am calling another .py
file(top_block.py)...But i am getting error using the command:
top_block.start()
The error is:
AttributeError: 'module' object
On 12/06/14 05:51, jason sam wrote:
Hi All,
I am new to wxPython.I have made a simple GUI that contains a button and
by pressing that button i am calling another .py
file(top_block.py)...
No you are not.
You are importing it and then trying to access something called start
which doesn't exist.
On Thu, Jun 12, 2014 at 11:41:58AM +0100, Walter Prins wrote:
> (What made you think that modules have a magic method
> start() that causes them to run?) You should probably learn more
> about Python itself, name binding, module objects etc.
That's what this list is for!
--
Steven
Hi,
On 12 June 2014 05:51, jason sam wrote:
>
> Hi All,
> I am new to wxPython.I have made a simple GUI that contains a button and by
> pressing that button i am calling another .py file(top_block.py)...But i am
> getting error using the command:
>
> top_block.start()
>
> The error is:
>
> Attr
Hi All,
I am new to wxPython.I have made a simple GUI that contains a button and by
pressing that button i am calling another .py file(top_block.py)...But i am
getting error using the command:
top_block.start()
The error is:
AttributeError: 'module' object has no attribute 'start'
The code is a
Whenever I try to type 'python' into the cmd prompt, it always gives me
this error:
Traceback (most recent call last):
File "C:\Python27\lib\site.py", line 62, in
import os
File "C:\Python27\lib\os.py", line 398, in
import UserDict
File "C:\Python27\lib\UserDict.py", line 83, in
Read() does return a string. I guess the better question would be... Are you
using read? 'cause in the example you sent you used readlines() which returns a
list of lines.
-
Sent from a mobile device with a bad e-mail client.
-
On Dec 21,
"Ben Ganzfried" wrote
1) Doesn't the read() file object method return the specified
characters from the file as a string?
Yes
2) If #1 is correct, then why is my variable "source" being viewed
as
a list as opposed to a string?
You are not using read(), you are using readlines()
which ret
Hey,
I keep getting the error above and unfortunately browsing through
google and finding similar responses has not been fruitful for me. My
code is below and I have marked off the location of the problem in my
code. I'm wondering the following:
1) Doesn't the read() file object method return t
Garrett Hartshaw wrote:
> The program I am writing gives the following error message when run.
>
> Traceback (most recent call last):
> File "./space.py", line 177, in
> main()
> File "./space.py", line 173, in main
> player = Ship("space/models/fighter.3ds",
> "space/models/realist
Garrett Hartshaw wrote:
The program I am writing gives the following error message when run.
Traceback (most recent call last):
File "./space.py", line 177, in
main()
File "./space.py", line 173, in main
player = Ship("space/models/fighter.3ds",
"space/models/realistic.bmp", Quatern
The program I am writing gives the following error message when run.
Traceback (most recent call last):
File "./space.py", line 177, in
main()
File "./space.py", line 173, in main
player = Ship("space/models/fighter.3ds",
"space/models/realistic.bmp", Quaternion(), Vector(0, 0, -30),
On 20/06/07, Norman Khine <[EMAIL PROTECTED]> wrote:
> My question is how to get all the words in the string to start with
> capital letter?
Hmm, well the title() function is a new one to me :-)
More generally, if we have raw = 'one two three', then I would have
done it using raw.split(). i.e.
thanks, it is as easy as that ;)
Adam A. Zajac wrote:
> On Wed, 20 Jun 2007 12:32:53 +0200
>
> Norman Khine <[EMAIL PROTECTED]> wrote:
>
>> My question is how to get all the words in the string to start with
>> capital letter?
> title() should do it
>
a = "hello world"
a.title()
On Wed, 20 Jun 2007 12:32:53 +0200
Norman Khine <[EMAIL PROTECTED]> wrote:
> My question is how to get all the words in the string to start with
> capital letter?
title() should do it
>>>a = "hello world"
>>>a.title()
>>>'Hello World'
___
Tutor maillis
Hello,
I would like to capitalize each word from an input form.
The problem is that the input form can be added as:
"HELLO world"
"hello world"
"HELLO WORLD"
etc..
If I do this:
>>> string = "HELLO world"
>>> print string.capitalize()
Hello world
>>>
only the first word gets capitalized.
My
On Nov 27, 2006, at 1:55 PM, Kent Johnson wrote:
> Keith Troell wrote:
>> I'm a rank beginner. I am running Python 2.3.5 on the Terminal of
>> Mac OSX.
>> The Tutorial (5.1) mentions list.copy as a list method. When I run
>
> Are you sure? I don't see it here:
> http://www.python.org/doc/2.3.5
Keith Troell wrote:
> I'm a rank beginner. I am running Python 2.3.5 on the Terminal of Mac
> OSX.
>
> The Tutorial (5.1) mentions list.copy as a list method. When I run
Are you sure? I don't see it here:
http://www.python.org/doc/2.3.5/tut/node7.html#SECTION00710
>
> scores =
I'm a rank beginner. I am running Python 2.3.5 on the Terminal of Mac
OSX.
The Tutorial (5.1) mentions list.copy as a list method. When I run
scores = [1, 2, 3]
copy = scores.copy ()
I get: AttributeError: 'list' object has no attribute 'copy'
However, I am able to use .copy for dictionaries
> AttributeError: ChatServer instance has no attribute 'decriptors'
Read the error carefully - a typo maybe?
Alan G.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
On 27/01/06, Bob Hinkle <[EMAIL PROTECTED]> wrote:
> While following a tutorial on how to create a simple chat server I stumbled
> upon this problem:
> AttributeError: ChatServer instance has no attribute 'decriptors'
Hi Bob,
Attributes are things like methods or variables that are "attached" to
While following a tutorial on how to create a simple chat server I stumbled upon this problem:
AttributeError: ChatServer instance has no attribute 'decriptors'
here is my code:
#...
import socket
import select
class
> You are welcome. This time I would like to help you but the code is
> incomplete
> (import error for Image) and I have never used urllib2 so I don't really know
> what to
> do.
> Again, try to debug it with pdb. Place "import pdb; pdb.set_trace()" where
> you want
> the break point and see
Joseph Quigley wrote:
> Ok, new version (sorry to bug you).
> This time I've edited the program so that you can only download todays
> (it won't work for any other date). Now I can connect to the server but
> it sticks on "Downloading image!"
>
> Thanks for your prevoius help.
> Joe
You are w
Ok, new version (sorry to bug you).
This time I've edited the program so that you can only download todays
(it won't work for any other date). Now I can connect to the server but
it sticks on "Downloading image!"
Thanks for your prevoius help.
Joe
#! /usr/bin/env python
###
Javier wrote:
> Class Data has a class attribute, 'f', defined as an empty string. Check if
> Data.f is initialized before calling getImg.
> Also, why initialize with an empty str? Put a None in there or don't define
> the attribute at all.
> A tip: in line 126 there is a print Data.f. This
Joseph Quigley wrote:
> Well, I'm back to coding more on my comic downloader and viewer and I
> keep getting this error:
>
> Traceback (most recent call last):
> File "F:\Gacor\getgarf.py", line 244, in ?
> getImg(Data.todayStrip)
> File "F:\Gacor\getgarf.py", line 127, in getImg
> Da
Well, I'm back to coding more on my comic downloader and viewer and I keep getting this error:
Traceback (most recent call last):
File "F:\Gacor\getgarf.py", line 244, in ?
getImg(Data.todayStrip)
File "F:\Gacor\getgarf.py", line 127, in getImg
Data.f.geturl()
AttributeError: 'str' obj
Juan Shen wrote:
Marc Gartler wrote:
Hi everybody,
Prior to this chunk of code 'glass' has been chosen from a list of
colors via user input, and I now want to have that choice connect to
one of several possible classes:
def glass_type(glasstype):
if glasstype == 'Red':
myglass = RedG
Marc Gartler wrote:
Hi everybody,
Prior to this chunk of code 'glass' has been chosen from a list of
colors via user input, and I now want to have that choice connect to
one of several possible classes:
def glass_type(glasstype):
if glasstype == 'Red':
myglass = RedGlassCost()
el
That did it. Thanks, Max.
On Wednesday, December 15, 2004, at 09:28 PM, Max Noel wrote:
On Dec 16, 2004, at 04:20, Max Noel wrote:
def glass_type(glasstype):
if glasstype == 'Red':
myglass = RedGlassCost()
elif glasstype == 'Blue':
myglass = BlueGla
# --superclass--
class FrameCost:
def __init__(self):
self.width = int(0)
self.length = int(0)
# Calculate cost per square foot
def Cost_per_sqft(self, cost):
return (((self.width) * (self.length) / 144.00) * (cost))
# Calculate cost per linear foot
def Cost_per_ft(self, cost):
r
On Dec 16, 2004, at 04:20, Max Noel wrote:
def glass_type(glasstype):
if glasstype == 'Red':
myglass = RedGlassCost()
elif glasstype == 'Blue':
myglass = BlueGlassCost()
elif glasstype == 'Yellow':
myglass = YellowGlassCost()
On Dec 16, 2004, at 03:56, Marc Gartler wrote:
Hi everybody,
Prior to this chunk of code 'glass' has been chosen from a list of
colors via user input, and I now want to have that choice connect to
one of several possible classes:
def glass_type(glasstype):
if glasstype == 'Red':
On Wed, 15 Dec 2004, Marc Gartler wrote:
> Hi everybody,
>
> Prior to this chunk of code 'glass' has been chosen from a list of
> colors via user input, and I now want to have that choice connect to
> one of several possible classes:
>
> def glass_type(glasstype):
> if glasstype == 'Red'
Hi everybody,
Prior to this chunk of code 'glass' has been chosen from a list of
colors via user input, and I now want to have that choice connect to
one of several possible classes:
def glass_type(glasstype):
if glasstype == 'Red':
myglass = RedGlassCost()
elif g
70 matches
Mail list logo