100% found this document useful (1 vote)
26 views

Full Download Optimizing Visual Studio Code for Python Development: Developing More Efficient and Effective Programs in Python 1st Edition Sufyan Bin Uzayr PDF DOCX

The document promotes the ebook 'Optimizing Visual Studio Code for Python Development' by Sufyan Bin Uzayr, which focuses on enhancing programming efficiency in Python using Visual Studio Code. It outlines the book's chapters, which cover setup, environment configuration, working with frameworks, and integration with Azure. Additionally, it provides links to other related ebooks available for instant download on ebookmeta.com.

Uploaded by

spinkcerkavr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
26 views

Full Download Optimizing Visual Studio Code for Python Development: Developing More Efficient and Effective Programs in Python 1st Edition Sufyan Bin Uzayr PDF DOCX

The document promotes the ebook 'Optimizing Visual Studio Code for Python Development' by Sufyan Bin Uzayr, which focuses on enhancing programming efficiency in Python using Visual Studio Code. It outlines the book's chapters, which cover setup, environment configuration, working with frameworks, and integration with Azure. Additionally, it provides links to other related ebooks available for instant download on ebookmeta.com.

Uploaded by

spinkcerkavr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Get the full ebook with Bonus Features for a Better Reading Experience on ebookmeta.

com

Optimizing Visual Studio Code for Python


Development: Developing More Efficient and
Effective Programs in Python 1st Edition Sufyan
Bin Uzayr
https://ebookmeta.com/product/optimizing-visual-studio-code-
for-python-development-developing-more-efficient-and-
effective-programs-in-python-1st-edition-sufyan-bin-uzayr/

OR CLICK HERE

DOWLOAD NOW

Download more ebook instantly today at https://ebookmeta.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Mastering Visual Studio Code: A Beginner’s Guide 1st


Edition Sufyan Bin Uzayr

https://ebookmeta.com/product/mastering-visual-studio-code-a-
beginners-guide-1st-edition-sufyan-bin-uzayr/

ebookmeta.com

Visual Studio Code for Python Programmers 1st Edition


April Speight

https://ebookmeta.com/product/visual-studio-code-for-python-
programmers-1st-edition-april-speight/

ebookmeta.com

Mastering Python for Web: A Beginner's Guide (Mastering


Computer Science) 1st Edition Sufyan Bin Uzayr

https://ebookmeta.com/product/mastering-python-for-web-a-beginners-
guide-mastering-computer-science-1st-edition-sufyan-bin-uzayr/

ebookmeta.com

Mousetrap Structure and Meaning in Hamlet 1st Edition P J


Aldus

https://ebookmeta.com/product/mousetrap-structure-and-meaning-in-
hamlet-1st-edition-p-j-aldus/

ebookmeta.com
The Art Book First Edition Georgina Palffy Sam Atkinson

https://ebookmeta.com/product/the-art-book-first-edition-georgina-
palffy-sam-atkinson/

ebookmeta.com

A Beginner s Guide to Reading Tarot Cards A Helpful Guide


for Anybody with an Interest in Reading Cards 1st Edition
Anonymous
https://ebookmeta.com/product/a-beginner-s-guide-to-reading-tarot-
cards-a-helpful-guide-for-anybody-with-an-interest-in-reading-
cards-1st-edition-anonymous/
ebookmeta.com

Who Owns Haiti People Power and Sovereignty 1st Edition


Robert Maguire

https://ebookmeta.com/product/who-owns-haiti-people-power-and-
sovereignty-1st-edition-robert-maguire/

ebookmeta.com

Storey s Guide to Raising Pigs Care Facilities Management


Breeds 4th Edition Kelly Klober

https://ebookmeta.com/product/storey-s-guide-to-raising-pigs-care-
facilities-management-breeds-4th-edition-kelly-klober/

ebookmeta.com

Forging Identities The Mobility of Culture in Bronze Age


Europe Report from a Marie Curie Project 2009 2012 with
Concluding Conference at Aarhus University Moesgaard 2012
Volume 1 Paulina Suchowska Ducke Editor Samantha Scott
https://ebookmeta.com/product/forging-identities-the-mobility-of-
Reiter Editor Helle Vandkilde Editor
culture-in-bronze-age-europe-report-from-a-marie-curie-
project-2009-2012-with-concluding-conference-at-aarhus-university-
moesgaard-2012-volume-1-paulina-suchowska-du/
ebookmeta.com
Efficient MySQL Performance (Final Release) 1st Edition
Daniel Nichter

https://ebookmeta.com/product/efficient-mysql-performance-final-
release-1st-edition-daniel-nichter/

ebookmeta.com
Sufyan bin Uzayr

Optimizing Visual Studio Code for


Python Development
Developing More Efficient and Effective Programs
in Python
1st ed.
Sufyan bin Uzayr
Barabanki, India

ISBN 978-1-4842-7343-2 e-ISBN 978-1-4842-7344-9


https://doi.org/10.1007/978-1-4842-7344-9

© Sufyan bin Uzayr 2021

This work is subject to copyright. All rights are solely and exclusively
licensed by the Publisher, whether the whole or part of the material is
concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in
any other physical way, and transmission or information storage and
retrieval, electronic adaptation, computer software, or by similar or
dissimilar methodology now known or hereafter developed.

The use of general descriptive names, registered names, trademarks,


service marks, etc. in this publication does not imply, even in the
absence of a specific statement, that such names are exempt from the
relevant protective laws and regulations and therefore free for general
use.

The publisher, the authors and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.

This Apress imprint is published by the registered company APress


