Steve wrote:
> I'm currently working on a little database type program is which I'm
> using a dictionary to store the information. The key is a component a and
> the definition is a list of parts that make up the component. My problem
> is I need to list out several components, but not all, and
No, but before I signed up with them I asked if it was available
and they said yes.
wes
mbstevens wrote:
> I keep chatting with the tech support people at Earthlink, asking where
> the location of the Python interpreter is. They don't seem to know where
> it is. They don't know if Python is run
from HTMLParser import HTMLParser
class MyHTMLParser(HTMLParser):
def __init__(self):
HTMLParser.__init__(self)
self.TokenList = []
def handle_data( self,data):
data = data.strip()
if data and len(data) > 0:
self.TokenList.append(data)
Andrew Robert wrote:
> wes weston wrote:
>> Andrew Robert wrote:
>>> Hi Everyone,
>>>
>>> I am having a problem with a class and hope you can help.
>>>
>>> When I try to use the class listed below, I get the statement that self
>>> is
Andrew Robert wrote:
> Hi Everyone,
>
> I am having a problem with a class and hope you can help.
>
> When I try to use the class listed below, I get the statement that self
> is not defined.
>
> test=TriggerMessage(data)
self is not known here; only inside the class.
> var = tes
DannyB wrote:
> I'm just learning Python. I've created a simple coin flipper program -
> here is the code:
>
> [source]
> #Coin flipper
> import random
>
> heads = 0
> tails = 0
> counter = 0
>
> coin = random.randrange(2)
>
> while (counter < 100):
> if (coin == 0):
> heads += 1
>
Jeff Elkins wrote:
> I'm writing a small wxpython app to display and update a dataset. So far, I
> get the first record for display:
>
> try:
> cursor = conn.cursor ()
> cursor.execute ("SELECT * FROM dataset")
> item = cursor.fetchone ()
>
> Now, how do I step through the dat
[EMAIL PROTECTED] wrote:
I'm trying to come up with a good algorithm to do the following:
Given a list 'A' to be operated on, and a list 'I' of indices into 'A',
rotate the i'th elements of 'A' left or right by one position.
Here's are some examples:
A = [a, b, c, d, e, f]
I = [0, 3, 4]
rotate(A, I
[EMAIL PROTECTED] wrote:
I'm trying to come up with a good algorithm to do the following:
Given a list 'A' to be operated on, and a list 'I' of indices into 'A',
rotate the i'th elements of 'A' left or right by one position.
Here's are some examples:
A = [a, b, c, d, e, f]
I = [0, 3, 4]
rotate(A, I
Dennis Lee Bieber wrote:
On Thu, 17 Mar 2005 16:45:57 GMT, wes weston <[EMAIL PROTECTED]> declaimed
the following in comp.lang.python:
str = "INSERT INTO produkt1 (MyNumber) VALUES(%d)" % (MyNumber)
cursor.execute(str)
Think you meant "MyValue" for the second item
Igorati wrote:
Hello all, I am still needing some help on this code, I have gone a bit
further on it. Thank you for the help. I am trying to understand how to
make the file searchable and how I am to make the deposit and withdrawl
interact with the transaction class.
I need to just search the file
Lad wrote:
I have the following
program( only insert a record)
import MySQLdb
conn = MySQLdb.connect (host = "localhost",user = "", passwd =
"",db="dilynamobily")
cursor = conn.cursor ()
cursor.execute("""CREATE TABLE produkt1 (
id int(10) unsigned NOT NULL auto_increment,
MyNu
Przemysław Różycki wrote:
Hello,
I have written some code, which creates many threads for each connection
('main connection'). The purpose of this code is to balance the load
between several connections ('pipes'). The number of spawned threads
depends on how many pipes I create (= 2*n+2, where n
[EMAIL PROTECTED] wrote:
Hello NG,
probably this is a basic question, but I'm going crazy... I am unable
to find an answer. Suppose that I have a file (that I called "Errors.txt")
which contains these lines:
MULTIPLY
'PERMX' @PERMX1 1 34 1 20 1 6 /
'PERMX' @PERMX2 1 34 21 41
Will McGugan wrote:
Hi,
I'm accumulating a number of small functions, which I have sensibly put
in a single file called 'util.py'. But it occurs to me that with such a
generic name it could cause problems with other modules not written by
myself. Whats the best way of handling this? If I put it
Philippe C. Martin wrote:
Hi,
I decided to clean my system and rebuild python from scratch.
I downloaded tk8.4.9, tcl8.4.9 and Python2-4.tar.bz2.
I installed tcl then tk using './configure --prefix=/usr'
tkcvs is now working OK
trying to compile python (configure = './configure --prefix=/usr', I ge
Thomas,
If you were allowed to do what you're doing, the
list first element would be getting skipped as "index"
is always > 0. The thing is, you don't want the "index"
var at all for adding to the list; just do jMatrix.append(k).
You can iterate over the list with
for x in jMatrix:
print x
Thomas Bunce wrote:
I am new at Pyton and I am learning from book not classes
so please forgive my being slow
The below does not work I get an Error of File
"Matrix[index] = k
NameError: name 'iMatrix' is not defined"
while index < majorlop1:
index = index + 1
k = random.choice(listvalues
Grant Edwards wrote:
I'm trying to figure out how to sort a list, and I've run into
a problem that that I have tripped over constantly for years:
where are the methods of basic types documented? The only
thing I can find on a list's sort() method is in the tutorial
where it states:
sort()
Todd_Calhoun wrote:
I'm trying to learn Python (and programming), and I'm wondering if there are
any places where I can find small, simple programs to study.
Thanks.
Todd,
Have you been here:
http://www.python.org/doc/
and tried the tutorial or beginners guide?
The tutorial has all the piec
Amir Dekel wrote:
Harlin Seritt wrote:
Simple, Simple, Simple:
Var = raw_input("Some prompting text here: ")
Frans Englich wrote:
>
> See sys.stdin
>
What I need from the program is to wait for a single character input,
something like while(getchar()) in C. All those Python modules don't
make
Sean Berry wrote:
Given
myList = ['cat', 'dog', 'mouse' ... 'bear']
what is the easiest way to find out what index 'dog' is at?
Sean,
>>> myList = ['cat', 'dog', 'mouse','bear']
>>> myList.index('dog')
1
>>>
wes
--
http://mail.python.org/mailman/listinfo/python-list
Lad wrote:
Hi,
I have a file of records of 4 fields each.
Each field is separated by a semicolon. That is
Filed1;Ffield2;Field3;Field4
But there may be also empty records such as
(only semicolons).
For sorting I used
#
lines = file('Config.txt').readlines()# a file I want to so
23 matches
Mail list logo