Is it possible to keep writing the output of a program on the same line instead of moving to a new line every time? The output should be written over the preceding output. An example would be a kind of counter... say a number that counts from 1 to 10 ... The normal output of a while loop would be 1 2 3 4 5 etc.. What I want is something that will display 1.. erase it and then display 2.. erase that and display 3 and so on..

Member Avatar
Member Avatar
+0 forum 14

Hello everyone I'm using python 3.1 and am trying to use the pyserial library. However, when I try something like ser.write('hello'), I get a type error. [CODE]>>> import serial >>> ser = serial.Serial('COM13') >>> ser.write('a') Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> ser.write('a') File "C:\Program Files\Python31\lib\site-packages\serial\serialwin32.py", line 249, in write data = bytes(data) TypeError: string argument without an encoding[/CODE] how do I fix this? And is it normal to get this error? Most tutorials use the same format for the commands and don't get any error.

Member Avatar
Member Avatar
+0 forum 2

hi guys. can anyone tell me why this code doesn't work? It doesn't raise any error but neither does it provide the expected results. [CODE] my_list= ['a','b'] class my_class: def __init__ (self): self.name = ' my name is hi' for a in my_list; a = my_class() [/CODE] a.name() gives and error.

Member Avatar
Member Avatar
+0 forum 5

