473,406 Members | 2,956 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

controlling a qbasic program on a windows98 or example of rs-232 commanded through python

Hello,

Can python be installed on a win98 system ? if so, how do I control a
qbasic program from python ?

the qbasic program controls input to an RS-232 so I am enclined to
follow the win98 system + qbasic route in order to be quick, or I guess
the question could be, can I control a device through rs-232 from a
newer version of windows using python (actually for the last part of
the question I know this is feasible, but I 'd like to see an example,
any pointers ?)

Thanks for any insight,

Jake.

Jul 18 '05 #1
1 2328
se*******@gmail.com wrote:
Can python be installed on a win98 system ?
Yes. The Windows version of Python works on most versions of Windows
including Win98.
if so, how do I control a qbasic program from python ?
Given the rest of your posting, I would say "don't bother".
the qbasic program controls input to an RS-232 so I am enclined to
follow the win98 system + qbasic route in order to be quick, or I guess
the question could be, can I control a device through rs-232 from a
newer version of windows using python (actually for the last part of
the question I know this is feasible, but I 'd like to see an example,
any pointers ?)


Download PySerial and you'll easily be able to do this. There
are doubtless numerous examples you could find easily with
Google, but if you really want to look at an example of one
that is too complex to be of much use for basic learning purposes,
check this out: http://web.engcorp.com/main/projects/CavroCom .

There's a lot more here than just the serial port stuff, but it
*is* an example of working code that is in actual use, so
perhaps it's better in some ways than some snippets you might
find. Still, PySerial is pretty darn easy to use, so don't
waste too much time looking at the above project. The following
shows how to send data to a device using PySerial and receive
a reply:
import serial
s = serial.Serial('COM1')
s.timeout = 1
s.write('some command\r\n')
s.read(50) 'some reply\r\n'


It's about that easy...

-Peter
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: ulysses | last post by:
hi. I do a P2P program use PYQT nc . It work normally in win2000,winXP. But it cann't show Chinese textLabel in windows98. For show Chinese textLabel I need convert QString instance to...
4
by: Jeff Uchtman | last post by:
I am having trouble grasping this due to brain block or just lack of brain.. I and doing a CBool on 3 true or false. I need all 3 to answer true to display. If one or more are false it equals...
4
by: Dennis | last post by:
Hi, I suppose this post could fall under comp.os.linux/comp.os.unix as well, but I figured since my end goal was control from C++ code I figured this group might be the place to start. As the...
1
by: Seda Ozulku | last post by:
I don't have much information about .Net. May be it must be a silly question. I have Windows Application running at the server. I need to Access the program functions ( like at given time...
5
by: john | last post by:
Here is the short story of what i'm trying to do. I have a 4 sided case labeling printer setting out on one of our production lines. Now then i have a vb.net application that sends data to this...
54
by: bnp | last post by:
Hi, I took a test on C. there was an objective question for program output type. following is the program: main() { char ch; int i =2;
2
by: Wouter van Teijlingen | last post by:
Dear Readers, I was reading about how to control the COM and LPT port using VB .NET. I've found a lot of information, and it was very useful to me. I found an example program on the site of...
7
by: Danielle | last post by:
All - I was asked to work on a project converting some weather data. The program used to convert the data is written in Quick Basic. I am only a novice programmer and while I can see from the...
4
by: bc070200263 | last post by:
This is an Islamic law that Muslims should pay their Zakat with the rate of 2.5%, means in Rs 100 they should pay Rs 2.5 as Zakat amount. Write a simple program which asks from the user The total...
1
by: tiddwaylll | last post by:
Hi, I have a huge program written in old BASIC. In fact I don't really know what flavour its written in, looks like qbasic I think. I don't need to know what the program does, I just need to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.