Media, LLC part of Springer Nature.
The registered company address is: 1 New York Plaza, New York, NY
10004, U.S.A.
For Mom
Introduction
Visual Studio Code (VS Code) is a great open-source code editor created
by Microsoft for Windows, Linux, and macOS. Widely applied, standard
features include support for debugging, syntax highlighting, automatic
code completion, snippets, code restructuring, and embedded Git.
Developers from all over the world are free to edit the design theme,
keyboard shortcuts, and preferences, as well as install essential and
extra extensions to upgrade the general project versatility.

Chapters at a Glance
Chapter 1, “Introduction to Visual Studio Code,” reviews how to set up
VS Code as well as provide an overview of the basic features, such as:
User interface: Provides the view of the documentation for VS Code.
Setup overview: Analyzes documentation for starting up and
running with VS Code, including platform-related setup.
Keyboard shortcuts: Provides customization options for your own
shortcuts and installation of Keymap extensions.
Keybinding extensions: Covers how to install a Keymap extension
and how to bring the keybindings from other editors to VS Code.
Chapter 2, “Getting Started with Python Programs in Visual Studio
Code,” explains in detail how to set up your VS Code for Python
Development. For the sake of demonstrating with examples, you’ll see
how to install most of the tools on Windows.
Chapter 3, “Setting Up the Environment and Testing,” demonstrates
how to install the top 8 Python extensions by typing Python in the
Extensions item on the Activity Bar.
Chapter 4, “Working with Python Frameworks,” discusses using
Python frameworks, such as Django and Flask. We will discuss topics
such as Python web development, Django apps, Flask development, and
so on.
Chapter 5, “Working with Containers and MS Azure,” covers Python
development in VS Code in assonance with MS Azure. Azure services
can be used for speedy deployment and building of production level
apps. With VS Code, Azure offers neat integration and this chapter
discusses the same.
Acknowledgments
There are many people who deserve to be on this page, for this book
would not have come into existence without their support. That said,
some names deserve a special mention, and I am genuinely grateful to:
My mother and father, for everything they have done for me.
Faisal Fareed and Sadaf Fareed, my siblings, for helping with things
back home.
Sana Akhtar Usmani, for all her help and support.
The Parakozm team, especially Madina Karybzhanova, for offering
great amounts of help and assistance during the book-writing
process.
The Apress team, especially Smriti Srivastava, Shrikant Vishwakarma,
and James Markham, for ensuring that the book’s content, layout,
formatting, and everything else remains perfect throughout.
Reviewers of this book, for going through the manuscript and
providing their insight and feedback.
Typesetters, cover designers, printers, and everyone else, for their
part in the development of this book.
All the folks associated with Zeba Academy, either directly or
indirectly, for their help and support.
The Python and VS Code community at large, for all their hard work
and efforts.

—Sufyan bin Uzayr


