473,786 Members | 2,849 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dictionary help

I'm currently working on a little database type program is which I'm
using a dictionary to store the information. The key is a component a and
the definition is a list of parts that make up the component. My problem
is I need to list out several components, but not all, and there
associated parts to a printer. Not having any luck. I can list them to
the screen but not the printer. Any help/ideas would be appreciated.

Steve
Oct 31 '07 #1
4 1081
Steve wrote:
I'm currently working on a little database type program is which I'm
using a dictionary to store the information. The key is a component a and
the definition is a list of parts that make up the component. My problem
is I need to list out several components, but not all, and there
associated parts to a printer. Not having any luck. I can list them to
the screen but not the printer. Any help/ideas would be appreciated.

Steve
Windows or Linux or Mac. Printers are handled differently on different
platforms. On Windows you can simply open LPT1, LPT2 or LPT3 as a file and
write to it (for simple printing). For more complex "Windows" printing you must
use Win32 extensions or something like wxWindows.

-Larry
Oct 31 '07 #2
On Wed, 31 Oct 2007 17:02:49 -0500, Larry Bates wrote:
Steve wrote:
>I'm currently working on a little database type program is which I'm
using a dictionary to store the information. The key is a component a
and the definition is a list of parts that make up the component. My
problem is I need to list out several components, but not all, and
there associated parts to a printer. Not having any luck. I can list
them to the screen but not the printer. Any help/ideas would be
appreciated.

Steve

Windows or Linux or Mac. Printers are handled differently on different
platforms. On Windows you can simply open LPT1, LPT2 or LPT3 as a file
and write to it (for simple printing). For more complex "Windows"
printing you must use Win32 extensions or something like wxWindows.

-Larry
I'm currently using Linux. I give it some more thought and research and
see what I can come up with. Thank you for the reply.

Steve
Nov 1 '07 #3
Steve wrote:
I'm currently working on a little database type program is which I'm
using a dictionary to store the information. The key is a component a and
the definition is a list of parts that make up the component. My problem
is I need to list out several components, but not all, and there
associated parts to a printer. Not having any luck. I can list them to
the screen but not the printer. Any help/ideas would be appreciated.

Steve
You can do os.system("<som e printing command; lp fn.txt, etc.>") after
putting your stuf in a file.
Nov 1 '07 #4
On Thu, 01 Nov 2007 04:16:10 -0700, wes weston wrote:
Steve wrote:
>I'm currently working on a little database type program is which I'm
using a dictionary to store the information. The key is a component a
and the definition is a list of parts that make up the component. My
problem is I need to list out several components, but not all, and
there associated parts to a printer. Not having any luck. I can list
them to the screen but not the printer. Any help/ideas would be
appreciated.

Steve

You can do os.system("<som e printing command; lp fn.txt, etc.>") after
putting your stuf in a file.
Thank you for the reply. I finally got it printing in Linux.

Steve
Nov 1 '07 #5

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

Similar topics

14
3190
by: Leif K-Brooks | last post by:
I need to associate a string (key) with an integer (value). A dictionary would do the job, except for the fact that it must be ordered. I also need to look up the value for a specific key easily, so a list of tuples wouldn't work.
1
1936
by: Djam | last post by:
Hi, I need your help to build a dictionary on mysal database to have an efficient keyword search engine. Thanks :-) Djam
2
15953
by: ESPNSTI | last post by:
Hi, I'm trying to use a generics dictionary with a key class that implements and needs IComparable<>. However when I attempt to use the dictionary, it doesn't appear to use the IComparable<> to find the key. In the example below, accessing the dictionary by using the exact key object that was used to add to the dictionary works. (see code comment 1). However, if I attempt to access the dictionary by using a key object that
2
3424
by: jg | last post by:
I was trying to get custom dictionary class that can store generic or string; So I started with the example given by the visual studio 2005 c# online help for simpledictionay object That seem to miss a few things including #endregion directive and the ending class } Is there not a simple way like in dotnet vb? I managed to get the sample to code to this:
1
9263
by: john wright | last post by:
I have a dictionary oject I created and I want to bind a listbox to it. I am including the code for the dictionary object. Here is the error I am getting: "System.Exception: Complex DataBinding accepts as a data source either an IList or an IListSource at System.Windows.Forms.ListControl.set_DataSource(Object value)
4
3393
by: Bill Woodruff | last post by:
< note : this message was sparked in part by comments by David Browne on a previous thread : "inserting an anonymous method as a value in a generic dictionary ?" : David had shown the use of 'Delegate as a valid Type declaration for the Value of a Generic Dictionary. I am curious as to why I can compile and use this syntax : it seems to me to violate the requirement that the Value of a Generic Dictionary be a Type Name.
8
13357
by: Brian L. Troutwine | last post by:
I've got a problem that I can't seem to get my head around and hoped somebody might help me out a bit: I've got a dictionary, A, that is arbitarily large and may contains ints, None and more dictionaries which themselves may contain ints, None and more dictionaries. Each of the sub-dictionaries is also arbitrarily large. When pretty printing A, in the context I'm using A for, it's rather helpful to remove all key:value pairs where value...
4
34163
by: O.B. | last post by:
I need the ability to parse through the values of a Dictionary and remove certain ones depending on their attribute values. In the example below, an InvalidOperationException is thrown in the foreach statement when the first item is removed from the Dictionary. From looking at Dictionary's methods, I couldn't find anything to create a copy of the Values before starting the foreach loop. Help? static void someTest() {
3
2214
by: JamesB | last post by:
I have a config screen in my app that updates a dictionary<key,value>. I want to store a copy of this before going into the config screen so if the user wants to cancel all their changes I can simply set the working copies to be the backup. So, in my code, before the config screen is shown, I do this: Dictionary<string, myClassTempDic = MainDic;
1
2278
by: sachin2 | last post by:
I am using 3 types of dictionaries. 1) Dictionary<string, string > d = new Dictionary<string, string>(); 2) Dictionary<string, List<string>> d = new Dictionary<string, List<string>>(); 3) Dictionary<string, Dictionary<string, string>> d = new Dictionary<string, Dictionary<string, string>>(); Now I am using GetDictionaryType Function where I an sending a dictionary object. In GetDictionaryType() I want to find out which dictionary...
0
10363
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
10164
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
10110
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
9961
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...
0
8989
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7512
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
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.