Wxpython 2 8 Application Development Cookbook First Edition Cody Precord Instant Download
Wxpython 2 8 Application Development Cookbook First Edition Cody Precord Instant Download
https://ebookultra.com/download/wxpython-2-8-application-
development-cookbook-first-edition-cody-precord/
https://ebookultra.com/download/javafx-1-2-application-development-
cookbook-1st-edition-vladimir-vivien/
https://ebookultra.com/download/java-2-micro-edition-application-
development-michael-kroll/
https://ebookultra.com/download/wordpress-2-8-themes-cookbook-1st-new-
edition-edition-nick-ohrn/
https://ebookultra.com/download/windows-8-application-development-
with-html5-for-dummies-1st-edition-bill-sempf/
Professional Android 2 Application Development 1st Edition
Reto Meier
https://ebookultra.com/download/professional-android-2-application-
development-1st-edition-reto-meier/
https://ebookultra.com/download/professional-windows-8-programming-
application-development-with-c-and-xaml-1st-edition-nick-lecrenski/
https://ebookultra.com/download/wordpress-2-8-theme-design-first-
edition-tessa-blakeley-silver/
https://ebookultra.com/download/opencv-computer-vision-application-
programming-cookbook-2nd-edition-robert-laganiere/
wxPython 2 8 Application Development Cookbook First
Edition Cody Precord Digital Instant Download
Author(s): Cody Precord
ISBN(s): 9781849511780, 1849511780
Edition: first
File Details: PDF, 4.28 MB
Year: 2010
Language: english
wxPython 2.8
Application Development Cookbook
Cody Precord
BIRMINGHAM - MUMBAI
wxPython 2.8
Application Development Cookbook
All rights reserved. No part of this book may be reproduced, stored in a retrieval system,
or transmitted in any form or by any means, without the prior written permission of the
publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the
information presented. However, the information contained in this book is sold without
warranty, either express or implied. Neither the author, nor Packt Publishing, and its
dealers and distributors will be held liable for any damages caused or alleged to be
caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
ISBN 978-1-849511-78-0
www.packtpub.com
Proofreader
Acquisition Editor
Dirk Manuel
Steven Wilding
Graphics
Development Editor
Nilesh Mohite
Maitreya Bhakal
Production Coordinator
Technical Editor
Aparna Bhagat
Conrad Sardinha
Cover Work
Indexers
Aparna Bhagat
Tejal Daruwale
Rekha Nair
About the Author
Cody Precord is a Software Engineer based in Minneapolis, MN, USA. He has been
designing and writing systems and application software for AIX, Linux, Windows, and
Macintosh OS X for the last ten years using primarily C, C++, Perl, Bash, Korn Shell, and
Python. The constant need of working on multiple platforms naturally led Cody to the
wxPython toolkit, which he has been using intensely for that last five years. Cody has been
primarily using wxPython for his open source project, Editra, which is a cross-platform
development tool. He is interested in promoting cross-platform development practices
and improving usability in software.
wxPython 2.8
Application Development Cookbook
Cody Precord
BIRMINGHAM - MUMBAI
wxPython 2.8
Application Development Cookbook
All rights reserved. No part of this book may be reproduced, stored in a retrieval system,
or transmitted in any form or by any means, without the prior written permission of the
publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the
information presented. However, the information contained in this book is sold without
warranty, either express or implied. Neither the author, nor Packt Publishing, and its
dealers and distributors will be held liable for any damages caused or alleged to be
caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
ISBN 978-1-849511-78-0
www.packtpub.com
Proofreader
Acquisition Editor
Dirk Manuel
Steven Wilding
Graphics
Development Editor
Nilesh Mohite
Maitreya Bhakal
Production Coordinator
Technical Editor
Aparna Bhagat
Conrad Sardinha
Cover Work
Indexers
Aparna Bhagat
Tejal Daruwale
Rekha Nair
About the Author
Cody Precord is a Software Engineer based in Minneapolis, MN, USA. He has been
designing and writing systems and application software for AIX, Linux, Windows, and
Macintosh OS X for the last ten years using primarily C, C++, Perl, Bash, Korn Shell, and
Python. The constant need of working on multiple platforms naturally led Cody to the
wxPython toolkit, which he has been using intensely for that last five years. Cody has been
primarily using wxPython for his open source project, Editra, which is a cross-platform
development tool. He is interested in promoting cross-platform development practices
and improving usability in software.
About the Reviewers
Steve McMahon is a Python and Plone developer located in Davis, California. His
company, Reid-McMahon, LLC specializes in developing Content Management Systems
for non-profit organizations. He’s been involved in many aspects of the Plone project,
including training and core, installer, and add-on development.
Jeff McNeil cut his teeth during the Internet boom, being one of the first employees at
one of the larger web-hosting shops. He’s done just about everything from server installs
to platform development and software architecture. Technical interests include systems
management and doing things Pythonically. Jeff recently joined Google.
Chukwudi Nwachukwu, aka Chux, studied Computer Science at Olabisi Onabanjo
University, Nigeria. He has, over the years, worked on both Windows and Linux operating
systems. Programming is fun. He had to join the programming wagon because
programmers are known to solve problems by making computers do things that they
visualize in their minds. He programs in over a dozen languages such as Processing, D,
Python, and so on. He loves to travel, discover new places, meet interesting people, and
learn new human languages too. You can reach him on [email protected].
He has worked on Java CourseWare, an in-house Java textbook for teaching students.
Did you know that Packt offers eBook versions of every book published, with PDF and
ePub files available? You can upgrade to the eBook version at www.PacktPub.com and
as a print book customer, you are entitled to a discount on the eBook copy. Get in touch
with us at [email protected] for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up
for a range of free newsletters and receive exclusive discounts and offers on Packt books
and eBooks.
http://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt’s online digital book
library. Here, you can access, read and search across Packt’s entire library of books.
Why Subscribe?
Fully searchable across every book published by Packt
Copy and paste, print and bookmark content
On demand and accessible via web browser
ii
Table of Contents
iii
Table of Contents
Threading tools 241
Using Timers 246
Capturing output 249
Chapter 12: Building and Managing Applications for Distribution 255
Introduction 255
Working with StandardPaths 256
Persisting the state of the UI 258
Using the SingleInstanceChecker 260
Exception handling 265
Optimizing for OS X 266
Supporting internationalization 269
Distributing an application 273
Index 279
iv
Preface
In today's world of desktop applications, there is a great amount of incentive to be able
to develop applications that can run in more than one environment. Currently, there are a
handful of options available for cross-platform frameworks to develop desktop applications in
Python. wxPython is one such cross-platform GUI toolkit for the Python programming language.
It allows Python programmers to create programs with a complete, highly-functional graphical
user interface, simply and easily. wxPython code style has changed quite a bit over the years,
and has become much more Pythonic. The examples that you will find in this book are fully
up-to-date and reflect this change in style. This cookbook provides you with the latest recipes
to quickly create robust, reliable, and reusable wxPython applications. These recipes will guide
you from writing simple, basic wxPython scripts all the way through complex concepts, and
also feature various design approaches and techniques in wxPython.
This book starts off by covering a variety of topics, from the most basic requirements of
a wxPython application, to some of the more in-depth details of the inner workings of
the framework, laying the foundation for any wxPython application. It then explains event
handling, basic and advanced user interface controls, interface design and layout, creating
dialogs, components, extending functionality, and so on. We conclude by learning how to build
and manage applications for distribution.
For each of the recipes, there is an introductory example, then more advanced examples,
along with plenty of example code that shows how to develop and manage user-friendly
applications. For more experienced developers, most recipes also include an additional
discussion of the solution, allowing you to further customize and enhance the component.
Chapter 2, Responding to Events, shows how to make use of events to drive an application
and allow the user to interact with it through the user interface. This chapter starts with
an overview of what events are and how they work, and then continues on to cover how to
interact with a number of common events.
Chapter 3, Basic Building Blocks of a User Interface, discusses a number of the basic widgets
that are critical to the creation of nearly all user interfaces. You will be introduced to the usage
of widgets such as Buttons, Menus, and ToolBars in this chapter.
Chapter 4, Advanced Building Blocks of a User Interface, introduces you to some of the more
advanced widgets available in the wxPython control library. These widgets will allow you to
create tabbed interfaces and display more complex types of data in your user interface.
Chapter 5, Providing Information and Alerting Users, shows multiple techniques for keeping
the users of an application informed about what is going on and to provide them with help on
interacting with the various controls in the applications interface. This chapter will show you
how to use various tooltip controls, message boxes, and splash screens.
Chapter 6, Retrieving Information from Users, covers the use of common dialogs to retrieve
information from users in order to perform tasks such as opening files, searching text, and
even printing. As a part of the recipes for the usage of FileDialog and FindDialogs
you will create a simple Notepad-like application.
Chapter 7, Window Layout and Design, is where you will be introduced to a number of
concepts and techniques for designing your user interfaces in wxPython. The majority of
this chapter will explain the use of Sizers to allow you to quickly implement cross-platform
user interfaces.
Chapter 8, Drawing to the Screen, gives an introduction to the basics of how a user interface
works, by showing you how to use some of the primitive tools to implement your own custom
user interface objects. This chapter will show you how to use Device Contexts to perform
custom drawing routines by creating a number of custom display controls.
Chapter 10, Creating Components and Extending Functionality, shows you how to extend
the functionality of existing user interface components, as well as how to create your own
controls. The recipes in this chapter combine much of the information presented in Chapters
2, 7, 8, and 9 together to create new controls and to enhance the capabilities of some of the
more basic ones provided by wxPython.
Preface
Chapter 11, Using Threads and Timers to Create Responsive Interfaces, dives into the
world of concurrent programming. This chapter shows you how to create multi-threaded
applications, and covers the special care that is needed when interacting with the user
interface from worker threads in order to create stable and responsive interfaces.
Chapter 12, Building and Managing Applications for Distribution, concludes the tour of
the wxPython framework by introducing you to some useful recipes for bolstering the
infrastructure of any application that will be distributed to end users. This includes how to
store configuration information, exception handling, internationalization, and how to create
and distribute stand-alone binaries of your application.
This book is primarily written for Python 2.5/2.6 and wxPython 2.8, although the content of
the book also directly applies to later versions of wxPython as well. The suggested software
to install is as follows:
Conventions
In this book, you will find a number of styles of text that distinguish between different kinds of
information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "The App object also maintains the MainLoop, which
is used to drive a wxPython application".
Other documents randomly have
different content
It was not in the house only of Mrs. Cibber that he met this
impressive and piety-inspiring painter of Nature, alike in her rural
beauties and her elemental sublimities: the young musician had the
advantage of setting to music a part of the mask of Alfred,[4] which
brought him into close contact with the author, and rivetted good
will on one side by high admiration on the other.
With various persons, renowned or interesting, of the same set, who
were gaily basking, at this period, in the smiles of popular sunshine,
the subject of these memoirs daily mixed; but, unfortunately, not a
memorandum of their intercourse has he left, beyond their names.
Mrs. Cibber herself he considered as a pattern of perfection in the
tragic art, from her magnetizing powers of harrowing and winning at
once every feeling of the mind, by the eloquent sensibility with
which she portrayed, or, rather, personified, Tenderness, Grief,
Horror, or Distraction.
KIT SMART.
With a different set, and at a different part of the town, young
Burney formed an intimacy with Kit Smart, the poet; a man then in
equal possession of those finest ingredients for the higher call of his
art, fire and fancy, and, for its comic call, of sport and waggery. No
indication, however, of such possession was granted to his
appearance; not a grace was bestowed on his person or manners;
and his physiognomy was of that round and stubbed form that
seemed appertaining to a common dealer behind a common counter,
rather than to a votary of the Muses. But his intellects, unhappily,
were more brilliant than sound; and his poetic turn, though it never
warped his sentiments or his heart, was little calculated to fortify his
judgment.
DOCTOR ARMSTRONG.
And, at this same epoch, the subject of these memoirs began also
an intercourse with the celebrated Dr. Armstrong, as high, then, in
the theory of his art, medicine, as he was far from lucratively
prosperous in its practice. He had produced upon it a didactic poem,
“The Art of Preserving Health,” which young Burney considered to be
as nervous in diction as it was enlightening in precept. But Dr.
Armstrong, though he came from a part of the island whence
travellers are by no means proverbially smitten with the reproach of
coming in vain; nor often stigmatized with either meriting or being
addicted to failure, possessed not the personal skill usually accorded
to his countrymen, of adroitness in bringing himself forward. Yet he
was as gaily amiable as he was eminently learned; and though, from
a keen moral sense of right, he was a satirist, he was so free from
malevolence, that the smile with which he uttered a remark the most
ironical, had a cast of good-humoured pleasantry that nearly turned
his sarcasm into simple sport.
“Miss Molly Carter, in her youth a very pretty girl, was, in the year 1745, of
a large party of young ladies, consisting of five or six Miss Gores, and Miss
Anderson, at William Thompson’s Esq., in the neighbourhood of Elsham,
near Brig. Bob Thompson, Mr. Thompson’s brother, Billy Le Grand, and
myself, composed the rest of the set, which was employed in nothing but
singing, dancing, romping, and visiting, the whole time I was there; which
time was never surpassed in hilarity at any place where I have been
received in my life.”
QUEEN MAB.
Neither pleasure, however, nor literary pursuits, led young Burney to
neglect the cultivation of his musical talents. The mask of Alfred was
by no means his sole juvenile composition: he set to music the
principal airs in the English burletta called Robin Hood, which was
most flatteringly received at the theatre; and he composed the
whole of the music of the pantomime of Queen Mab.
He observed at this time the strictest incognito concerning all these
productions, though no motive for it is found amongst his papers;
nor does there remain any recollective explanation.
With regard to Queen Mab, it excited peculiar remark, from the
extraordinary success of that diverting pantomime; for when the
uncertainties of the representation were over, there was every
stimulus to avowal that could urge a young author to come forward;
not with adventurous boldness, nor yet with trembling timidity, but
with the frank delight of unequivocal success.
Queen Mab had a run which, to that time, had never been equalled,
save by the opening of the Beggar’s Opera; and which has not since
been surpassed, save by the representation of the Duenna.
Its music, pleasing and natural, was soon so popular, that it was
taught to all young ladies, set to all barrel organs, and played at all
familiar music parties. It aimed not at Italian refinement, nor at
German science; but its sprightly melody, and utter freedom from
vulgarity, made its way even with John Bull, who, while following the
hairbreadth agility of Harlequin, the skittish coquetries of Columbine,
and the merry dole of the disasters of the Clown and Pantaloon,
found himself insensibly caught, and unconsciously beguiled into
ameliorated musical taste.
In the present day, when English singers sometimes rise to the
Italian opera, and when Italian singers are sometimes invited to the
English, the music of Queen Mab could be received but in common
with the feats of its pantomime; so rapidly has taste advanced, and
so generally have foreign improvements become nearly indigenous.
To give its due to merit, and its rights to invention, we must always
go back to their origin, and judge them, not by any comparison with
what has followed them, but by what they met when they first
started, and by what they were preceded.
Why, when success was thus ascertained, the name of the composer
was concealed, leaving him thus singularly as unknown as he was
popular, may the more be regretted, as his disposition, though
chiefly domestic, was not of that effeminately sensitive cast that
shrinks from the world’s notice with a dread of publicity. His mind,
on the contrary, belonged to his sex; and was eminently formed to
expand with that manly ambition, which opens the portals of hope to
the attainment of independence, through intellectual honours.
The music, when printed, made its appearance in the world as the
offspring of a society of the sons of Apollo: and Oswald, a famous
bookseller, published it by that title, and knew nothing of its real
parentage.[5]
Sundry airs, ballads, cantatas, and other light musical productions,
were put forth also, as from that imaginary society; but all sprang
from the same source, and all were equally unacknowledged.
The sole conjecture to be formed upon a self-denial, to which no
virtue seems attached; and from which reason withdraws its
sanction, as tending to counteract the just balance between merit
and recompense, is, that possibly the articles then in force with Dr.
Arne, might disfranchise young Burney from the liberty of publication
in his own name.
EARL OF HOLDERNESSE.
The first musical work by the subject of these memoirs that he
openly avowed, was a set of six sonatas for two violins and a bass,
printed in 1747, and dedicated to the Earl of Holdernesse; to whose
notice the author had been presented by some of the titled friends
and protectors to whom he had become accidentally known.
The Earl not only accepted with pleasure the music and the
dedication, but conceived a regard for the young composer, that
soon passed from his talents to his person and character. Many
notes of Lord Holdernesse still remain of kind engagements for
meetings, even after his time was under the royal, though
honourable restraint, of being governor of the heir apparent.[6] That
high, and nearly exclusive occupation, lessened not the favour which
his lordship had had the taste and discernment to display so early
for a young man whom, afterwards, with pleasure, if not with pride,
he must have seen rise to equal and general favour in the world.
At Holdernesse House,[7] the fine mansion of this earl, young Burney
began an acquaintance, which in after years ripened into intimacy,
with Mr. Mason, the poet, who was his lordship’s chaplain.
FULK GREVILLE.
While connexions thus various, literary, classical, noble, and
professional, incidentally occurred, combatting the deadening toil of
the copyist, and keeping his mind in tune for intellectual pursuits
and attainments, new scenes, most unexpectedly, opened to him the
world at large, and suddenly brought him to a familiar acquaintance
with high life.
Fulk Greville, a descendant of The Friend of Sir Philip Sydney, and
afterwards author of Characters, Maxims, and Reflections, was then
generally looked up to as the finest gentleman about town. His
person, tall and well-proportioned, was commanding; his face,
features, and complexion, were striking for masculine beauty; and
his air and carriage were noble with conscious dignity.
He was then in the towering pride of healthy manhood and athletic
strength. He excelled in all the fashionable exercises, riding, fencing,
hunting, shooting at a mark, dancing, tennis, &c.; and worked at
every one of them with a fury for pre-eminence, not equalled,
perhaps, in ardour for superiority in personal accomplishments, since
the days of the chivalrous Lord Herbert of Cherbury.
His high birth, and higher expectation—for a coronet at that time,
from some uncertain right of heritage, hung almost suspended over
his head—with a splendid fortune, wholly unfettered, already in his
hands, gave to him a consequence in the circles of modish
dissipation that, at the clubs of St. James’s-street, and on the race
ground at Newmarket, nearly crowned him as chief. For though
there were many competitors of more titled importance, and more
powerful wealth, neither the blaze of their heraldry, nor the weight
of their gold, could preponderate, in the buckish scales of the day,
over the elegance of equipment, the grandeur, yet attraction of
demeanour, the supercilious brow, and the resplendent smile, that
marked the lofty yet graceful descendant of Sir Philip Sydney.
This gentleman one morning, while trying a new instrument at the
house of Kirkman, the first harpsichord maker of the times,
expressed a wish to receive musical instruction from some one who
had mind and cultivation, as well as finger and ear; lamenting, with
strong contempt, that, in the musical tribe, the two latter were
generally dislocated from the two former; and gravely asking
Kirkman whether he knew any young musician who was fit company
for a gentleman.
Kirkman, with honest zeal to stand up for the credit of the art by
which he prospered, and which he held to be insulted by this
question, warmly answered that he knew many; but, very
particularly, one member of the harmonic corps, who had as much
music in his tongue as in his hands, and who was as fit company for
a prince as for an orchestra.
Mr. Greville, with much surprise, made sundry and formal inquiries
into the existence, situation, and character of what he called so
great a phenomenon; protesting there was nothing he so much
desired as the extraordinary circumstance of finding any union of
sense with sound.
The replies of the good German were so exciting, as well as
satisfactory, that Mr. Greville became eager to see the youth thus
extolled; but charged Mr. Kirkman not to betray a word of what had
passed, that the interview might be free from restraint, and seem to
be arranged merely for shewing off the several instruments that
were ready for sale, to a gentleman who was disposed to purchase
one of the most costly.
To this injunction Mr. Kirkman agreed, and conscientiously adhered.
A day was appointed, and the meeting took place.
Young Burney, with no other idea than that of serving Kirkman,
immediately seated himself at an instrument, and played various
pieces of Geminiani, Corelli, and Tartini, whose compositions were
then most in fashion. But Mr. Greville, secretly suspicious of some
connivance, coldly and proudly walked about the room; took snuff
from a finely enamelled snuff-box, and looked at some prints, as if
wholly without noticing the performance.
He had, however, too much penetration not to perceive his mistake,
when he remarked the incautious carelessness with which his
inattention was returned; for soon, conceiving himself to be playing
to very obtuse ears, young Burney left off all attempt at soliciting
their favour; and only sought his own amusement by trying favourite
passages, or practising difficult ones, with a vivacity which shewed
that his passion for his art rewarded him in itself for his exertions.
But coming, at length, to keys of which the touch, light and
springing, invited his stay, he fired away in a sonata of Scarlatti’s,
with an alternate excellence of execution and expression, so
perfectly in accord with the fanciful flights of that wild but masterly
composer, that Mr. Greville, satisfied no scheme was at work to
surprise or to win him; but, on the contrary, that the energy of
genius was let loose upon itself, and enjoying, without
premeditation, its own lively sports and vagaries; softly drew a chair
to the harpsichord, and listened, with unaffected earnestness, to
every note.
Nor were his ears alone curiously awakened; his eyes were equally
occupied to mark the peculiar performance of intricate difficulties;
for the young musician had invented a mode of adding neatness to
brilliancy, by curving the fingers, and rounding the hand, in a
manner that gave them a grace upon the keys quite new at that
time, and entirely of his own devising.
To be easily pleased, however, or to make acknowledgment of being
pleased at all, seems derogatory to strong self-importance; Mr.
Greville, therefore, merely said, “You are fond, Sir, it seems, of
Italian music?”
The reply to this was striking up, with all the varying undulations of
the crescendo, the diminuendo, the pealing swell, and the “dying,
dying fall,” belonging to the powers of the pedal, that most popular
masterpiece of Handel’s, the Coronation Anthem.
This quickness of comprehension, in turning from Italian to German,
joined to the grandeur of the composition, and the talents of the
performer, now irresistibly vanquished Mr. Greville; who, convinced
of Kirkman’s truth with regard to the harmonic powers of this son of
Apollo, desired next to sift it with regard to the wit.
Casting off, therefore, his high reserve, with his jealous surmises, he
ceased to listen to the music, and started some theme that was
meant to lead to conversation.
But as this essay, from not knowing to what the youth might be
equal, consisted of such inquiries as, “Have you been in town long,
Sir?” or, “Does your taste call you back to the country, Sir?” &c. &c.,
his young hearer, by no means preferring this inquisitorial style to
the fancy of Scarlatti, or the skill and depth of Handel, slightly
answered, “Yes, Sir,” or “No, Sir;” and, perceiving an instrument not
yet tried, darted to it precipitately, and seated himself to play a
voluntary.
The charm of genuine simplicity is nowhere more powerful than with
the practised and hackneyed man of the world; for it induces what,
of all things, he most rarely experiences, a belief in sincerity.
Mr. Greville, therefore, though thwarted, was not displeased; for in a
votary of the art he was pursuing, he saw a character full of talents,
yet without guile; and conceived, from that moment, an idea that it
was one he might personally attach. He remitted, therefore, to some
other opportunity, a further internal investigation.
Mr. Kirkman now came forward to announce, that in the following
week he should have a new harpsichord, with double keys, and a
deepened bass, ready for examination.
They then parted, without any explanation on the side of Mr.
Greville; or any idea on that of the subject of these memoirs, that he
and his acquirements were objects of so peculiar a speculation.
At the second interview, young Burney innocently and eagerly flew
at once to the harpsichord, and tried it with various recollections
from his favourite composers.
Mr. Greville listened complacently and approvingly; but, at the end of
every strain, made a speech that he intended should lead to some
discussion.
Young Burney, however, more alive to the graces of melody than to
the subtleties of argument, gave answers that always finished with
full-toned chords, which as constantly modulated into another
movement; till Mr. Greville, tired and impatient, suddenly proposed
changing places, and trying the instrument himself.
He could not have devised a more infallible expedient to provoke
conversation; for he thrummed his own chosen bits by memory with
so little skill or taste, yet with a pertinacity so wearisome, that young
Burney, who could neither hearken to such playing, nor turn aside
from such a player, caught with alacrity at every opening to
discourse, as an acquittal from the fatigue of mock attention.
This eagerness gave a piquancy to what he said, that stole from him
the diffidence that might otherwise have hung upon his
inexperience; and endued him with a courage for uttering his
opinions, that might else have faded away under the trammels of
distant respect.
Mr. Greville, however, was really superior to the mawkish parade of
unnecessary etiquette in private circles, where no dignity can be
offended, and no grandeur be let down by suffering nature, wit, or
accident to take their bent, and run their race, unfettered by
punctilio.
Yet was he the last of men to have borne any designed infringement
upon the long established claims of birth, rank, or situation; which,
in fact, is rarely practised but to lead to a succession of changes,
that circulate, like the names written in a round robin, to end just
where they began;—
“Such chaos, where degree is suffocate,
GAMING CLUBS.
The consequence of this taste for his society carried young Burney
into every scene of high dissipation which, at that period, made the
round of the existence of a buckish fine gentleman; and he was
continually of the party at White’s, at Brookes’s, and at every other
superfine club house, whether public or private, to which the
dangerous allurement of gaming, or the scarcely less so of being à la
mode, tempted his fashionable patron.
As Mr. Greville uniformly, whether at cards, dice, or betting, played
with Honour, his success, of course, was precarious; but as he never
was so splendidly prosperous as to suffer himself to be beguiled out
of all caution; nor yet so frequently unfortunate as to be rendered
desperate, he was rarely distressed, though now and then he might
be embarrassed.
At these clubs, the subject of these memoirs witnessed scenes that
were ever after rivetted on his memory. Cards, betting, dice, opened
every nocturnal orgie with an éclat of expectation, hope, ardour, and
fire, that seemed to cause a mental inflammation of the feelings and
faculties of the whole assembly in a mass.
On the first night of the entrance of young Burney into this set, Mr.
Greville amused himself with keeping out of the way, that he might
make over the new comer to what was called the humour of the
thing; so that, by being unknown, he might be assailed, as a matter
of course, for bets, holding stakes, choosing cards, &c. &c., and
become initiated in the arcana of a modish gaming house; while
watchful, though apart, Mr. Greville enjoyed, with high secret glee,
the novelty of the youth’s confusion.
But young Burney had the native good sense to have observed
already, that a hoax soon loses its power of ridicule where it excites
no alarm in its object. He gaily, therefore, treated as a farce every
attempt to bring him forward, and covered up his real ignorance
upon such subjects by wilful blunders that apparently doubled it; till,
by making himself a pretended caricature of newness and inaptness,
he got, what in coteries of that sort is always successful, the laugh
on his side.
As the evening advanced, the busy hum of common-place chattery
subsided; and a general and collected calmness ensued, such as
might best dispose the gambling associates to a wily deliberation,
how most coolly to penetrate into the mystic obscurities that brought
them together.
All, however, was not yet involved in the gaping cauldron of chance,
whence so soon was to emerge the brilliant prize, or desolating
blank, that was to blazon the lustre, or stamp the destruction, of
whoever, with his last trembling mite, came to sound its perilous
depths. They as yet played, or prowled around it, lightly and slightly;
not more impatient than fearful of hurrying their fate; and seeking to
hide from themselves, as well as from their competitors, their
anticipating exultation or dread.
Still, therefore, they had some command of the general use of their
faculties, and of what was due from them to general social
commerce. Still some vivacious sallies called forth passing smiles
from those who had been seldomest betrayed, or whose fortunes
had least been embezzled; and still such cheeks as were not too
dragged or haggard to exhibit them, were able to give graceful
symptoms of self-possession, by the pleasing and becoming dimples
produced through arch, though silent observance.
But by degrees the fever of doubt and anxiety broke forth all
around, and every breath caught its infection. Every look then
showed the contagion of lurking suspicion: every eye that fixed a
prosperous object, seemed to fix it with the stamp of detection. All
was contrast the most discordant, unblended by any gradation; for
wherever the laughing brilliancy of any countenance denoted
exulting victory, the glaring vacancy of some other hard by,
displayed incipient despair.
Like the awe of death was next the muteness of taciturnity, from the
absorption of agonizing attention while the last decisive strokes,
upon which hung affluence or beggary, were impending. Every die,
then, became a bliss or a blast; every extorted word was an
execration; every fear whispered ruin with dishonour; every wish
was a dagger to some antagonist!—till, finally, the result was
proclaimed, which carried off the winner in a whirl of maddening
triumph; and to the loser left the recovery of his nervous, hoarse,
husky, grating voice, only for curses and oaths, louder and more
appalling than thunder in its deepest roll.
NEWMARKET.
The next vortex of high dissipation into which, as its season arrived,
young Burney was ushered, was that of Newmarket: and there, as
far as belonged to the spirit of the race, and the beauty, the form,
and the motions of the noble quadrupeds, whose rival swiftness
made running seem a flight, and that flight appear an airy game, or
gambol, of some fabled animal of elastic grace and celerity, he was
enchanted with his sojourn. And the accompanying scenes of
gambling, betting, &c., though of the same character and description
as those of St. James’s-street, he thought less darkly terrible,
because the winners or losers seemed to him more generally
assorted according to their equality in rank or fortune: though no
one, in the long run, however high, or however low, escaped
becoming the dupe, or the prey, of whoever was most adroit,—
whether plebeian or patrician.
BATH.
The ensuing initiation into this mingled existence of inertness and
effort, of luxury and of desolation, was made at Bath. But Bath, from
its buildings and its position, had a charm around it for the subject
of these memoirs, to soften off the monotony of this wayward taste,
and these wilful sufferings; though the seat of dissipation alone he
found to be changed; its basis—cards, dice, or betting—being always
the same.
Nevertheless, that beautiful city, then little more than a splendid
village in comparison with its actual metropolitan size and grandeur,
had intrinsic claims to the most vivid admiration, and the strongest
incitements to youthful curiosity, from the antiquity of its origin, real
as well as fabulous; from its Bladud, its baths, its cathedral; and its
countless surrounding glories of military remains; all magically
followed up, to vary impression, and stimulate approbation, by its
rising excellence in Grecian and Roman architecture.
Born with an enthusiastic passion for rural scenery, the picturesque
view of this city offered to the ravished eye of young Burney some
new loveliness, or striking effect, with an endless enchantment of
variety, at almost every fresh opening of every fresh street into
which he sauntered.
And here, not only did he find this perpetual, yet changeful, prospect
of Nature in her most smiling attire, and of Art in her most chaste
and elegant constructions; Bath had yet further attraction to its new
visitor; another captivation stronger still to a character soaring to
intellectual heights, caught him in its chains,—it was that of literary
eminence; Bath, at this moment, being illumined by that sparkling
but dangerous Meteor of philosophy, politics, history, and
metaphysics, St. John, Lord Bolingbroke.
Happily, perhaps, for his safety, it was in vain that young Burney
struggled, by every effort of ingenuity he could exert, to bask in the
radiance of this Meteor’s wit and eloquence. Every attempt at that
purpose failed; and merely a glimpse of this extraordinary
personage, was all that the utmost vigilance of romantic research
ever caught.
Young Burney could not, at that period, have studied the works of
Lord Bolingbroke, who was then chiefly known by his political
honours and disgraces; his exile and his pardon; and by that most
perfect panegyric that ever, perhaps, poet penned, of Pope:
WILBURY HOUSE.
Not solely, however, to public places were the pleasures, or the
magnificence, of Mr. Greville confined. He visited, with great
fondness and great state, his family seat in Wiltshire; and had the
highest gratification in receiving company there with splendour, and
in awakening their surprise, and surpassing their expectations, by
the spirit and the changes of their entertainment.
He travelled in a style that was even princely; not only from his
equipages, out-riders, horses, and liveries, but from constantly
having two of his attendants skilled in playing the French horn. And
these were always stationed to recreate him with marches and
warlike movements, on the outside of the windows, where he took
any repast.
Wilbury House, the seat of Mr. Greville, situated near Andover, in
Wiltshire, was a really pretty place; but it had a recommendation to
those who possess wealth and taste with superfluous time, far
greater than any actual beauty, by requiring expensive alterations,
and being susceptible of lavish improvements.
This enhanced all its merits to Mr. Greville, who, when out of other
employment for his thoughts, devoted them to avenues, plantations,
rising hills, sinking dales, and unexpected vistas; to each of which he
called upon whatever guests were at his house, during their
creation, for as much astonishment as applause.
The call, however, was frequently unanswered; it was so palpable
that he was urged to this pursuit by lassitude rather than pleasure;
by flourishing ostentation rather than by genuine picturesque taste;
so obvious that to draw forth admiration to the beauties of his
grounds, was far less his object than to stir up wonder at the
recesses of his purse; that the wearied and wary visitor, who had
once been entrapped to follow his footsteps, in echoing his
exclamations of delight at his growing embellishments, was, ever
after, sedulous, when he was with his workmen and his works, to
elude them: though all alike were happy to again rejoin him at his
sports and at his table; for there he was gay, hospitable, and
pleasing, brilliant in raillery, and full of enjoyment.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookultra.com