Thanks Kent and Alan!!
Problem solved, eval() will work great!
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
I am trying to teach a computer program - to program. It builds grammars
and procedural memories on dictionary networks. How do I get the program
to be able to input to the interpreter/command line and read the
results? I have done this a wee bit with making a dictionary of
functions, but in a sen
> Hi,
> ?
> A dictionary (associative array of keys and values) seems a good
> datatype to use. vocab = {} vocab[frenchword]?= englishword
> ?
...
> Cheers!!
> Albert-Jan
Sure, a dict is the obvious choice. For saving into file, if the app is
to be used internally, you can even print it in
Let there be 'n' circles (upper bound on n = 10**6) each of radius '1'.
We enter their co-ordinates which are floating points and lies between
(-1000, 1000). I need to find area of the resulting figure formed by
intersection of circles. I came across these links :
http://stackoverflow.com/questio
>
> I'm sure this is easy, but I am having a difficult time finding the
> right search terms to find it on the Internet. Any help much
> appreciated.
>
> 3 dimensional array(x,y,rgb) which is a PIL image into a numpy array
> using 'asarray' function.
>
> I want to subtract the Red Value in an a
I'm sure this is easy, but I am having a difficult time finding the
right search terms to find it on the Internet. Any help much
appreciated.
3 dimensional array(x,y,rgb) which is a PIL image into a numpy array
using 'asarray' function.
I want to subtract the Red Value in an array cell from a ne
I searched through archives and wasn't able to find the solution.
Using IDLE, python 3, Ubuntu (default installations).
Using command line:
> if 1 == 1:
print "equal"
> equal
Using IDLE:
>if 1 == 1:
print "equal"
>SyntaxError: in
I am needing to access the text in hundreds of Microsoft .doc files on
an Ubuntu OS. I looked at win32 , but only saw support for windows. I am
going through all of these files to create a fairly simple text
delimited file for a spreadsheet.
A) Batch convert to text files so I can access them
B)
"""But what I hope is that the code # sparks conversations about what I did in
this code and why I did it."""
If anyone answers me thank you. really.
Nevertheless, I am personally not pursuing to understand this code. Ronald
Weidner left on vacation and won't be back until the 19th (I don't kno
Since # the list seems thick with OOP questions at the moment, I thought
this might # be relevant. Digest and enjoy.
class Item ( object ):
def __init__( self ):
self._FullName = ''
self._Recovery = 0
self._Exporter = SimpleItemExporter (); # Don't
understand
Ok I think I understand now (maybe?)
#=== Current Version ==
# Segmenter + POS Tagger output file# Gold Standard File
the Determiner = The Determiner
whocame Noun!= man Noun
to Preposition
Sorry, I do see that I wrote that question in a confusing way, but I've
worked out where I was going wrong now. Thanks for taking a look.
> > m.pick = ["stab","stab","stab","..."]
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailma
Question:
Is it a bad practice to avoid 0.1 representation errors
(0.101) by just doing the following?
#NOTE: all the myVariableName stuff is because Outlook keeps changing
everything I type.
#I need 2 decimal places (my input number shouldn't be over 255)
myNum = 1
myDiv = 3
#1000
Never mind. Sorry, I should have thought about this more before sending
this. In a way I already have access to the interpreter.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Let's say I have a program that is learning how to find patterns in a
list etc.
list = [1,2,3,5,8,13]
So the python program (Kitty.py) opens the python interpreter and copies
this list to it.
It then can try some pattern finding things it already has stored
(PositionN+1 - PositionN etc.)
That
Terry,
I liked your answer!
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
The problem was pointed out by Kent
"""
I think you want
s.arrayEnv = arrayEnv
Not s,arrayEnv (comma instead of period)
"""
Maybe I should put time limits on myself when I am programming...
After a few hours my mind starts going fruity.
Maybe I should be wearing the dunce cap. Hopefully, I can p
Any help would greatly appreciated.
Question: I am getting the following error from the validMove function:
ValueError: too many values to unpack
This program (currently) consists of a 2dArray and objects (represented
by integers)
in that array that can be moved.
I am guessing that it has to d
"wormwood_3" <[EMAIL PROTECTED]> wrote
> I need some way to analyze an image for color patterns.
>
> My only lead right now is PIL, and I am not sure if it will meet my
> needs.
I am using PIL and numpy
# something hat at least looks sorta like
import numpy
import PIL
myImage = Image.
19 matches
Mail list logo