Hi, I am working to forecast the temperatures for the next 5 days using an
API and a for loop. I would like write the output of this loop to a csv in
this format::
Columns: City, min1, max1, min2, max2,min3,max3,min4,max4,min5,max5
data: Athens,Greece 25.4,26.7etc.
Nan
Success!
Thank you, Danny!
Mission accomplished.
-Brandon
Sent from my iPhone
On Jul 23, 2017, at 5:44 PM, Danny Yoo wrote:
>> 2. I’m trying to locate the directory path to where Python3 is located on
>> my system, but when I enter
>>the following command:
&
on3.
I need the location in order to setup my Text Editor to execute Python3
commands.
Thank you in advance.
Brandon Anderson
(510) 468-0154
brandonander...@icloud.com
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription
ace('rdfile:',"",1)
> wrt1 = wrt.replace('wrtfile:',"",1)
import os.path
import sys
for x in [(rd1, 'Source file', 'rdfile'),
(wrt1, 'Destination file', 'wrtfile')]:
if not os.path.isabs(x[0]):
print
ks, but if you take a few minutes to configure it then it
sucks considerably less. Add clink to make it suck a bit less still.
HTH.
Regards,
--
Brandon McCaig
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bambams.ca/>
perl -E '$_=q{V zrna gur orfg jvgu
>
> This is what was also confusing as well. I assumed that python stored
> objects rather than simply assigning them.
>
On Tue, May 5, 2015 at 4:48 AM, Alan Gauld
wrote:
> On 05/05/15 05:29, Brandon D wrote:
>
>> Hello tutors,
>>
>> I'm having trou
Thanks Steven. I was just confused on the execution of when Python
destroys objects that are no long bound or referenced.
On Tue, May 5, 2015 at 2:00 PM, Steven D'Aprano wrote:
> On Tue, May 05, 2015 at 12:29:59AM -0400, Brandon D wrote:
> > Hello tutors,
> >
&g
Hello tutors,
I'm having trouble understanding, as well as visualizing, how object
references work in the following situation. For demonstration purposes I
will keep it at the most rudimentary level:
x = 10
x = x ** x
If my knowledge serves me correctly, Python destroys the value once
reassign
On Fri, Jan 2, 2015 at 6:08 AM, Ben Finney
wrote:
> Does it help you to understand if I clarify that a tuple is one value?
> That a list is one value? That a dict is one value?
>
Well I knew that those data structures represent one value that can hold
"x" amount of objects, but what I didn't rea
On Fri, Jan 2, 2015 at 6:27 AM, Dave Angel wrote:
Ben's description is very good. But I think the main thing you're missing
> is that a tuple is created by the comma, not by parentheses. In some
> contexts, parentheses need to be added to make it non-ambiguous, since
> comma is overloaded.
Th
On Fri, Jan 2, 2015 at 6:34 AM, Steven D'Aprano wrote:
> The thing to remember is that *commas*, not parentheses, are used for
> making tuples. The round brackets are just for grouping.
>
That's what I was confused about. I didn't realize commas defined tuples,
not parentheses. Is this the cas
I know there is are easier ways to assign multiple objects to a variable,
but why, does the following code work? Why does it return a tuple versus a
list? I know it has something to do with the semi-colon, but I didn't know
it wouldn't raise an error.
greetings = "hello,", "what's", "your", "na
a tendency to over analyze everything, and with
> programming - as we all know - there are a million ways to accomplish the
> same task.
>
On Fri, Dec 19, 2014 at 8:06 AM, Dave Angel wrote:
> On 12/18/2014 09:09 PM, Brandon Dorsey wrote:
>
>> Hello All,
>>
>> Pro
Hello All,
Programming has always been a passion of mine, however, I'm frequently
frustrated at
simple fact that I've been learning python for 8 months, and I have yet to
start, and finish, a simple
project. I find difficult to not only visualize the execution, but to
figure out when and where
Hi,
I'm new to programming and I've tried to learn in the past but I gave up
easily. I tried learning Java but I feel that Python would be the best
route to take since it's easier to learn and then I'll move on to learning
Java. I want to learn Python 3.x not Python 2.
My goal(s) are:
Learn Python
he
mailing list information and rules.
Brandon
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
You get the error because you call path1pt1() before it is defined. Define
your path1pt1() method at the top of your code before simpstart().
Brandon
On Fri, Feb 1, 2013 at 5:47 PM, Jack Little wrote:
> I get this error
>
> Traceback (most recent call last):
> File "C:\U
s I am really trying hard to become a passable Python
programmer. I've been working at it for 6 month now, and I don't know any
other languages:
http://www.cse.msu.edu/~cse231/PracticeOfComputingUsingPython/02_Control/LatinSquares/Project03.pdf
Thank you,
Brandon
On Mon, Dec 31, 20
loop work by doing something like this:
for i in firstrow:
print i, i+2
but that obviously is not a solution either. Any ideas?
Thanks,
Brandon
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail
Sorry, I am just so confused and aggravated as to why this won't work - why
doesn't it print out the whole list? :
number = raw_input('Enter a 7-unit number: ')
for i in number:
count = []
count.append(i)
print count
>>> Enter a 7-unit number: 7895329
t += 1
else:
count = 0
print count
Thanks,
Brandon
--
*Brandon Merritt**
(707) 481-1744*
*
*
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
written like this?:
class HumanBeing:
def makeName(self, name):
* name = self.name*
*
*
2. Why use a class in the first place? What is the purpose of constructing
a class instead of just writing a program with a bunch of functions?
Thanks,
Brandon
to remove characters from
the current line.
http://pytut.infogami.com/node4.html
konsole somehow disabled command line editing.
On Fri, Mar 9, 2012 at 3:49 AM, Alan Gauld wrote:
> On 09/03/12 02:07, brandon w wrote:
>
> I am able to up-arrow to get the last typed command using rxvt bu
I am using fluxbox an a window manager not KDE. That may have something to
do with it.
I will ask in another forum.
Running: >>> import readline in both terminals succeded.
Thank you for your help.
Brandon
On Thu, Mar 8, 2012 at 9:58 PM, Steven D'Aprano wrote:
> On Thu, M
the up-arrow in all terminals so I don't have to type as much.
Python os: 2.6.6
OS: Slackware 13.37
Brandon
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
help!
Now I'll have to see if I can get the same thing working on a Windows
machine.
Brandon
On Fri, Feb 17, 2012 at 2:00 PM, Alan Gauld wrote:
> On 17/02/12 11:38, brandon w wrote:
>
>> I made a timer that counts down from five minutes. This code runs fine
>> but
seconds = 59
five_minutes += 1
time.sleep(1)
countd()
Brandon
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
How do I capture a key like the bar or the key? Is there
anything that comes in the default Python2.6.6 installation?
I have found something called "termios" doing a search. Should I just use
Pygame? I would like it to go cross platform if possible
That was my problem. I had the "insert" function. I don't know why I did not
see that before or why I even put that in there.
Thank you for your help once again.
On Tue, Sep 27, 2011 at 6:43 AM, Alan Gauld wrote:
> On 27/09/11 02:32, brandon w wrote:
>
>> The fields
at 4:03 AM, Alan Gauld wrote:
> On 26/09/11 03:25, brandon w wrote:
>
>> This code calculates money. The problem is that in the first field after
>> the mouse enters a second time updates itself with the value from the
>> last field. I don't want it to do that.
>>
This code calculates money. The problem is that in the first field after the
mouse enters a second time updates itself with the value from the last
field. I don't want it to do that.
I think that the problem is in the "callback" method.
#!/usr/bin/python
from Tkinter import *
root = Tk()
root.t
On 09/10/2011 10:16 AM, Wayne Werner wrote:
On Thu, Sep 8, 2011 at 9:31 PM, brandon w <mailto:thisisonlyat...@gmx.com>> wrote:
How do you display text in a Entry field and have it disappear
when a person clicks in it?
To get text into this box the person must first
de
How do you display text in a Entry field and have it disappear when a
person clicks in it?
This is what I have so far:
from Tkinter import *
root = Tk()
root.title("Password Changer")
root.geometry("300x300+600+250")
label1 = Label(root, text="Enter you password: ")
label1.grid(sticky=W, row
On 08/20/2011 07:11 PM, Alan Gauld wrote:
On 20/08/11 20:12, brandon w wrote:
I worked on this for a long time. I did many searches to fix the many
error messages I was getting and I finally got this to work. I would now
just like to have the text disappear when a person clicks in the box to
I worked on this for a long time. I did many searches to fix the many
error messages I was getting and I finally got this to work. I would now
just like to have the text disappear when a person clicks in the box to
type something. How can I do that?
(This is just a sample of the whole program.
On 08/17/2011 04:02 AM, Alan Gauld wrote:
On 17/08/11 04:05, brandon w wrote:
I am trying to print in the same place to make a clock in a tkinter
window. I will loop the following code to update the time.
This is not a tkinter program so its completely irrelevant to your
stated aim. In tkinter
I am trying to print in the same place to make a clock in a tkinter
window. I will loop the following code to update the time.
This seems to work but it is not printing in the same place:
#!/usr/bin/python
#Python 2.6.6
import time
for t in range(5):
digits = time.strftime('%H:%M:%S')
On 08/14/2011 11:14 AM, Alan Gauld wrote:
On 14/08/11 14:07, Wayne Werner wrote:
Of course I personally I usually do
import Tkinter as tk
Which means I only have to type 3 extra characters, but it removes any
ambiguity - tk.Something had to come from Tkinter
Thats exactly what I tend to do n
On 08/14/2011 03:10 AM, Robert Sjoblom wrote:
I have tried to follow the tutorial I found here:
Python 2.7 Tutorial
http://www.youtube.com/watch?v=uh6AdDX7K7U
This is what I have done so far:
#!/usr/bin/python
from Tkinter import *
import Tkinter.MessageBox
I figured I might as well, g
On 08/14/2011 02:29 AM, Peter Otten wrote:
brandon w wrote:
On 08/13/2011 04:49 PM, Peter Otten wrote:
How do I find the modules in Tkinter?
The simplest approach is probably to explore your file system:
Step 1: where's Tkinter?
$ python -c 'import T
On 08/14/2011 09:04 AM, je.rees e-mail wrote:
I have made a small program but I would like to know how to write or.
There is multiple choice answer.
Good=raw_input("Good to hear")
ok=raw_input("Good good")
Bad=raw_input("Oh dear")
I would only like the person using the program to be able to pick
Here is the code:
#!/usr/bin/python
from Tkinter import *
from tkMessageBox import *
def iClicked():
radioValue = relStatus.get()
tkMessageBox.showinfo("You clicked", radioValue)
return
def chLabel():
name = "Thank you for clicking me. " + your_name.get()
labelText.set(name
On 08/13/2011 04:49 PM, Peter Otten wrote:
brandon w wrote:
I have tried to follow the tutorial I found here:
Python 2.7 Tutorial
http://www.youtube.com/watch?v=uh6AdDX7K7U
This is what I have done so far:
#!/usr/bin/python
from Tkinter import *
import Tkinter.MessageBox
myapp = Tk
On 08/13/2011 05:56 PM, Jon wrote:
Could you link me to some beginners tutorials/idle codes thank you.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Check out so
On 08/13/2011 04:49 PM, Peter Otten wrote:
`python -c 'import Tkinter, os; print
os.path.dirname(Tkinter.__file__)'`
Thanks dude. That is some really useful information. That will help me
for future coding.
I found that I needed to use "from tkMessageBox import *" to get it to work.
___
I have tried to follow the tutorial I found here:
Python 2.7 Tutorial
http://www.youtube.com/watch?v=uh6AdDX7K7U
This is what I have done so far:
#!/usr/bin/python
from Tkinter import *
import Tkinter.MessageBox
myapp = Tk()
myapp.title("This is the gui title")
myapp.geometry("500x500+600+600
On 08/02/2011 09:25 PM, Steven D'Aprano wrote:
brandon w wrote:
I have two questions:
1) When should I use "def __init__(self):" when I create a class?
Whenever you need something to happen when you create an instance.
2) Would these two classes have the same effect?
On 08/02/2011 09:09 PM, Brett Ritter wrote:
On Tue, Aug 2, 2011 at 8:47 PM, brandon w wrote:
1) When should I use "def __init__(self):" when I create a class?
When you have any initialization to do. (in other words, when you
want class instantiation to do more than simpl
I have two questions:
1) When should I use "def __init__(self):" when I create a class?
2) Would these two classes have the same effect?
class Name:
def __init__(self):
man = Marcus
woman = Jasmine
return self.man, self.woman
class Na
On 07/24/2011 07:59 PM, Steven D'Aprano wrote:
brandon w wrote:
Thank you. I understand that this ( x = 1+2 ) assigns a variable to
"x" and will not print in Idle, but how would I get the 'class' that
I created to run from the script like it does in Idle? Will I
utput. I have to add print. to get any output like this:
#!/usr/bin/python
class ExClass:
eyes = "brown"
age = 99
height = '5\'11'
def thisMethod(self):
return 'This method works.'
x = ExClass()
x.eyes
x.age
x.height
x.thisMethod()
Hi
I am running Linux with Python 2.6.6. I have done lists, tuples,
dictionaries, etc. Now I want to move on to creating a "class". I keep
getting an error for everything I try. Here is the error: *
NameError: name 'MyClass' is not defined*
I had originally tried to create my own class by wat
I'm trying to write a program they may involve
needing to divide 1 by another number. In the program below when I use 4 for the
diameter of the bore, and 1 for the diameter of the rod, and 60 for the PSI,
the force should be 706.8 .
However the program keeps giving me 0 for
"rodarea". If I
53 matches
Mail list logo