On 02/18/2013 02:01 PM, Matthew Ngaha wrote:
i sort of heard about a stack its a C/C++ thing i think?
A stack is fundamental to modern programming languages. The only two
machines I've used that didn't have a stack implemented at the machine
level were the CDC 6000 series, and the IB
On 02/19/2013 07:36 AM, Ghadir Ghasemi wrote:
Hi guys, Iam halfway through my vending machine program that I started earlier.
I ran into a problem. When the user inserts some money, The money variable is
not stored for until the user buys an item. So what happens is when the users
inserts some
On 02/21/2013 07:16 AM, Mara Kelly wrote:
Hi everyone, Here is the question I was given...Consider the (20x20) array of numbers
here(I wrote all of the numbers in my program). Lets say this represents a matrix A of
distances (in kilometers) between cities. Note that A is symmetric A(i,j) = A(j,
On 02/22/2013 08:22 PM, Jim Byrnes wrote:
Thanks for giving me so many options to use in the future. When reading
I completely blew by the single quote on a single line part. The db is
sqlite3 and it seems happy with ''' strings.
FWIW, there is absolutely no difference between a stri
On 02/22/2013 09:26 PM, Robert Sjoblom wrote:
I would like to validate data attributes before the object is instantiated
or any changes thereafter. For example, following is a simple Person class
with name and age attributes. [snip] Following is my
example code:
class Person(object):
def __
On 02/22/2013 09:40 PM, Don Jennings wrote:
On Feb 22, 2013, at 9:12 PM, tutor-requ...@python.org wrote:
Message: 5
Date: Fri, 22 Feb 2013 21:03:00 -0500
From: Dave Angel
Did you read the beginning of that digest? It said to make sure and
rename the subect line. Tutor Digest isn
On 02/23/2013 09:40 PM, Matthew Johnson wrote:
For the sake of those who finds this thread -- the date / value pairs
can be printed by the following:
import fred
fred.key(fredKey)
gnpObvs = fred.observations('GNPCA')
for i in range(1, len(gnpObvs['observations']['observation'])):
print g
Both your later remarks are top-posted, ruining the sequence of who
posted what.
On 02/24/2013 06:57 AM, Sudo Nohup wrote:
Thanks for your help.
I just found a webpage used for me:
http://stackoverflow.com/questions/10017147/python-replace-characters-in-string
That page provides some other so
On 02/26/2013 09:23 AM, Jack Little wrote:
How would I go from one def statement to another? I am developing a text based
rpg.
Sent from my iPod
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.
On 03/01/2013 08:07 AM, Vijay Kumar R wrote:
I was using python for some application which used to create directories and
also to run some exes using the os.system command from a program.py file
which was working fine. For some reasons I got my system formatted and got
the windows 7 installed.
On 03/01/2013 02:48 PM, Huperetes wrote:
I am getting the following for my installation.
Why is this happening, and how do I get it to work properly (returning
element 0 - n, versus n - 0)?
Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)]
on win32
Type "help", "copyrigh
On 03/03/2013 09:24 PM, DoanVietTrungAtGmail wrote:
Dear tutors
I am checking out csv as a possible data structure for my records. In each
record, some fields are an integer and some are a list of integers of
variable length. I use csv.DictWriter to write data. When reading out using
csv.DictRea
On 03/04/2013 01:48 AM, DoanVietTrungAtGmail wrote:
Don, Dave - Thanks for your help!
Don: Thanks! I've just browsed the AST documentation, much of it goes over
my head, but the ast.literal_eval helper function works beautifully for me.
Dave: Again, thanks! Also, you asked "More space efficient
On 03/04/2013 11:30 AM, Lolo Lolo wrote:
Hey all, i am running python 3.0 but i realized a lot of modules that support
version 3 do not support 3.0. now i want to install Python 3.3 but im worried
the two versions (3.0 and 3.3) might confuse my machine. i don't want to lose
my work in 3.0 and
On 03/04/2013 07:28 PM, Pravya Reddy wrote:
Hi
I am having a builtin intendation error for print Addem(3,2).Does it vary
for different versions of python?
How to clear the error?
def Addem(this, that):
return this + that
print Addem(3, 2)
The print statement doesn't line up with t
(Please get the quoting right in your messages. Either you've got a
brain-dead mail program, or you're trying to bypass it's methods. On
your last message you attributed Eryksun's comments as though they were
your own.)
On 03/04/2013 09:49 PM, Lolo Lolo wrote:
no sorry i made a mistake it
On 03/04/2013 11:57 PM, eryksun wrote:
On Mon, Mar 4, 2013 at 10:54 PM, Lolo Lolo wrote:
no if i double click the .py file, Python 3.3 opens all of my python 3
files. A lot of 3.0 files won't run but that's okay. Now on my command line
if i enter the correct version's directory, and use: python
On 03/05/2013 02:43 AM, Lolo Lolo wrote:
Installing 3.3 associated .py files with %windir%\py.exe, but it seems
the icon cache wasn't refreshed. You can trigger a refresh by setting
any default in the "Default Programs" control panel applet. If that
fails, you can manually delete the cache fro
On 03/06/2013 09:05 PM, DoanVietTrungAtGmail wrote:
Once a csv file has been read by a csv reader (such as DictReader), it's
no longer a csv file.
That was an "Aha!" moment for me. The file is on disk, each row of it is in
memory as a list or dict, and it's the list or dict that matters. It's
On 03/12/2013 09:46 PM, Mark Lawrence wrote:
On 13/03/2013 00:05, Soliman, Yasmin wrote:
Hello all,
I'm new to python and its been a stuggle so far. I'm attempting to
create a BMI calculator in Wing 101 4.1. I keep getting syntax errors:
def calc_BMI(weight,height):
return (weight/(height
On 03/13/2013 02:17 AM, Jos Kerc wrote:
Hi,
On Wed, Mar 13, 2013 at 4:07 AM, Soliman, Yasmin wrote:
def calc_BMI(weight,height):
if bmi <=18.5:
return 'underweight'
elif bmi >= 18.5 and bmi <=24.9:
return 'normal weight'
elif bmi >=25 and bmi <=29.9:
F
On 03/13/2013 03:50 PM, Abhishek Pratap wrote:
Hey Guys
I might be missing something obvious here.
import numpy as np
count = 0
[ count += 1 for num in np.random.random_integers(1,100,20) if num > 20]
File "", line 2
[ count += 1 for num in np.random.random_integers(1,100,20) if num >
On 03/13/2013 11:14 AM, Joshua Wilkerson wrote:
It was even giving me a syntax error when said code was in a comment.
Really useful question, where you break the thread, change the subject,
don't quote anything from earlier, and don't bother identifying anything
about your environment. Go
I presume you meant this for the tutor list. I don't have any answers
for the question.
Original Message
Subject: [Tutor] Which databases allow lists as record fields?
Date: Thu, 14 Mar 2013 10:59:27 +1100
From: DoanVietTrungAtGmail
To: Dave Angel
Dear tutor
On 03/14/2013 02:22 PM, Irina I wrote:
Hi all,
I'm new to Python and am trying to pass a config file to my Python script. The
config file is so simple and has only two URLs.
The code should takes that configuration file as input and generates a single
file in HTML format as output.
The progr
On 03/14/2013 06:38 PM, Matthew Ngaha wrote:
i cant seem to break out of this loop. let me explain the variables you see:
if Enemy.ships:
for missile in self.missiles:
flag = False
for rect in Enemy.rects:
On 03/14/2013 07:23 PM, Matthew Ngaha wrote:
if Enemy.ships:
for missile in self.missiles:
flag = False
for rect in Enemy.rects:
assert(!flag)
if QPoint(miss
On 03/15/2013 01:53 AM, Paradox wrote:
There is something I can't figure out about the following code (using
python 2.7.3):
def return_tree_files(rootpath, pattern):
for root, dirs, files in os.walk(rootpath):
i = [os.path.join(root, filename) for filename in
fnmatch.filter(files,
On 03/15/2013 03:57 AM, Mark Lybrand wrote:
I seem to remember a web page that generated a random Python programming
tip. However my Google Fu is weak today. Does anyone recall the URL of
what I am talking about?
Closest that I've seen is the "Module of the Week"
http://www.doughellmann.c
On 03/15/2013 06:09 PM, Christopher Emery wrote:
-- Hugo said:
1. ask a question, receive an answer
2. if the answer is "Yes" or "No", return the answer
3. else, print a message and go back to step 1
Hello Hugo,
# Defines the start of a function and its options (question)
(By top-posting, you lost all the context. Next time, post your
responses AFTER the part you're quoting. And don't just quote it all,
only the part that's relevant.)
On 03/15/2013 06:25 PM, Cameron Macleod wrote:
I added the "self." to both the references to tasks and then I added the
print
On 03/15/2013 06:46 PM, Joshua Wilkerson wrote:
The program keeps telling me that the __init__ in Rock takes two arguments and
only one is given. Ideas?
The point of the game is to dodge falling rocks. Two more appear every time one
reaches the bottom of the screen.
# Avalanche, a dodging game
On 03/15/2013 08:53 PM, Alan Gauld wrote:
On 15/03/13 19:42, Charles Leviton wrote:
Given a list of DBRM members create a JCL which has a series of bind
statements for each DBRM.
Ah, the joys of JCL.
I haven't read a JCL script in about 15 years! :-)
Been over 40 years for me, so I may not
On 03/16/2013 03:04 PM, ke...@kendy.org wrote:
Dear Tutor
Global constants and variables are bad.
First, let me define my own "rule." Global constants should be all
uppercase, and global variables should be avoided. Trivial and buggy
scripts may ignore both rules. A trivial script is typic
On 03/18/2013 12:18 PM, Jim Byrnes wrote:
I am trying to script Calligra Sheets (formerly KSpread) with python. I
have gotten some of the included example scripts to run so I know python
scripting is running.
I found the following snippet on their website:
import KSpread
sheet = KSpread.view()
On 03/18/2013 09:56 PM, Jim Byrnes wrote:
On 03/18/2013 07:54 PM, Dave Angel wrote:
On 03/18/2013 12:18 PM, Jim Byrnes wrote:
I am trying to script Calligra Sheets (formerly KSpread) with python. I
have gotten some of the included example scripts to run so I know python
scripting is running
On 03/20/2013 03:57 PM, travis jeanfrancois wrote:
Hello, I am a beginning python student and I am having trouble with a
program I am writing . The problem requires me to use "while" and that I
create a function that allows the user to a create sentence by inputing a
string and to end the sent
On 03/21/2013 06:42 AM, Arijit Ukil wrote:
I am new to python.
Since you're new to Python, I won't try to supply you an answer using
list comprehensions, since you've probably not learned them yet.
I like to calculate average of the numbers by reading
the file 'digi_2.txt'. I have written
On 03/21/2013 08:09 AM, Arijit Ukil wrote:
Thanks for the help.
You're welcome.
You replied privately, instead of including the list, so I'm forwarding
the response so everyone can see it. You also top-posted, so the
context is backwards.
After running your code, I am getting the follow
On 03/21/2013 09:43 AM, Shall, Sydney wrote:
I have an elementary question provoked by another post today.
1. Is it the case that ALL imported data from a file is a string?
No, the imported data is a module. For example
import sys
print type(sys)
At this point, sys is a object of
On 03/21/2013 10:03 AM, Dave Angel wrote:
A typo below; sorry.
On 03/21/2013 09:43 AM, Shall, Sydney wrote:
I have an elementary question provoked by another post today.
1. Is it the case that ALL imported data from a file is a string?
No, the imported data is a module. For example
On 03/23/2013 12:08 AM, Robert Sjoblom wrote:
You already got lots of good answers. But I want to explicitly point
out a bug in your code (2 places) that was only indirectly mentioned.
class Outcome():
def __init__(self, name): #Ignoring odds for now
self.name = name
def
On 03/23/2013 10:35 AM, Robert Sjoblom wrote:
As I said, I don't really understand why a roulette outcome has a name in
the first place, but given that it does, I don't any problem with comparing
the names directly. Still, I would probably write it as an __eq__ method,
since it's easier to write
On 03/24/2013 07:38 PM, Mariel Jane Sanchez wrote:
Hi, I'm sort of new to Python. I'm taking Computer Science 10 and I'm now on
Chapter 3. I don't really get how to do the first three projects.
Okay, so for the first project, I don't know how to input the ranges like 0-999, 1000-, 1+
a
On 03/26/2013 12:36 AM, Robert Sjoblom wrote:
Hi again, Tutor List.
I am trying to figure out a problem I've run into. Let me first say
that this is an assignment, so please don't give me any answers, but
just nudge me in the general direction. So the task is this: from a
text file, populate thr
On 03/26/2013 08:16 AM, Mousumi Basu wrote:
I have installed PyDtls from the link:-"
https://pypi.python.org/pypi/Dtls/0.1.0";.
While creating the server and client objects in
"sslconnection.py", it is referring to "x509.py" for certificates.
Following error is o
On 03/26/2013 07:30 AM, Phil wrote:
Thank you for reading this.
I'm a bit out of my depth here. I'm attempting to set up a simple udp
client.
The example that follows results in an error message and I'm wondering
if I should be importing a different module. A Google search doesn't
support that
On 04/01/2013 09:31 PM, Mark Lawrence wrote:
On 02/04/2013 01:31, ke...@kendy.org wrote:
Dear Tutor
I want to compare command line options, to options in a dictionary
from a YAML
file. The command line will over-ride the options in my file. (The
YAML file, and
its dictionary are not shown. That
On 04/01/2013 10:34 PM, Mark Lawrence wrote:
On 02/04/2013 02:37, Dave Angel wrote:
On 04/01/2013 09:31 PM, Mark Lawrence wrote:
for a in vars(parser.parse_args()):
print('This arg is %s' % a)
http://docs.python.org/3/library/argparse.html#the-namespace-object
Please don
On 04/01/2013 10:28 PM, ke...@kendy.org wrote:
You guys are awesome! You make it look easy and I learn every time.
Once you've got the two dicts, take a look into the update method. It
may make any loops unnecessary, except for debugging.
--
DaveA
_
On 04/03/2013 03:43 PM, frank ernest wrote:
Hi guys, it's been a while since I posted and I've learned a lot since then.
Today I have a question on classes, I can't get mine to work.
Welcome back. I'll try. First comment is that indentation ought to be
4 columns, until you have enough exper
On 04/03/2013 09:53 PM, Steven D'Aprano wrote:
On 04/04/13 12:29, bessenkphilip wrote:
Hi all,
I'm having a doubt in the below program's 2n'd "for" loop.
for n in range(2, 10):
... for x in range(2, n):
... if n % x == 0:
... print n, 'equals', x, '*', n/x
...
On 03/27/2013 08:30 AM, Yasin El Guennouni wrote:
Hello,
I am trying to modify a game of nim code. The game in the code works as:
"You need to remove from 1 to 3 straws from the pile.
The player that removes the final straw is the loser."
But I would like it to be like the classic game, where
On 04/04/2013 01:01 PM, frank ernest wrote:
Sorry about the indentation guys my mail service atomatically removed it when I
pasted the text (I tried to fix it by hand but it was hard to tell if I was
sucessful.)
I was tring to create a list object (self) and change it using the list methods
an
On 04/05/2013 08:05 AM, Najam Us Saqib wrote:
Hi,
My name is Najam, I am very new to Python Programming.
Welcome.
Would you please help me with the following question?
The question/problem is,
Write a Car salesman program where the user enters the base price of a car. The
program should
On 04/06/2013 11:23 PM, Najam Us Saqib wrote:
Hi,
Would you please help me by explaining that why " 5 " is skipped and not
printed in the following program?
Seems to me the comments say it pretty well. The continue statement
causes execution to continue at the while statement, which has th
On 04/06/2013 11:23 PM, Najam Us Saqib wrote:
Hi,
Would you please help me by explaining that why " 5 " is skipped and not
printed in the following program?
Seems to me the comments say it pretty well. The continue statement
causes execution to continue at the while statement, which has th
On 04/08/2013 06:21 AM, Max Smith wrote:
Hi, everyone whom might read this, im Max and i am really new to coding,
been going at it for about two weeks using codeacademy and the book "think
python".
when i decided to experiment a little with if statements i ran into the
following problem:
def plu
On 04/08/2013 06:37 AM, Woody 544 wrote:
Max,
You've made the arguments a string (so never a number) in:
print "The answer is: " + str(x+y)
MJ
That has nothing to do with the issue. The str() function call is
unnecessary, but harmless. If the two values x and y are ints or
floats, they w
On 04/08/2013 07:55 AM, Steven D'Aprano wrote:
On 08/04/13 20:45, Dave Angel wrote:
will always fail, since the integer 2 is not equal to the type int.
In Python 2.x, when you compare objects of different types, you
generally get unequal. (Exception, if you define your own classes,
yo
On 04/08/2013 08:40 AM, Sydney Shall wrote:
Hi,
I am learning Python.
I use MAC OSX 10.6.8
Python 2.7.3
I have been given a project to write a program involving random walks.
I have drafted a program which has passed all the static tests, but on
testing my program i get the following error mes
On 04/08/2013 07:58 PM, Steven D'Aprano wrote:
On 09/04/13 06:38, brian arb wrote:
An Introduction to Interactive Programming in PythonJoe Warren, Scott
Rixner, Stephen Wong and John Greiner
This course is designed to be a fun introduction to the basics of
programming in Python. Our main focus
On 04/09/2013 04:20 AM, daedae11 wrote:
On Windows, how to make a python script run on startup?
Windows has a system scheduler, which you can add entries to, specifying
what time(s) a particular entry is to run. One of the choices is system
startup.
--
DaveA
On 04/09/2013 05:54 AM, Alexander Mark wrote:
On Apr 9, 2013, at 4:20, daedae11 wrote:
On Windows, how to make a python script run on startup?
_
(Top-posted comment moved AFTER the question)
> There is a startup folder, usually on the start menu, you can add the
script to.
>
But does an
On 04/09/2013 07:50 AM, Najam Us Saqib wrote:
Hi,
This program is killing me, I have been working on it for last 3 hours, I have
tried my best but can't make it work, please help me out.
The Problem:
Create a program that flips a coin 100 times and than tells you the number of
tails and head
On 04/09/2013 06:58 AM, daedae11 wrote:
(Please don't top-post. And don't forget to include the list in your
cc. I'm forwarding it for you)
Which module to should I use to add entries to that system scheduler?
The system scheduler is an interactive (gui) program that comes with the
OS.
On 04/09/2013 08:29 PM, ALAN GAULD wrote:
Forwarded to group. Please use ReplyAll when responding to tutor posts.
From: Mariel Jane Sanchez
To: Alan Gauld
Sent: Wednesday, 10 April 2013, 1:06
Subject: Re: [Tutor] Chapter 3 Projects
Thank you so much, I fin
On 04/10/2013 02:18 AM, Jordan wrote:
Thank you all for the feedback and suggestions. I have never used an
assertion, before so I will read up on the concept.
One comment about assertion. Even though an optimized run will ignore
the assertion itself, it can save a (small) amount of time avo
(Please don't hijack a thread with an unrelated question. You're no
doing yourself any favors, as any decent thread-viewer will hide your
new subject line, and group the whole thread with its original title.
That can cause your query to be ignored by many of the readers.)
To start a new threa
On 04/10/2013 08:32 AM, Arijit Ukil wrote:
I like to run a python program "my_python.py" from windows command
prompt. This program ( a function called testing) takes input as block
data (say data = [1,2,3,4] and outputs processed single data.
import math
def avrg(data):
return sum(data)/len
On 04/10/2013 10:44 AM, Woody 544 wrote:
I have a script that worked before I moved it to another folder. I
cannot understand why I am getting a 'No such file or directory'
error, when the file is in the folder.
Any clues would be much appreciated. Thanks!
MJ
Here is a copy and paste of the
On 04/10/2013 08:18 PM, Rodney Lewis wrote:
My question is at StackOverflow so I won't repeat it here.
http://stackoverflow.com/questions/15938629/python-bz2-ioerror-invalid-data-stream-when-trying-to-decompress
Thanks so much in advance for any help you can provide regarding this.
http://www.
On 04/08/2013 09:31 PM, Negin Nayeri wrote:
Hi!Im supposed to do a Library in Python and I don't even know how to begin!
Please just help me. Like what kind of attributes do you think I should have,
how do I store information? The file with the books and authors I must fix, do
think I should w
On 04/14/2013 08:35 PM, Soliman, Yasmin wrote:
Hi everyone. I just need to know why this programs tells me End is not defined,
what can I o to fix this issue? Thanks in advance.
hrList=[]
while True:
heartrate= float(input('Enter heart rate as beats per min: '))
hrList.append(heartrat
On 04/16/2013 11:58 AM, Andy McKenzie wrote:
Hey folks.
I'm just starting to pick up Python, and I'd like to avoid some of the
mistakes I made in the past. To elaborate on that, my primary
programming/scripting experience is PHP, with a little bit of Perl thrown
in. Like so many people who wri
On 04/16/2013 01:48 PM, Jim Mooney wrote:
I accidentally sent as HTML so this is a resend in case that choked
the mailing prog ;')
I was doing a simple training prog to figure monetary change, and
wanted to avoid computer inaccuracy by using only two-decimal input
and not using division or mod w
On 04/16/2013 05:20 PM, Andy McKenzie wrote:
Thanks for the advice, folks. Given that it looks like the biggest changes
are unicode handling (which I'm not going to need any time soon) and the
way the print function works, I decided to stick with 2.7. I'm an IT guy,
though unemploye
On 04/16/2013 05:46 PM, Jim Mooney wrote:
Further question. If I round the input right at the beginning,
round(paid,2) does that mean I still have the original error from
using .76 even before math, or does the rounding kill it? I would
guess not if it's binary,
You guess right. round() funct
On 04/16/2013 05:47 PM, Andy McKenzie wrote:
On Tue, Apr 16, 2013 at 5:31 PM, Dave Angel wrote:
To get 3.x functionality, you'd want to use
from __future__ import print_function
and I do not think that works in 2.6 or older versions. It also can be
awkward even in 2.7 if y
On 04/16/2013 06:10 PM, Hugo Arts wrote:
The other option, and probably the simplest to use, is python's built in
decimal module, which provides a special class that implements perfectly
accurate decimal calculations. Why don't we use it for all applications,
you might ask? Well, it is extre
On 04/17/2013 03:27 PM, Danilo Chilene wrote:
Dear Python Tutor,
I have the code below(file.py):
import sys
a = 'This is A'
b = 'This is B'
c = 'This is C'
for i in sys.argv[1]:
if sys.argv[1] == 'a':
print a
if sys.argv[1] == 'b':
print b
if sys.argv[1] == 'c
On 04/17/2013 04:49 PM, Danny Yoo wrote:
Wait. If the solution that we're stopping at to use a hashtable here,
that's not quite right.
Nothing wrong with a dict, if a proper specification of the problem were
available. Notice that in my solution, the messages were not all
trivially related
On 04/17/2013 05:15 PM, Danny Yoo wrote:
Yup! Sorry about my tone for its stridency. But I just got concerned
that the original poster seemed content about turning the chain of if
statements into a table definition. To my mind, they're very closely
related, data and control. I'm trying to pus
-- Forwarded message --
From: Danilo Chilene
Date: Wed, Apr 17, 2013 at 2:17 PM
Subject: Re: [Tutor] Sys.argv read parameters
To: Danny Yoo
Hello Danny,
The part that is changing is just the sys.argv[1]
The vars will have always the same content.
What I don't want is to hav
On 04/17/2013 08:12 PM, Alan Gauld wrote:
On 17/04/13 20:27, Danilo Chilene wrote:
import sys
a = 'This is A'
b = 'This is B'
c = 'This is C'
for i in sys.argv[1]:
if sys.argv[1] == 'a':
print a
if sys.argv[1] == 'b':
print b
if sys.argv[1] == 'c':
pr
On 04/18/2013 09:21 AM, Danilo Chilene wrote:
On Wed, Apr 17, 2013 at 8:21 PM, Dave Angel wrote:
-- Forwarded message --
From: Danilo Chilene
Date: Wed, Apr 17, 2013 at 2:17 PM
Subject: Re: [Tutor] Sys.argv read parameters
To: Danny Yoo
Hello Danny,
The part that is
On 04/18/2013 12:45 PM, Jim Mooney wrote:
Minor question. I was adding the Py Script directory to the Win 7
Path, and noticed that Python33 ends with a backslash but many
directories do not. Is there a difference? Should I use backslash or
not preferentially, or doesn't it matter at all? It does
On 04/18/2013 01:14 PM, Danilo Chilene wrote:
The following code has little to do with anything that happened before.
So you should start a new thread for this new project.
Below is the final code:
import requests, json, sys
r = requests.get('http://napmongo01.cvc.com.br:28017/_sta
On 04/21/2013 12:24 PM, Jim Mooney wrote:
On the other hand, from the perspective of "When will the *majority* of
publicly-available libraries and packages support Python 3, then the answer
is "Right now". The Python 3 Wall of Shame turned mostly green some time
ago,
and is now known as the Pytho
On 04/21/2013 09:35 PM, Jim Mooney wrote:
I'm reading a book that suggests finding EOF when the readLine == ""
But wouldn't that end erroneously on blank lines, that really contain
'\n', in which case more lines might follow? What 'empties' are
considered equal in Python? I'm coming from ja
On 04/22/2013 09:47 PM, Jim Mooney wrote:
Okay, what am I doing wrong here? I'm generating primes from a list
and getting "list index out of range," but since the for loops
controls the indexes I don't see how that's happening. I thought it
was the list append, but I commented that out and put in
On 04/23/2013 03:39 PM, Roelof Wobben wrote:
Im trying to learn python by a course at codeacademy. Now I have this code :
def shut_down(s):
s = s.lower()
if s == "yes":
return "Shutting down..."
elif s == "no" :
return "Shutdown aborted!"
else:
retu
On 04/24/2013 11:18 AM, Lolo Lolo wrote:
Microsoft's C/C++ runtime only
uses double quotes. So just change it to the following:
>> python -c "import googlemaps"
Thanks this solved the issue, now another issue has been thrown. Just not my
day. after the 1st module error happens, they show
On 04/24/2013 10:59 AM, Sydney Shall wrote:
//I am a beginner just learning Python.
Welcome to the mailing list. I hope you enjoy your experience with Python.
I have come across the following usage for the first time.
totalViruses[i] /= float(numTrials)
Does it mean? ; totalViruses[i
On 04/24/2013 12:52 PM, sparkle Plenty wrote:
What is the best way to concatenate packed numeric data? I am building a
message to send to a device and it has a very specific header format and
variable length payload. Converting to string, concatenating, and then
converting back to numeric intro
On 04/24/2013 06:58 PM, Oscar Benjamin wrote:
On 24 April 2013 23:41, Alan Gauld wrote:
On 24/04/13 20:32, Oscar Benjamin wrote:
On 24 April 2013 20:07, Alan Gauld wrote:
On 24/04/13 16:52, Dave Angel wrote:
Does it mean? ; totalViruses[i] = totalViruses[i]/float(numTrials)
As the
On 04/26/2013 01:45 AM, wang yong wrote:
Hi tutors,
I am a newb. Please bear with my simple question.
If you're new to Python, then any GUI question isn't "simple." But
perhaps you're not new to Python, but only to PyQT. I'll qualify my
remarks with the statement that I'm not familiar with
On 04/26/2013 05:08 AM, Arijit Ukil wrote:
I like to implement sha-256 without using implement. It is easy using
hashlib as:
import hashlib
m = hashlib.sha256()
m.update("hi")
print m.hexdigest()
If anybody has pointer on sha-256 implemented without using hashlib
library, please share.
If yo
On 04/26/2013 08:10 AM, mike wrote:
Hi all,
I wrote a cli script for syncing my music to a USB mass storage device
like a phone etc. all it does is it creates a symlink in a dir to
whatever folder i pass as an argument via ./addsync DIR . My problem is
i'm having trouble dealing with directories
On 04/26/2013 06:57 PM, Rajlaxmi Swain wrote:
How can I fix this.
I don't see any antecedents for the pronoun.
Show us some code, tell us the situation, and show us the full traceback.
Otherwise we'd just be paraphrasing the error message. Make sure the
argument is a string, or an int,
1101 - 1200 of 1736 matches
Mail list logo