Table of Contents
Chapter 1:​Introduction to Visual Studio Code
User Interface
Basic Layout
Side-By-Side Editing
Minimap
Indent Guides
Breadcrumbs
Explorer
Multiselection
Filtering the Document Tree
Outline View
Markdown Outline View
Open Editors
Views
Activity Bar
Command Palette
Configuring the Editor
Hiding the Menu Bar (for Windows, Linux)
Settings
Zen Mode
Centered Editor Layout
Tabs
Tab Ordering
Preview Mode
Editor Groups
Keyboard Shortcuts
Disabling Preview Mode
Using Ctrl+Tab to Navigate in Entire Editor History
Closing an Entire Group Instead of a Single Editor
Window Management
Setting Up Visual Studio Code
Cross-Platform
Updating Cadence
Insiders Nightly Build
Portable Mode
Additional Components
Extensions
Key Bindings for Visual Studio Code
Keyboard Shortcuts Editor
Keyboard Rules
Accepted Keys
Command Arguments
Removing a Specific Key Binding Rule
Keyboard Layout-Independent Nindings
When Clause Contexts
Conditional Operators
Available Contexts
Programming Languages Supported
Language Features in VS Code
Changing the Language for the Selected File
Additional Components and Tools
Commonly Used Components
VS Code Extensions
Additional Tools
Settings Precedence
Settings and Security
Summary
Chapter 2:​Getting Started with Python Programs in Visual Studio
Code
Installation Basics
Reviewing the Required Extensions
Tabnine
Bracket Pair Colorizer
Python Snippets
Python Test Explorer for Visual Studio Code
Configuring Debug
Better Comments
AutoDocstring
Python Indent
Getting Started with Code Editing
Autocomplete and IntelliSense
Customizing IntelliSense Behavior
Troubleshooting
Running Selection/​Line in Terminal (REPL)
Formatting
Troubleshooting Your Formatting
Refactoring
Linting
Enabling Linters
Disabling Linting
Running Linting
Linting Settings
Pylint
Troubleshooting Linting
Debugging
Initializing Configurations
Additional Configurations
Basic Debugging
Conditional Breakpoints
Summary
Chapter 3:​Setting Up the Environment and Testing
Setting Up Your Environment
Manually Specifying an Interpreter
Selecting and Activating an Environment
Environments and Terminal Windows
Choosing a Debugging Environment
Environment Variable Definitions File
Variable Substitution
Using the PYTHONPATH Variable
Running Your Projects
Selecting a Python Interpreter
Creating a Python Hello World Source Code File
Running Hello World
Running the Python Debugger
Installing and Using Packages
Supportting Jupyter
Jupyter Code Cells
Additional Commands and Keyboard Shortcuts
Python Interactive Window
Plot Viewer
Live Share for Python Interactive
Variable Explorer and Data Viewer
Connecting to a Remote Jupyter Server
Converting Jupyter Notebooks to Python Code File
Debugging a Jupyter Notebook
Exporting a Jupyter Notebook
Configuration Files
Data Files
Runtime File
Summary
Chapter 4:​Working with Python Frameworks
Python Frameworks Ecosystem at a Glance
Django Development
Installation
Creating a Project Environment for the Django Tutorial
Creating and Running a Minimal Django App
Creating the Django Project
Creating a Django App
Creating a Debugger Launch Profile
Exploring the Debugger
Using Definition and Peek Definition Commands
Using a Template to Render a Page
Serving Static Files
Readying the App for Static Files
Referring to Static Files
Using the Collectstatic Command
Creating Multiple Templates That Extend a Base Template
Creating a Base Page Template and Styles
Creating a Code Snippet
Working with Data, Data Models, and Migrations
Types of Databases
Migrating the Database
Creating a Superuser and Enabling the Administrative
Interface
Flask Development
Creating and Running a Minimal Flask App
Running the App in the Debugger
Using Definition and Peek Definition Commands
Using a Template to Render a Page
Creating a Requirements.​txt File for the Environment
Data Science–Specific Information and Tutorials
Setting Up a Data Science Environment
Preparing the Data
Training and Evaluating a Model
Summary
Chapter 5:​Working with Containers and MS Azure
Integrating Azure for Your Python Projects
Key Azure Services
Creating a Function in Azure with Python Using Visual
Studio Code
Deploying Docker Containers to Azure App Service
Using Containers in VS Code
Operating with Containers
Creating a Devcontainer.​json File
Managing Extensions
Forcing an Extension to Operate Locally or Remotely
Forwarding or Publishing a Port
Temporarily Forwarding a Port
Personalizing with Dotfile Repositories
Summary
Index
Discovering Diverse Content Through
Random Scribd Documents
“No. They’re shooting at us!” yelled Bill Tagg. “There they go
again!” he added, ducking down into the bottom of the boat.
Tom and Mr. Damon were both occupied with trying to save the
Gull from going on the rocks and they could not draw their weapons.
The tramp, however, aimed his automatic and sent a couple of
answering shots toward the boat containing Ned.
“Look out you don’t hit our friend,” warned Tom, who felt the
rudder gradually coming around, so that he had hopes of saving the
Gull from a direct crash.
“I fired over their heads,” explained Bill Tagg. “They’re doing the
same, I guess—trying to bluff us!” He fired again, high enough to
clear those in the fleeing craft, and again came a response. This
time the bullet was lower and Tom instinctively ducked, though he
knew the missile must have passed him before his ear caught the
vicious whine of its passage through the air.
Then, so suddenly that no warning was given, the Gull struck on
a rock just beneath the surface. It was a glancing blow, and the rock,
luckily, was smooth, or the craft might have been shattered. As it
was, the Gull careened to one side, and so sharply that Tom Swift
was thrown overboard, landing in the lake with a great splash.
Instinctively, he took a long breath and held it, closing his mouth
that had been opened preparatory to shouting further directions to
Mr. Damon about reversing the craft.
Down into the depths sank Tom, while the Gull, whose speed was
not slackened, slued around from her impact on the rock and shot off
on a tangent in a direction directly opposite from that taken by the
Turtle, the boat containing the three roughly attired men and that
silent, wrapped figure in the bottom—a figure that was supposed to
be Ned Newton.
“Bless my steamship ticket!” yelled Mr. Damon, “where’s Tom?”
“Overboard!” yelled the tramp. “And I can’t swim!”
“Me get him!” shouted Koku, peeling off his coat preparatory to a
dive over the side.
“Stay where you are!” came the stern command from the other
boat which had circled around and was now headed for the place
where Tom Swift’s head appeared in the watery circles caused by his
plunge. “We’ll drill the first man that goes overboard!”
Two of the rascals stood in the bow with leveled weapons, while
the third was steering the boat straight toward Tom.
“They’re going to ram him!” gasped the tramp. He did not seem
capable of doing anything to help, and Koku, being now without a
weapon, was of no service. Mr. Damon had laid aside his pistol to
work the reverse lever and, even if he could have recovered it, there
was a question as to his ability to use it.
Thus fate favored the rascals, and Mr. Damon and his two
companions were forced to see themselves being carried farther and
farther away from the Turtle as the Gull, whose engine was still
running, headed away from the rocks. Apparently little damage had
been done by striking the obstruction.
From a distance Mr. Damon, the tramp, and the giant watched to
see what would happen to Tom Swift. At first it seemed as though he
was going to be run down by the unprincipled men in the Turtle. But
they had other plans in mind and, reaching the swimming inventor,
the two men in the bow reached over, grasped him, and pulled him
in. He could not fight back, and, indeed, having gone overboard with
all his clothes on, was having a hard struggle to keep afloat. Rescue,
even at the hands of the enemy, was welcome.
“They’ve got him!” gasped Mr. Damon.
“We go take him away!” growled Koku. “Make boat go odder way,
Mr. Damon—we get Master Tom.”
“I—I’m afraid I don’t know how to operate this craft,” confessed
the eccentric man. “I might run it back on the rocks.”
Once Tom was hauled, dripping wet, aboard the Turtle, the boat
was put about and went speeding off and away from the Gull which,
to tell the truth, was headed back toward her own dock.
Tom, as he was pulled over the side, had a glimpse of the Gull
going back where she came from. He remembered that neither Mr.
Damon nor Koku could operate the craft without some one along to
advise them, and the young inventor had doubts about the tramp’s
navigating ability in the emergency.
“Well, anyhow, she’ll get to shore and they’ll be all right,”
reasoned Tom.
Then he gave thought to his own situation.
“Well, we’ve sure got him now!” chuckled one of the three men.
“You said it!” echoed another. “We didn’t make no mistake this
time!”
Tom almost fell on the gagged and bound body of another young
man, and it needed but a glance to show him that here was Ned
Newton, a prisoner like himself. Ned could not speak and could
hardly move, but his eyes flashed a greeting to Tom.
“They’ve got us both!” said Tom in a low voice to his chum, as he
crawled alongside of Ned. “But they won’t keep us long. Are you
hurt, Ned?”
A shake of the head in negation was the only way Ned could
reply.
Then further talk on Tom’s part was stopped, for one of the men,
standing over the two captives with an automatic in one hand,
growled:
“Shut up down there!”
CHAPTER IX
ON THE ISLAND
Not one to submit tamely to indignities, Tom Swift, instead of
complying with the command, struggled to his feet and advanced
toward the two rough men standing in the bow of the boat. The third
member was at the wheel and, Tom noticed, was heading the boat
out toward the wider part of the lake.
“Look here!” said Tom boldly, for his nerve, somewhat shaken by
his sudden plunge into the water, was coming back to him. “What’s
your game, anyhow? What do you mean by keeping Mr. Newton and
me on this boat? I demand that you set us ashore at once!”
“Oh, you do, eh?” chuckled one of the men.
“Yes, I do! And if you do it within a reasonable time I may
overlook what you’ve done. But if you don’t at once release us I’ll
cause your arrest, and it will go hard with you!”
“Listen to him!” sneered one of the scoundrels. “You’d think he
was chief of police or something like that!”
“Ha! Ha!” chuckled another. “We’ve got Tom Swift right where we
want him this time. No mistake now!”
Tom was beginning to understand some things in connection with
the kidnapping—things hitherto a mystery to him. He looked at the
men. They were burly, brutal fellows and Tom knew that even if Ned
were free to help him, they would not be able to fight these fellows.
Perhaps subterfuge and craft were better than a show of force. Tom
decided on other tactics.
“Look here!” he said again. “I don’t know what your game is, but
you’re bound to lose out in the end. My friends will soon rescue us
and you’ll be jailed for this. Kidnapping is a serious offense.”
“We took one chance and we got the wrong man,” said one of the
fellows, thus confirming Tom’s new suspicions. “Now we have the
right one—that’s you—and we’re going to hold on to you. We don’t
worry none about getting jailed.”
“We’ve rich friends that’ll soon get us out,” said the man at the
wheel.
“Shut up, Torpy!” commanded one of the two in the bow. “Close
your trap! You talk too much!”
“Aw, you make me tired!” complained the one addressed as
Torpy.
“You can’t bluff us, Tom Swift!” went on the largest of the three
scoundrels. “We got you dead to rights now and you’ll tell us what
we want to know before we let you go.”
“Oh, so you’re after information, are you?” asked Tom, hoping to
draw the men out.
“Yes, we are.”
“What kind?” Tom inquired, trying to wring some of the water out
of his coat.
“You’ll find out soon enough when we get to the island.”
“What island?” the young inventor wanted to know.
“You ask too many questions. You’re as bad as Torpy—you talk
too much!” complained one of the two in the bow.
Tom glanced down at Ned and, guessing how his friend must be
suffering, bound and gagged as he was, decided on a new plan.
“All right,” he seemed to agree, “I’ll stop asking questions. But as
long as you’ve got me safe, as you seem to have, there’s no object
in keeping my chum trussed up as he is. Why don’t you loosen him
and take that rag out of his mouth? Be decent, can’t you?”
“We might as well let up on him a bit,” said the big man. “As he
says, we got him now and the other can’t do any harm if he does
yell. We’re out of the way now—soon be at the island.”
“Sure,” assented his companion, and they at once loosened
Ned’s ropes and removed the gag, for which relief he was very
grateful.
“What happened, old man?” asked Tom in a low voice, as he sat
down on the bottom of the boat beside his now unbound chum.
“We’ve been all upset over you.”
“I’ve been a bit upset myself,” admitted Ned, whose tongue was
thick from the effects of the gag. “But, in brief, I was set upon that
night after I left your laboratory, a cloth was thrown over my head at
a dark corner, not far from your place, and, before I knew what was
happening, I was gagged, bound, and bundled into an auto. I was
taken some distance and brought to that old farmhouse. The men
hustled me out of there a little while ago, and after a wild ride put me
in this boat. You know the rest.”
“Have you been kept in the old Smith place ever since you were
kidnapped up until a little while ago?” asked Tom.
“Yes, they held me a prisoner there. But it didn’t take them long to
find out I was the wrong man. They mistook me for you, and thought
they were kidnapping the great inventor.”
“I had begun to suspect that,” said Tom. “Well, what happened?”
“Oh, they were pretty much upset when they learned who I was,”
chuckled Ned. “They asked me a lot of questions about your
inventions, and wanted to know how the new talking-picture projector
worked. But of course I was as mum as an oyster.”
“Did they ask specifically about my new patent?” asked Tom,
somewhat excited by this news.
“That’s what they did.”
“How did they know about it? I supposed that was a dead secret
from all but you, dad and me.”
“So did I,” responded Ned. “But there must be a leak somewhere
around your shop. Perhaps a spy.”
“I believe there is!” exclaimed Tom.
“I tried to escape, but I couldn’t,” said Ned. “Even though they
found out I was the wrong man, they still held me. I was kept in an
upper room with barred windows. Then, when they brought me food
in paper bags, I thought of the kite idea. I sent out half a dozen, but I
guess they didn’t blow far. I wrote messages to you, hoping some
one would pick them up and take them to you. But I began to think
nothing would come of it until one day a kite that I’d made went high
up in the air and I knew it would travel a long way.”
“It did,” said Tom. “All the way to Cherry Valley where a tramp
picked it up and brought it to me. That was yesterday, and I came as
soon as I could.”
“I thought you would,” Ned responded. “But when, a little while
ago, they bundled me up again and took me away, I thought it was
all up with me. They must have had some warning you were on their
trail, they got off in such a hurry.”
“I think the same man who tried to blow me up gave the warning,”
stated Tom.
“Tried to blow you up!” gasped Ned. “What do you mean?”
Tom told of the explosion and fire, relating the sad tale of the
wrecking of the talking-picture machine, but in words that would
mean nothing to the three men even if they should hear. But they did
not appear to be listening.
“Whew!” exclaimed Ned. “You were as badly off as I was!”
“Pretty near,” agreed Tom. “We couldn’t imagine what had
become of you. Your folks were worried, but I sent word to them
about your kite message and that relieved their minds.”
“Did you start to swim after me?” asked Ned, with a smile, noting
Tom’s wet clothes.
“Swim? No. Oh, I see what you mean! You couldn’t see what
happened because you were down on the bottom here. Well, I was
chasing these fellows in a motorboat I’d hired, with Mr. Damon, Koku
and the tramp that picked up your kite. We hit a rock and I went
overboard. Then they hauled me in, for my boat slued off and I
guess headed back for her own dock.”
“Tough luck!” murmured Ned. “Well, what’s the next item on the
bill, I wonder?”
They were not left long in doubt. A few minutes later the speed of
the boat began to slacken and, looking ahead, Tom and Ned saw
that the craft was approaching a large island. It was known to the
young men as a rendezvous for criminals and other unsavory
characters. Tom had not visited Rattlesnake Island, as it was called,
for a number of years, nor had his chum.
“Are you going to land us there?” Tom demanded, as he saw that
the boat was heading for a dilapidated dock.
“You said it!” chuckled one of the men who, Ned said, was named
Snogg. The other, and larger, was addressed as Janner. Those two,
with Torpy, comprised the kidnapping gang.
“If you leave us here, will you be decent enough to send some
one to take us off after you get away?” asked Tom.
“Don’t worry—we’re not going away!” sneered Janner. “We’ll be
right with you all the while, boys!”
It was plain, then, that Tom and Ned were to be held captive on
the island with the three unscrupulous men as guards.
“Now you can walk along quiet if you choose, or, if you want to
kick up a fuss, we’ll bind, gag and carry you,” said Snogg, when the
boat was made fast to the dock. “Which’ll it be?”
“Since we can’t help ourselves,” replied Tom bitterly, “we’ll go
quietly. But we won’t submit to any indignities!”
“You won’t be any worse treated than you have been,” said
Janner. “And if you come across and answer my questions you’ll get
home all the sooner. It’s up to you.”
To this Tom Swift made no answer and a little later he and Ned
were led toward a rough, two-story house, situated near the middle
of Rattlesnake Island, and left to themselves, locked in a room.
“Well, this is that!” said Ned as he sank down on a chair near the
bed, for there was some furniture in the room. “What do you think
they’ll do to us, Tom?”
“Hard to say. I don’t quite fathom their game, unless it’s to make
me give up the secret of——”
He did not finish, but Ned knew what was meant.
“I hope they feed us, anyhow,” sighed Tom’s manager. “They
gave me pretty decent food back in the farmhouse, but I haven’t had
any breakfast, and I need it.”
After this there was silence. A few minutes later the door was
unlocked and Torpy came in with two trays of fairly good food.
“The boss says you’re to eat and then he’ll be up and question
you,” the man reported.
“He won’t get much out of me,” snapped Tom.
“Nor me!” added Ned.
“You’d better not r’ile the boss,” was Torpy’s advice as he put the
trays down on a chair.
Ned was very hungry, and Tom Swift, in spite of his rage, anxiety,
and his recent ducking, was also beginning to feel an appetite. So
the young men ate and then, casually, Tom began strolling around
the room seeking a possible chance to escape. To his
disappointment the apartment was more solid than it looked. The
door was heavy and securely locked and the window covered with a
heavy wire screen and iron bars. Evidently the room had been used
before as a prison.
But Tom Swift did not give up very easily, and now he had still
several cards to play in the desperate game with the three men.
When the food had been satisfactorily disposed of, the door opened
again and big Janner came swaggering in.
“Well, I see you had your appetites with you, boys,” he remarked.
“And now we’ll get down to business. It’s you I want to talk with, Tom
Swift, and not your manager that we took away in a hurry by mistake
for you. He don’t know the answers to some of the questions I’m
going to ask.”
“Maybe I don’t, either,” observed Tom.
“Oh, yes you do!” was the quick retort. “And you’ll tell me, too, or
I’ll find a way to make you!” The man’s voice was an ugly snarl now.
“We’ll see,” was all Tom said.
Then began a rapid series of questions concerning some of
Tom’s recent inventions, including his Air Monarch in which he had
circled the globe. As this machine had lately been turned over to the
Government for use in the Air Service, there was no secret about it,
and Tom had no hesitation in telling things concerning it. He thought
it might put Janner in a better humor.
From the Air Monarch, the man switched to other machines about
which greater secrecy was desirable, and Tom refused to answer
inquiries, though his refusals did not appear to anger Janner much.
“How’s your photo telephone doing these days?” the man
suddenly inquired.
“That? Why, most people know all there’s to be known about that.
It’s an old invention of mine,” said Tom.
“Is it? But I understand you’re using something like it now to
make pictures appear inside a radio machine!” Janner suddenly shot
at Tom.
At once the young inventor saw the drift of the inquiries. There
had been some leak in connection with his recent work on the
talking-picture machine, and these men, or this man, knew about it.
Tom did some quick thinking just then.
“I haven’t any machine that will make pictures appear in a radio
receiver,” Tom said calmly.
This was true enough. The fire and blast had destroyed the best
part of the new invention, though Tom had plans for rebuilding and
perfecting it.
“Oh, you haven’t got such a machine, eh?” sneered Janner.
“Well, I know you have. We’re not going to let you spoil our
business.”
“What business is that?” asked Tom.
“Never you mind. We’re not going to let you make a machine that
will permit folks to sit at home and see and hear a show without
paying the admission price. Not in a thousand years!”
In a flash Tom knew now who were at the bottom of the plot
against him. Powerful moving picture and theater interests would not
want to see such an invention as Tom Swift planned put on the
market. It would bring ruin to many of them.
“You’ve got such a machine, or you’ll soon have one, and I know
it!” stormed Janner. Tom knew, then, that he had been spied upon.
“And I’m going to make you tell all about it and promise to drop it!”
fairly shouted Janner.
“You’ve got a big contract on your hands,” stated Tom calmly. “I’ll
tell you nothing and there isn’t a man or a company living that can
make me drop anything I undertake until I’m ready to let go of it!”
“Oh, is that so?”
“Yes, that’s so!”
“Well, I guess we can find ways and means to make you!” said
Janner in a snarling voice as he advanced toward Tom Swift.
CHAPTER X
THE ESCAPE
Instinctively Ned Newton, who had pretty well recovered from
the harsh treatment accorded him while bound and gagged, started
to Tom’s side.
The young inventor, seeing that a fight was imminent, also
prepared for it. Though he still felt the effects of the shock and
injuries attendant upon the attempt to blow him up, he was in a
fighting mood and did not shrink from it.
“I’ll make you tell what I want to know!” snarled Janner. “You
haven’t anybody here to help you now, Tom Swift. You’ll either give
up that secret and give the plans to me or you’ll wish you’d never
fallen into my hands.”
“I wish that now,” replied Tom coolly. “Not that I’m afraid of your
hands,” he added, bracing himself for the struggle he felt sure was
coming, “but I don’t like your company nor that of your gang. So you
have my regrets already, though as for any secrets I may have, or
any new inventions, they remain my exclusive property!”
“Oh, they do, do they?” sneered the man. “Well, we’ll see——”
He was about to rush upon Tom and Ned, who stood side by side
ready to ward off the assault, when there came a call from the hall
outside.
“Hey, Janner! Hop to it!”
“What’s the matter?” asked the big ruffian. “Don’t bother me!”
“The Chief is on the wire!” came the answer, and Tom and Ned
recognized Snogg’s voice. “He wants to talk to you. Step on it—the
Chief’s in a hurry!”
“In that case your affair can wait,” said the big fellow, with a
threatening gesture toward the two young men. “Don’t think you’re
going to get away,” he added. “I’ll be back!”
He walked to the door, still facing the two, tapped on it without
turning about and, when it was opened from the hall, evidently by
Snogg, the big plotter stepped outside and quickly locked the door
again before Tom and Ned had a chance to rush him, which Janner
evidently expected would happen.
“There was a chance we missed!” exclaimed Ned, when he heard
the lock click. “We might have bowled them over, Tom, and gotten
away.”
“Yes, that idea occurred to me. But it was too risky. These fellows
may not intend to kill us, but even if they only shot at us to cripple us
something might go wrong and we’d get a bullet where it would do a
lot of damage. I think we can get the best of them in another way.”
“How?”
“We’ll have a look around this place and see if we can’t escape—
perhaps not now, but after dark. It will soon be night. This room looks
strong, but from the outside the house didn’t look either strongly built
or in good repair. We’ll have a go at it.”
“I’m with you, Tom. But what do you think’s going on now? What
was that talk about the Chief being on the wire?”
“It bears out what I have been thinking for some time,” replied the
young inventor. “These fellows who have kidnapped us are not the
principals in this matter. They are an organized gang, but they are
working at the behest of others. I could tell, from the way Janner
asked questions about my inventions, that he had no real, scientific
knowledge. He had been told to ask those questions by some one
who did know, however. He made several breaks that I passed over.
I wanted to see how far he would go.”
“What’s the game, Tom? They went to a good deal of preliminary
trouble—I mean kidnapping me for you.”
“Admittedly on their part, that was a mistake,” said Tom. “It was
me they were after all the time, only you happened to leave the
laboratory first and they pounced on you. Then came the explosion.
Whether that was set to go off and destroy my laboratory after I was
supposed to be out of it or whether they really wanted to do me up, I
don’t know. But they’ve got both of us now.”
“Any idea who they may be, Tom—I mean these men?”
“They might be the Hussy and Kilborn crowd.”
“You mean that bunch of the Red Arrow who tried to stop us from
circling the globe?”
“That’s who I mean. However, it’s only a guess. It may turn out to
be an entirely different gang. But now that we have a little time to
ourselves, let’s look around and see what the chances are for getting
away.”
It was dusk, but by the last rays of the setting sun which shone
through the window, the young men began a tour of the apartment,
seeking any possible means of exit. Naturally, they first gave their
attention to the window and door. As stated before, the former was
screened not only with a wire mesh, but also with strong iron bars. A
search through the pockets of Tom and Ned revealed, in the way of
tools, only two knives. Tom’s knife contained a small screw driver,
and at first he thought he might be able to loosen the fastenings of
the screen and window bars. But it did not take long to demonstrate
that a much more powerful instrument would be needed for this
work.
“Anyhow, if we did get the bars off we’d have a big drop to the
ground,” said Ned. “We’re higher up than I thought.”
“We could improvise a rope from the bed-clothes,” suggested
Tom, indicating them. “That would be the easiest part of it. But those
bars were put there to stay.”
“Maybe we can whittle away the wood enough to loosen the
screws,” suggested Ned. They tried this, but the space to work in
was cramped, the wood was tough, and when Ned broke the largest
blade of his knife and cut his hand rather severely in so doing, Tom
insisted that they give up this attempt.
“Let’s try the door,” he said.
It was now dark in the room, but both young men had matches,
Tom’s being in a waterproof case which had kept dry during his
sudden bath, and with these they made as good an examination of
the door and its frame as was possible.
The lock defied picking with the poor tools at their disposal, and
when this had been proved Tom said:
“We can cut a hole through the door near the lock, big enough for
a hand to get through, and maybe we can turn the lock that way.”
“It’s worth trying,” Ned declared. “We’ll work at it in shifts.”
Their captors seemed to have made up their minds to leave the
prisoners alone, though voices and movements in the rooms below
indicated that the three men were still on guard. Perhaps orders had
come from the mysterious “Chief” not to attempt violence.
There was more than enough food in the supply which had been
brought to provide a late supper and even breakfast for the captives,
and there was a large jug of water.
Throughout the hours of the night, Tom Swift and Ned Newton
toiled desperately to cut a hole through the door. With only pocket
knives to work with, it was tremendously difficult labor.
It was long past midnight when Tom, whose turn it was at the
task, uttered an exclamation of dismay.
“What’s the matter?” asked Ned, who had thrown himself on the
bed to rest. “Break your knife or cut yourself?”
“Neither,” Tom replied. “But we’ll have to give this up.”
“Why?”
“There’s an iron plate outside this door. I’ve cut through the wood
and come to the iron. It’s all off.”
It was a bitter disappointment.
“We’ll try something else in the morning,” decided Tom after a
moment, closing his knife with a snap. “Meanwhile, I’m going to get
some rest.”
“Yes, we both need it,” admitted Ned, with a weary sigh. “But
when they come in here in the morning and see what we’ve done in
the way of spoiling their door, they may take us to another room.”
“No use crossing a bridge until we come to it,” Tom responded.
“I’m going to get some sleep.”
They ate a little of the food, and then, bracing a chair under the
knob of the door to prevent an entrance without causing noise
enough to arouse them, the two threw themselves on the bed and
slept the sleep of exhaustion.
Faint daylight was struggling through the barred window next
morning when Tom awoke and sat up. There was a peculiar noise for
which at first he could not account. He looked toward the casement
and then recognized the dash of rain against the glass and heard the
roar of wind. It was this that caused the racket.
“What’s the matter?” asked Ned, turning over.
“Big storm,” Tom answered. He jumped out of bed and walked to
the window. A moment later he uttered an exclamation.
“What’s doing?” asked Ned, stretching lazily.
“Those three fellows are down on the shore doing something to
their motorboat,” reported Tom. “Looks as if it had been damaged in
the storm, which is a fierce one, let me tell you. They seem to be
making repairs.”
“Maybe they’re going away and leave us alone,” suggested Ned.
“They may be going away,” assented Tom. “But they won’t leave
us, I’m thinking. They’ll take us with them. But something evidently
has happened.”
In his eagerness to see what was going on at the shore of the
lake within view of the barred window, Ned jumped out of bed. In
doing so he overbalanced himself and in order not to fall he had to
do a hop, skip and a jump across the room. He brought up hard
against the opposite wall, fairly jarring the place. As he stopped his
somewhat mad and erratic career he uttered a cry.
“Hurt yourself?” asked Tom anxiously.
“No! But look! Man dear, look!”
Ned’s voice was excited, and no wonder! It was evident that in
his collision against the wall he had struck a hidden spring which
operated the mechanism of a secret sliding door. For there, before
the eyes of the two captives, was an opening, large enough for them
to pass through, in a stooping position, and leading to the top of a
flight of stairs.
“A secret door!” cried Tom. “How’d you discover it?”
“I didn’t,” Ned answered. “It just happened. I bumped against the
wall and must have struck the spring. What’s it for, Tom?”
Into the eyes of the young inventor shone a new and hopeful
light.
“I don’t know what its original use was,” he said slowly. “But for us
it offers a way of escape. Come on, Ned! We’ll light out while those
fellows are busy down at the boat. Grab up some food and come
on.”
Tom began stuffing some bread and meat into his pockets after
hastily dressing, which was a short operation, as the young men had
not removed all of their clothes the night before. Then Tom took
another look through the window.
“They’re still tinkering over the motor,” he reported. “It’s now or
never, Ned! This storm came just at the right time. Come on!”
“But we don’t know where that secret staircase leads,” objected
Ned Newton as he followed his chum’s example about the food.
“And it doesn’t make much difference, either. It leads out of this
room. That’s all we have to know now. I think it must have been put
in to allow the secret removal of smuggled or stolen goods—possibly
bootleg liquor. Probably the stairway ends in one of the rooms below.
But as those three scoundrels are out of the way we can leave.”
“Maybe we’ll be trapped at the bottom, Tom. There must be a
door there, too.”
“Probably there is; but it’s likely to be a sliding, secret door, and,
consequently, won’t be very strong. We can burst it out, maybe.
Anyhow it’s worth trying. Come on!”
Then, as the storm rose to new heights of fury, the two prisoners
slipped into the secret opening and began descending the dark stairs
on their way to escape.
CHAPTER XI
RESCUED
Using the utmost caution, though they felt quite certain their
movements would be muffled by the noise of the storm that raged
about the lonely house, Tom Swift and Ned Newton made their way
through the narrow, dark passage. It was so low that they had to
stoop and, as the way was strange to them, Tom, who was in the
lead, proceeded carefully. He kept his hands outstretched, one in
front of him and the other pressed against a side wall. Nor did he let
his weight bear on his feet when descending from one step to
another until he was sure it was firm and solid.
The house was not large, therefore the secret stairway built in the
walls could not be very long. So in a comparatively short time,
though to the two young men it seemed long enough, the inventor
came to the end of the passage and stopped.
“Well?” whispered Ned, behind his chum, after waiting impatiently
for a short time.
“I don’t know whether it’s well or ill,” Tom answered. “But I’ve
come to a wall or a door and I can find no means of opening it—if it
is a door. So we can’t go any farther without breaking through.”
“Burst it open, then!” advised Ned with force. “We’ve got to get
loose!”
“It’s bound to make a noise,” Tom went on, trying the second
secret door by pushing on it, thus determining that it was not of very
solid construction. “But I think the racket of the storm will cover it.
Are you ready for a dash?”
“Sure!” replied Ned. “We’re going to get good and wet, though.”
Even in the secret passage where they were crouched, the noise
of the storm came to them, and it seemed to be increasing in fury.
The wind moaned, shrieked, and whistled around the island house
and the rain came down in rattling sheets that played a tattoo on the
sides and roof of the building.
“Here goes!” murmured Tom in a tense voice.
He drew back a little and when a sudden and louder burst of the
storm’s fury enveloped the house, the young inventor hurled himself,
back foremost, against the door.
There was a crackling and splintering of wood and Tom almost
fell, so suddenly was he precipitated through the broken door.
Recovering himself as best he could, Tom Swift saw that he had
come out into a small passageway.
There was another door in front of him—an ordinary one fastened
with bolts in plain view, and the passage was lighted by a window
near the ceiling. Ned followed his chum through the broken secret
door and the two stood for a moment, listening for anything which
might indicate that their escape had been discovered.
But no sounds came to them save the noise of the storm, more in
evidence now that they were closer to the outer air. Then Tom
stepped to the locked door and, pushing back the bolts, swung it
open. He had a momentary fear that it might lead into another strong
room, but, to his own delighted surprise, as well as that of Ned, it
gave out of doors and a moment later the two escaping captives
stood in the wind and rain beneath the forest trees, free!
“That was luck!” murmured Ned.
“But we aren’t out of the woods yet,” replied Tom.
This was true in a double sense. The island in Lake Carlopa was
densely wooded, and, so far as the young men knew, uninhabited
save by the unscrupulous men who had kidnapped them. The
sinister name of the place—Rattlesnake Island—kept away many
campers who otherwise might have made the place popular.
Perhaps, years before, there had been many of the deadly reptiles in
the thickets, but it was doubtful if many were there now.
However, Tom and Ned did not give this a thought. Their main
idea was to get as far as possible away from the house before
Janner, Snogg and Torpy discovered that the prisoners had escaped.
“Come on!” murmured Tom, plunging off into the rain-drenched
woods, followed by Ned. “They may be after us at any minute.”
But evidently the scoundrels were too much occupied with
repairing their motorboat, for the two escaping captives had a
glimpse of the unsavory trio grouped about it on the beach as they
threaded their way through the forest.
“Whew, but I’m getting wet!” gasped Ned, as they crossed a little
clearing and caught the full force of the downpour.
“This storm was the best thing that could happen to us,” Tom
said.
“How come?”
“Except for the noise it made, the racket I produced when I broke
that door would have given the alarm. Yes, this storm saved us.
Don’t mind a little wetting.”
“A little wetting!” good-naturedly chuckled Ned. “This is about the
biggest drenching I ever saw—except when you went into the lake.”
On they plunged, taking little heed of whither they went so long
as they put distance between themselves and the three men. Then,
when it was evident there was to be no immediate pursuit, they
slackened their pace and began to make plans.
“What are we going to do, Tom?” Ned asked, pausing beneath a
shelving ledge of rock that afforded partial shelter from the dashing
rain and wind. “We’re still far from safe.”
“We ought to get to the shore—as far away from those fellows as
we can—and signal some passing boat. There ought to be plenty of
craft passing up and down the lake, though there’ll be more after this
storm lets up. We’ve got to get back to the mainland. There’s no
telling what mischief this gang may be up to at my works. The three
scoundrels here are only part of the crowd.”
“I guess you’re right there, Tom. A boat headed for the mainland
would just about suit me now. I’d like to let my folks know I’m all
right.”
“So should I,” agreed Tom. “Dad will be in a fit when Koku and
Mr. Damon go back and tell him I fell overboard.”

You might also like