Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: Wulf
  • Order by date
  1. Wulf

    Strange Problem

    Why does this work in the "Python Shell" but when I execute it in a script it doesn't work? day = time.strftime('%d', time.gmtime(time.time())) When I execute this in a script i get this error: Traceback(most recent call last): File "Myfile.py" day = time.strftime('%d'...
  2. Wulf

    Access to a MySQL database

    I tried to get access to a MySQL database like this: import MySQLdb db = MySQLdb.connect(db = 'mydb', user = 'user', passwd = 'password') I get this error: Traceback (most recent call last): File "Myfile.py", line 3, in ? db = MySQLdb.connect(db = 'mydb', user = 'user'...
  3. Wulf

    Is python able to work with MySQL databases?

    I've got a question. Is python able to work with a MySQL database? How can I access a MySQL database from python?
  4. Wulf

    Writing in a new file

    Thanks, it already works. Thanks for your help.
  5. Wulf

    Writing in a new file

    Thanks, this works. Another question. How can i write a newline at the end of the line to the file? I tried it like this: for key, value in table.items(): f1.write(str(key) + ':' + str(value)) f1.write('\n') But this doesn't work...
  6. Wulf

    Writing in a new file

    Your message was: Without looking at my notes, I think you are going to have to do something like: for x in table1 f1.write(table1[x]) or something along those lines. I tried this: for x in table1: f1.write(table1[x]) but this doesn't work. I get this error: Traceback (innermost...
  7. Wulf

    Creating a new file in Python

    This message was from me. I have forgotten to log in when I wrote this: This don't works (Visitor) I tried this: for x in table1...
  8. Wulf

    Creating a new file in Python

    Thanks. But now I have another problem. I've got a variable called "table1" in my program and i want to write the information of this variable to this new created file. This variable's type is a dictionary. I tried to write the information of "table1" into the file like...
  9. Wulf

    Creating a new file in Python

    I'm new to python and I've got a problem. In a python progamm I want to create a new file to write text into it. How can I create a new File in python? I've searched in the documentation but I found nothing. I've tried it with open and fopen but it didn't work. Can someone help me please?

Part and Inventory Search

Back
Top