I'm using Python 2.6.5 and I've got a challenge with the subprocess
module. I'd like the output to be stored in a variable, and not sent to
the stdout. The relevant lines as they are now:
#!/usr/bin/env python
import subprocess
import sys
dom = sys.argv[1]
switch = sys.argv [2]
answer = subproces
I am trying to create a script that will get files from a directory
that the user specifies, then feeds the relevant input and output
(which are input and output paths) into another python script whose
path is also given by the user. I'm pretty lazy after all and I would
rather spend my time making
Unfortunately I was confused by both responses I received. I have only
been working with Python for a week, so everything is new. Thanks for
your patience.
John- I was not sure what you meant by "command line". I took what you
said quite literally and created this:
indir = raw_input('input direct
Hello everybody, I'm new to the mailing list so I'm pretty sure I'll have
lots of questions:)
It's a very basic question I have and everybody might look at this
question and say, "Wow, she reallly doesn't get it?" But oh well. Here's my
question: I'm in Chapter 2 of my Python Programming Third Edi
I am trying to write a function...(it's kind of like a long way to do BLAST but
only comparing 2 sequences)
I have 3 loops nested...Within those loops, I obtain a "best fit score" so to
speak.
I can get the program to run...but the loops run all the way to the end. I
can't figure out how to
ok...here's the function I've written so far.
def padWithGaps(seq):
for letter in seq:
letter="-"
line=len(seq)
dashline=line*letter
return dashline
def replace(someString,position,letter):
first=someString[0:position]
second=letter
third=someString[posi
I am trying to complete an assignment and I am stuck at the if-else statements
area. Could someone please help me?
the instructions and what I have so far are below...
Instructions: Your "main" function should do the following:
(1) create an empty list;
(2) ask the user if he/she wants to perfo
] Question
On 23/08/12 18:02, Ashley Fowler wrote:
> def main():
> l = list()
> x = eval(input('Enter a number: '))
Don;t use eval() its bad practicecand fort advanced use only.
Instead explicitly convert to int() or float()
> while x >= 0:
> l.append(
Does anyone know how to print a list in a form of a column instead of a row?
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Can anyone help me edit this code below to return the list in the form of a
column instead of a row?
def printList():
list1 = input("Insert a list")
list = [list1]
print (list)
___
Tutor maillist - Tutor@python.org
To unsubscribe or ch
This is a problem using the Scheme programming...Can anybody help me with this
problem?
2. Write a procedure (sphere r) that takes the radius of a sphere
as the value of its input parameter and returns the volume of that
sphere given by the formula: (4/3)π(r^3). Use (require scheme/math)
or (req
with your
solution.
Even when you go to the Lisp or Scheme mailing list, you should at least show
what you have tried, paste your own code, and tell them where you are stuck.
On 31 August 2012 07:32, Ashley Fowler
mailto:afowl...@broncos.uncfsu.edu>> wrote:
This is a problem using the Sc
] Scheme
On 31/08/2012 00:32, Ashley Fowler wrote:
> This is a problem using the Scheme programming...Can anybody help me with
> this problem?
>
>
> 2. Write a procedure (sphere r) that takes the radius of a sphere
> as the value of its input parameter and returns the volume of that
I need help creating a student class. I am suppose to create a student class
with there first name, last name, credits
and gpa. Can anybody help me get started? Below is what needs to be included.
For number one, is the variables
suppose to be parameters?
for instance,
class Student:
def __i
, Ashley Fowler wrote:
> I need help creating a student class.
We don't do your homework for you we will only offer hints. So you need
to show us what you are trying and we will try to steer you to something
better.
> class with there first name, last name, credits
> and gpa. Can anybo
I have a question. In a assignment it asks for me to do the following below...
if "peek" then print the Student object at the beginning
of the list (using __str__) but don't remove it from
the list;
Could you explain what it means?
This is what I have so far,
How do you construct a object using variables?
For instance I have to construct a student object, by first prompting the user
to enter variables for the Student class (their first and last names, credits
and gpa) then construct a Student object using those variables.
I am trying to complete the following below:
You also need to write a function "printList" of one parameter that
takes a list as its input and neatly prints the entire contents of the
list in a column. Each student in the list should be printed using __str__.
So far i have:
def printList(lis
Hello I am trying to add a str method to a Set ADT implementation to allow a
user to print the contents of a set. However the resulting string should look
like that of a list. except I am suppose to use curly brackets to surround the
elements.
For an example...
>>> set1 = Set()
>>> print(set1)
Hi,
could you help me with python 3.5 coding for graphics?
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
I'm trying to initialize a list to several elements using the string method. I
have some idea that you use a for loop I suppose...
Could anybody help me out?
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://
er__( self ):
return _SetIterator( self._theElements )
def __str__(self):
for element in str(self._theElements):
return element
From: Oscar Benjamin [oscar.j.benja...@gmail.com]
Sent: Sunday, November 04, 2012 8:52 PM
To: Ashley Fowler
This is what I have to do :
On a standard telephone, the alphabetic letters are mapped
to numbers in the following fashion:
A, B, AND C=2
D, E, AND F=3
G, H, AND I=4
J, K, AND L=5
M, N, AND O=6
P, Q, R, AND S=7
T, U, AND V=8
W, X, Y AND Z=9
Write a program that asks the user to enter a 10-char
23 matches
Mail list logo