473,770 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2346
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
2906
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 unicode(). But win98 didn't support unicode. Anyone can tell me how to convert unicode to any visibel codes in chinese windows system. Thanks.
4
1274
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 false. I tried this but after looking at it and reading some comment I agree its a statement not a function: <% Dim A, B, C 'As Integer Dim Check 'As Boolean A = rs("PetA")
4
4190
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 subject states, is it possible to control an xterm running on a linux desktop from another standalone program? For example, suppose I have program running inside an xterm on the desktop. From another piece of software I would like to be able to...
1
1514
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 program sends mail to customer or you can manually select customer and send it ) from web. Why web? I dont want to install client applications to the all user... And Clients dont have access to server via Terminal and because of th e the Server...
5
3358
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 printer using a RawPrinterHelper class that i found I believe in the msdn. the class works wonderfully when I send stright text data (in the correctly formated string that the sato printer requires.) but when i go to send a image nothing is...
54
4121
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
5160
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 Microsoft. You can find it overhere: http://www.microsoft.com/downloads/details.aspx?FamilyID=075318ca-e4f1-4846-912c-b4ed37a1578b&DisplayLang=en I did found a lot about the RS232 port on the Internet, but i haven't found the same amount of...
7
1716
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 .BAS file what is happening, I don't have the time bandwidth to rewrite the program in VB ..NET and I'm not sure it would do a proper conversion even if I did. The compiled QB program asks for three inputs... 1) source file location (string), 2)...
4
7346
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 amount and then it calculate and display the Zakat on this amount. For example the output should look like this. Output: Enter the total amount : 107675 Zakat on Amount 107675 is Rs. 2691.88
1
4374
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 run it. It runs perfectly fine on powerbasic DOS 3.0 . But I dont have powerbasic and I dont want to buy it either. But I do have MS Visual Studio .NET 2008. And I created a console application, which pointed out to a multitude of errors. Most...
0
9617
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10257
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10099
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10037
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9904
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7456
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.