Hi. I want to try and control a Servo motor directly from a USB port. (without using an intermediate microcontroller). To do this, I need to send pulse width modulation signals on one (or more) wires of the USB cable. Is it possible to do this with python? (I found a library called pyserial but I can't figure out how to use it)

Member Avatar
Member Avatar
+0 forum 4

I seem to have a problem with my acer LCD screen. I didn't notice this before, but when the contrast settings of the monitor are increased, the left vertical edges of letters seem to have a purple tinge. This is especially noticeable where there are double L's or double I s. I have clear type enabled and I also ran MSs Clear type tuning tool to no avail. Do you guys know what can be causing the problem? Thanks.

Member Avatar
Member Avatar
+0 forum 3

I have a new PC which I've been using for about 9 months with windows XP. However, since of late, the time it takes to load all the startup programs has become quite long.. i.e the time between when I click the login icon and when the system actually becomes usable after loading all the startup programs. I haven't installed any new software recently, that is, before I noticed an increase in startup time so I don't want to delete any startup programs. Could it be something like temporary internet files?

Member Avatar
Member Avatar
+0 forum 4

I bought a graphics card a few years ago and recently my monitor developed a habit of not showing the display. Remobing and reconnecting the monitor cable a few times solves the problem. So yesterday, this happened again and I decided to temporarily switch to the on-board display adapter. After that, when I boot up the computer, everything displays correctly up to the point where windows boots up. I use XP and I see the blue progress bar loading and then the monitor displays the message saying "WArning, Signal our of range" the screen starts to flicker terribly. Now, by …

Member Avatar
Member Avatar
+0 forum 2

What are these standard streams and how do they work? Are they just like normal files where one program writes to the file and another reads from it? If so, how can two programs access the same file at once?

Member Avatar
Member Avatar
+0 forum 6

I"m trying to make a [URL="en.wikipedia.org/wiki/Sudoku"]sudoku[/URL] puzzle generator (or at least the basics of one) for my project. I'm approaching this by dividing the sudoku grid into 9 rows. Each of the rows will be represented by a list and each list will have 9 elements to represent the nine squares that the row is made up of. Now, I could go ahead and make 9 list (for each of the 9 rows) manually by doing row_one = [] rwo_two = [] two_three = [] etc. but I feel that there must be a better way to do this. So, …

Member Avatar
Member Avatar
+0 forum 15

is it possible, for example, to make the text that appears as output on the command line appear in a certain colour using python?

Member Avatar
Member Avatar
+0 forum 4

Hi.. I have posted another thread about my broken PC. I'm having trouble identifying the BIOS version that was installed on it. The BIOS chip on the mother board says it is a phoenix BIOS(there is a holographic label which says phoenix.). Does this mean that the BIOS software is also by Phoenix?

Member Avatar
Member Avatar
+0 forum 1

How do I copy folders using python? Shutil.copy doesn't work. it raises a permission denied error in windows

Member Avatar
Member Avatar
+0 forum 7

Hi.. recently my old PC went bust. I don't know if it's relevant but just before I switched off the PC for the last time, I remembered there was a CD inside and opened the drive. However, before I could close the drive, the PC shut down. The next time I started up the PC, the tray went back in but then... I got nothing. No boot up screen.. no signal to the monitor. I just get repetitive , rapid beeps coming from the internal speaker. (the tiny one on the mother board. It sounds something like morse code but …

Member Avatar
Member Avatar
+0 forum 4

What is a process in computer science? I've tried googling but there were no useful results. I seem to recall that an application may consist of multiple "processes" but that's all I know.

Member Avatar
Member Avatar
+0 forum 5

How can I make a program wait for a few seconds before proceeding? An example of where this would come in handy is when the program allows the user 5 seconds before it proceeds with some default option... can I do this using python?

Member Avatar
Member Avatar
+0 forum 9

I got this from the python docuemtation. date2 = date1 + timedelta --->date2 is timedelta.days days removed from date1. (1) date2 = date1 - timedelta---> Computes date2 such that date2 + timedelta == date1. (2) timedelta is an object representing a time [I]difference[/I] and a date object represent a certain point in time. How can you just add (as in use the + operator) two objects of different types together? (it works correctly but I want to know how this is possible.)

Member Avatar
Member Avatar
+0 forum 2

how can I check the difference between two dates using the datetime modules? (or any other module that would do the same thing). I want to read a date from a file (which was written in the same format as the datetime module uses) and then calculate the difference in days between that date and today.

Member Avatar
Member Avatar
+0 forum 5

Is there someway I can parse badly written HTML code in python? I want to get some info from a web page which uses HTML tables for it's formatting and I found numerous flaws in the code using w3cs validator. can I parse this code in python?

Member Avatar
Member Avatar
+0 forum 3

How can I make windows execute a python script when a flash drive is plugged into the computer? Is there a way to do this with python or do I have to use windows?

Member Avatar
Member Avatar
+0 forum 19

[I]Occasionally[/I], when I boot up windows, it doesn't detect my USB mouse. All I have to do is unplug and then replug the mouse and it works again but it's pretty annoying and I want to find out what exactly the problem is. Its not like mouse [I]input[/I] is not detected... the USB just doesn't send power to the mouse. The red light inside the mouse doesn't show up.

Member Avatar
Member Avatar
+0 forum 7

I was using the datetime module for the first time today. When I typed [CODE]now = datetime.date.today() now [/CODE] I got the output [CODE] datetime.date(2009, 12, 27) [/CODE] Now, I found out that [CODE]datetime.date[/CODE] is a class and that[CODE] datetime.date.today[/CODE] is a method. But I can't figure out what the output means. First it gives the class datetime.date followed by what seems to be the parameters of an object of class datetime.date. "(2009, 12, 27)" What kind of method would output the class and the parameters of one of it's objects like this? I'd appreciate an example. Here's what I …

Member Avatar
Member Avatar
+0 forum 5

What does BIOS do on modern PCs after the operating system is loaded and running?

Member Avatar
Member Avatar
+0 forum 2

Would it be of interest to learn C or C++ if one already know python? I'm a linux and programming enthusiast (i.e hobbyist ;-) ) and C is pretty common on linux and many other applications. But is it worthwhile learning C if I already know python? What are the advantages C has over python?

Member Avatar
Member Avatar
+0 forum 9

Is there a way to get the date a file or folder was last modified into python?

Member Avatar
Member Avatar
+0 forum 3

What is compiling? (I'm trying to install a tarball on my linux machine). For programming, I use python so I haven't really come across compiling a program.

Member Avatar
Member Avatar
-1 forum 1

I'm having trouble understanding the concept of an API. Could someone please explain what exactly and API does? A simple code example (if that's possible with this subject) would be really useful and much appreciated.

Member Avatar
Member Avatar
+0 forum 7

I've been trying to read up about how tkinter (or more accurately Tk) works on windows AND linux. Here's what I've understood so far. Tk is a predefined set of widgets. That is stuff like text boxes, check boxes, drop down lists etc. Tkinter is just a way of translating Tk commands into python. (please correct me if I'm wrong). So how, then, does Tk manage to provide windows which look 'native' for the different operating systems? For example, if I draw a window with a simple button in linux, it will look just like any other button in the …

Member Avatar
Member Avatar
+0 forum 14

What is an abstraction layer in computer science? I've already read (or tried to read) the wikipedia article and I couldn't understand anything.

Member Avatar
Member Avatar
+0 forum 6

How do kernels work on different systems when hardware can be so different? For example, how would the kernel work when the graphics card of a PC is changed?

Member Avatar
Member Avatar
+0 forum 3

I was just reading about the different types of cables used to connect components of computers. When it comes to serial ports and parallel ports, parallel ports are faster because they send several bits of data simultaneously. Therefore, it should follow that parallel ATA is faster than Serial ATA. However, that's not the case. Why is this?

Member Avatar
Member Avatar
+0 forum 7

The End.