python-3.1

What is your wishlist for Python 3.2 (or Python 3.x)?

I've just read the What's New in Python 3.1 text (and I like many things). What's your idea of the thing that didn't go there but you would like to see in the future Python versions? ...

two conflicting meanings of builtins in python 3 (python 3.1, python 3k, python3000)

i just posted below query to comp.lang.python, but i feel this kind of question has some kind of right-of-way here on stackoverflow, too, so be it repeated. the essence: why does ‘builtins’ have two distinct interpretations in python 3?—here the details go: i would be very gladly accept any commentaries about what this sentence, gleaned...

telnetlib TypeError

I am modifying a python script to make changes en masse to a hand full of switches via telnet: import getpass import sys import telnetlib HOST = "192.168.1.1" user = input("Enter your remote account: ") password = getpass.getpass() tn = telnetlib.Telnet(HOST) tn.read_until("User Name: ") tn.write(user + "\n") if password: tn.read...

I am trying to use user-defined functions to print out an A out of stars, but i need help defining my function..help!!

def horizline(col): for col in range (col): print("*", end='') print() def vertline(rows, col): for rows in range (rows-2): print ("*", end='') for col in range (col-2): print(' ', end='') print("*") def functionA(width): horizline(width) vertline(width) horizline(widt...

I am trying to use user-defined functions to print out an T out of stars, but i need help shifting the vertical line from position HELP!

I know main() and other parts of the prog are missing, but please help def horizLine(col): for cols in range(col): print("*", end='') print() def line(col): #C,E,F,G,I,L,P,T for col in range(col//2): print("*", end='') print() def functionT(width): horizLine(width) line(width) enter wid...

How come string.maketrans does not work in Python 3.1?

I'm a Python newbie. How come this doesn't work in Python 3.1? from string import maketrans # Required to call maketrans function. intab = "aeiou" outtab = "12345" trantab = maketrans(intab, outtab) str = "this is string example....wow!!!"; print str.translate(trantab); When I executed the above code, I get the following instead:...

Reading data files in python 3.1

I am working on a project that is using data files from another program. My first attempt at reading the files was to open one of the files in binary mode, read the first 100 bytes and print the data to the terminal. I am not sure how to decipher the data that was displayed. The output that I got was: b'URES\x04\x00\x03\x00\x00\x00\x...

Python Date Modified Wrong For Some Files

Python 3.1.2 Windows XP SP3 I am running into a problem with some files and their timestamps in python. I have a bunch of files in a directory that I received from an external source. It's not every file I am having a problem with but for some files python is showing an hour difference from what explorer or cmd show in XP. I am specif...