As I typed this out I double checked something. I resolved my own problem.
Should have stepped back before posting.
It is
import mysql.connector
not
import mysql.connection
From: stpete...@hotmail.com
To: tutor@python.org
Subject: ImportError: No module named connect
Date: Tue, 3 Nov 2015 12:
I have been trying to install the MySQL Connect module for a day and a half.
First I got an error saying that "No module named mysql" was installed. After a
lot of trial and error I got passed that. I realized that because I have python
installed in /usr/local that I needed to build and then in
deeper into via a collective group.
>>
>> This is the first I've heard of this, Im not sure if you've posted
before
>> but which book are you using?
>>
>> /Regards
>> Tommy
>> On Tue, 29 Nov 2011 10:18:25 +0100, tutor-requ...@python.org wrote:
>&g
h book are you using?
/Regards
Tommy
On Tue, 29 Nov 2011 10:18:25 +0100, tutor-requ...@python.org wrote:
> Send Tutor mailing list submissions to
> tutor@python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://mail.python.org/mailman/listinfo/tuto
resource
> for that kind of thing.
Uselesspython is down, but you can reach a lot of the stuff through
archive.org:
http://web.archive.org/web/20080719092030/http://www.uselesspython.com/
Tommy
> ___
> Tutor maillist - Tutor@python.org
> To
ut outside of simply taking apart an existing game and looking at how
they did it, are there any ressources to help me learn?
I apologize if this is not the correct place to ask for this.
Regards
Tommy
___
Tutor maillist - Tutor@python.org
To u
> -Oprindelig meddelelse-
> Fra: tutor-bounces+tommy.kaas=kaasogmulvad...@python.org
> [mailto:tutor-bounces+tommy.kaas=kaasogmulvad...@python.org] På vegne
> af Alan Gauld
> Sendt: 6. juni 2011 11:51
> Til: tutor@python.org
> Emne: Re: [Tutor] search-replace
>
step below.
I'm using Python 2.6.6 on a windows pc.
fin = open("dirtyfile.txt")
fout = open("cleanfile.txt", "w")
for line in fin:
fout.write(line.replace('## ', '#'))
fin.close()
fout.close()
Thanks,
Tommy
___
uliarities such as the one Brett Ritter pointed.
On Tue, May 10, 2011 at 8:45 AM, Brett Ritter <mailto:swift...@swiftone.org>> wrote:
On Tue, May 10, 2011 at 8:17 AM, Tommy Bell mailto:to...@enkelthed.dk>> wrote:
> scandir('c:\tmp')
> this doesnt work
ake it print like so
folder:
file1
file2
folder2
folder2.1
file1
file2
etc.
Any ideas? I dont mind reading if i could justbe pointed in the right
direction
Regards
Tommy
___
Tutor maillist - Tutor@python.org
To u
e:
log.write('No existe el archivo ' +dbf+"\n")
log.close()
Try: \r\n
Tommy
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo
onlibs/
Tommy
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
> >I get a invalid syntax error when I try to run this script - and it's
> > con.commit() which is highlighted when I get the error.
>
> Aren't you one closing parenthesis short?
>
> Alan Gauld
Yes, you're absolutely right.
Thanks.
Tommy
__
int(cols[2]),
int(cols[3]), int(cols[4]), int(cols[5]), int(cols[6]), int(cols[7]))
con.commit()
except:
con.rollback()
con.close()
Tommy Kaas
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Yes youre right!
Thanks,
Tommy
Fra: Jason Staudenmayer [mailto:jas...@adventureaquarium.com]
Sendt: 12. januar 2011 16:50
Til: Tommy Kaas; tutor@python.org
Emne: RE: [Tutor] how avoid writing a newline?
You should have a comma after the "#" in the highlighted print state
an I avoid that in a simple way?
Thanks in advance for any help
Tommy
from BeautifulSoup import BeautifulSoup
from mechanize import Browser
f = open("forbes.txt", "w")
br = Browser()
url =
"http://www.forbes.com/lists/2010/10/billionaires-2010_The-Worlds
.*'.format(name)
'.*Sir Arthur.*'
>>> '.*{name}.*'.format(name=name)
'.*Sir Arthur.*'
The last two examples are different ways to accomplish the same thing.
HTH,
Wayne
Thanks for the suggestion. Very useful.
Tommy
#x27;m using Python 2.6.6.
TIA
Tommy
import re
name = raw_input('Who would you like to check'? ')
mytxt = open("text.txt", "r")
antal = []
for line in mytxt:
if re.search("(.*)name(.*)", line):
antal.append(line)
0'}):
tds = row('td')
output = ";".join(tds[i].string for i in (0, 1, 2, 3, 4))
f.write(output + '\n')
f.close()
Tommy Kaas
Kaas & Mulvad
Lykkesholms Alle 2A, 3.
1902 Frederiksberg C
Mobil: 27268818
Mail: <
With Stevens help about writing and Peters help about import codecs - and when
I used \r\n instead of \r to give me new lines everything worked.
I just thought that \n would be necessary?
Thanks.
Tommy
> -Oprindelig meddelelse-
> Fra: tutor-bounces+tommy.kaas=kaasogmulvad...@pyth
ot;, line 36, in
f.write(output + '\n') # don't forget the newline after each row
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf8' in position
5: ordinal not in range(128)
I have tried to add # -*- coding: utf-8 -*- to the top of the
Kommunenr # Kommune # Region # Regionsnr
101 # København # Hovedstaden # 1084
147 # Frederiksberg # Hovedstaden # 1084
151 # Ballerup # Hovedstaden # 1084
153 # Brøndby # Hovedstaden # 1084
155 # Dragør # Hovedstaden # 1084
Thanks in advance
Tommy Kaas
Kaas & Mulvad
Thanks for the explanation. It's clearer now.
Tommy
"Tommy Kaas" wrote
> > > for row in soup('table', {'class' : 'spad'})[0].tbody('tr'):
> >
> >Do you understand the syntax from a Python point of view?
>
> No.
-Oprindelig meddelelse-
Fra: tutor-bounces+tommy.kaas=kaasogmulvad...@python.org
[mailto:tutor-bounces+tommy.kaas=kaasogmulvad...@python.org] På vegne af
Alan Gauld
Sendt: 28. juli 2010 20:00
Til: tutor@python.org
Emne: Re: [Tutor] Newbie question - syntax - BeautifulSoup
"Tommy
n't understand how I am supposed to the fourth line - after "for
row in soup". I can clearly see it defines the area I want to scrape, but
how is the syntax build? And almost as important - where should I have found
that information myself? I have tried to read the help-file of
Bea
25 matches
Mail list logo