Python Shell For Mac



I am using Mac OS X, and I tried this import subprocess as sp sp.call('clear',shell=True) which works, except there is a 0 at the top of the terminal window. – Daniel Dropik Apr 6 '14 at 3:43 0 is the return value of the 'cls' command call from shell. I edited the answer to get rid of that as well, by simply storing that value in a variable. Python command will open a Python interpreter, where you can't run the python hello.py command so you got the syntax error (to run hello.py in python shell you need execfile (hello.py)) to quit the Python interpreter, type ctrl+d and than python hello.py to execute your hello world script.

Latest version

Released:

AWS Shell

Project description

aws-shell - The interactive productivity booster for the AWS CLI

Installation

The aws-shell requires python and pip to install.You can install the aws-shell using pip:

If you are not installing into a virtualenv you can run:

Mac OS X (10.11 El Capitan) users: There is a known issue with Apple andits included python package dependencies (more info athttps://github.com/pypa/pip/issues/3165).We are investigating ways to fix this issue but in the meantime,to install the aws-shell, you can run:sudo pip install aws-shell--upgrade--ignore-installed six

Once you’ve installed the aws-shell, you can now run:

To exit the shell, press Ctrl-D.

Upgrading the aws-shell

If you want to upgrade to the latest version of the aws-shell,you can run:

You can also use this upgrade command whenever a new version of the AWS CLI isreleased that includes new services and API updates. You will then beable to use these new services and API updates in the aws-shell.

Supported Python Versions

Mac

The aws-shell works on the same python versions supported by the AWS CLI:

  • 2.6.5 and greater
  • 2.7.x and greater
  • 3.3.x and greater
  • 3.4.x and greater

Configuration

The aws-shell uses the same configuration settings as the AWS CLI.If you’ve never used the AWS CLI before, the easiest way to getstarted is to run the configure command:

For more information about configure settings, see theAWS CLI Getting Started Guide.

Basic Usage

The aws-shell accepts the same commands as the AWS CLI, except you don’tneed to provide the aws prefix. For example, here are a few commandsyou can try:

Shell

Profiles

The aws-shell supports AWS CLI profiles. You have two options to useprofiles. First, you can provide a profile when you start the aws-shell:

When you do this all the server side completion as well as CLI commandsyou run will automatically use the prod profile.

You can also change the current profile while you’re in the aws-shell:

You can also check what profile you’ve configured in the aws-shell using:

After changing your profile using the .profile dot command, allserver side completion as well as CLI commands will automatically usethe new profile you’ve configured.

Python Shell For Mac

Features

Auto Completion of Commands and Options

The aws-shell provides auto completion of commands andoptions as you type.

Shorthand Auto Completion

The aws-shell can also fill in an example of theshorthand syntax used for various AWS CLI options:

Server Side Auto Completion

The aws-shell also leverages boto3, the AWS SDK for Python, to auto completeserver side resources such as Amazon EC2 instance Ids, Amazon Dynamodb tablenames, AWS IAM user names, Amazon S3 bucket names, etc.

This feature is under active development. The list of supported resourcescontinues to grow.

Fuzzy Searching

Every auto completion value supports fuzzy searching. This enables you tospecify the commands, options, and values you want to run with even lesstyping. You can try typing:

  • The first letter of each sub word: ec2 describe-reserved-instances-offerings-> ec2 drio
  • A little bit of each word: ec2 describe-instances -> ec2 descinst
  • Any part of the command: dynamodb table -> Offers all commands thatcontain the subsequence table.

Inline Documentation

The aws-shell will automatically pull up documentation as you type commands.It will show inline documentation for CLI options. There is also a separatedocumentation panel that will show documentation for the current command oroption you are typing. Pressing F9 will toggle focus to the documentation panelallowing you to navigate it using your selected keybindings.

Fish-Style Auto Suggestions

The aws-shell supports Fish-style auto-suggestions. Use the right arrow key tocomplete a suggestion.

Command History

The aws-shell records the commands you run and writes them to~/.aws/shell/history. You can use the up and down arrow keys to scrollthrough your history.

Toolbar Options

The aws-shell has a bottom toolbar that provides several options:

  • F2 toggles between fuzzy and substring matching
  • F3 toggles between VI and Emacs key bindings
  • F4 toggles between single and multi column auto completions
  • F5 shows and hides the help documentation pane
  • F9 toggles focus between the cli and documentation pane
  • F10 or Ctrl-D exits the aws-shell

Python Shell Scripting Mac

As you toggle options in the toolbar, your preferences are persistedto the ~/.aws/shell/awsshellrc file so that the next time you runthe aws-shell, your preferences will be restored.

Dot Commands

Python Shell Install

The aws-shell provides additional commands specific to the aws-shell.The commands are available by adding the . prefix before a command.

Online Python Shell

Exiting the Shell

You can run the .exit or .quit commands to exit the shell.

Creating Shell Scripts with .edit

Thunderbolt card for mac pro. There are times when you may want to take a sequence of commandsyou’ve run in the aws-shell and combine them into a shell script.In addition to the command history that’s persisted to thehistory file, the aws-shell also keeps track of all the commandsyou’ve run since you first started your aws-shell session.

Python

You can run the .edit command to open all these commands inan editor. The aws-shell will use the EDITOR environmentvariable before defaulting to notepad on Windows andvi on other platforms.

Changing Profiles with .profile

You can change the current AWS CLI profile used by the aws-shellby using the .profile dot command. If you run the .profilecommand with no arguments, the currently configured shell profilewill be printed.

.cd

You can change the current working directory of the aws-shell by usingthe .cd command:

Executing Shell Commands

The aws-shell integrates with other commands in several ways.First, you can pipe AWS CLI commands to other processes as wellas redirect output to a file:

Second, if you want to run a shell command rather than an AWS CLIcommand, you can add the ! prefix to your command:

Developer Preview Status

The aws-shell is currently in developer preview.We welcome feedback, feature requests, and bug reports.There may be backwards incompatible changes made in orderto respond to customer feedback as we continue to iterateon the aws-shell.

More Information

Below are miscellaneous links for more information:

Release historyRelease notifications | RSS feed

0.2.2

0.2.1

0.2.0

0.1.1

0.1.0

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for aws-shell, version 0.2.2
Filename, sizeFile typePython versionUpload dateHashes
Filename, size aws_shell-0.2.2-py2.py3-none-any.whl (50.6 kB) File type Wheel Python version py2.py3 Upload dateHashes
Filename, size aws-shell-0.2.2.tar.gz (55.4 kB) File type Source Python version None Upload dateHashes
Close

Hashes for aws_shell-0.2.2-py2.py3-none-any.whl

Hashes for aws_shell-0.2.2-py2.py3-none-any.whl
AlgorithmHash digest
SHA256dc7a7d8bd831021f4fe6fe67d35757d9f8bf83a28693d3fff57aa114861f7367
MD5c6d1b5cf652ed2b8d784e58be28c2b0d
BLAKE2-256cb019e5d72ebf69dc670ceaab4cfe4d4db92256ae2c332fc5b16c90301065ed6
Close

Hashes for aws-shell-0.2.2.tar.gz

Hashes for aws-shell-0.2.2.tar.gz
AlgorithmHash digest
SHA256fd1699ea5f201e7cbaacaeb34bf1eb88c8fe6dc6b248bce1b3d22b3e099a41e5
MD589b53102973bffd07a69fc74a93ac67c
BLAKE2-2560131ee166a91c865a855af4f15e393974eadf57762629fc2a163a3eb3f470ac5

Release Date: June 27, 2018

Python 3.7.0 was the initial feature release of Python 3.7.

There are now newer bugfix releases of Python 3.7 that supersede 3.7.0 and Python 3.8 is now the latest feature release of Python 3. Get the latest releases of 3.7.x and 3.8.x here. We plan to continue to provide bugfix releasesfor 3.7.x until mid 2020 and security fixes until mid 2023.

Among the major new features in Python 3.7 are:

  • PEP 539, new C API for thread-local storage
  • PEP 545, Python documentation translations
  • New documentation translations: Japanese,French, andKorean.
  • PEP 552, Deterministic pyc files
  • PEP 553, Built-in breakpoint()
  • PEP 557, Data Classes
  • PEP 560, Core support for typing module and generic types
  • PEP 562, Customization of access to module attributes
  • PEP 563, Postponed evaluation of annotations
  • PEP 564, Time functions with nanosecond resolution
  • PEP 565, Improved DeprecationWarning handling
  • PEP 567, Context Variables
  • Avoiding the use of ASCII as a default text encoding (PEP 538, legacy C locale coercionand PEP 540, forced UTF-8 runtime mode)
  • The insertion-order preservation nature of dict objects is now an official part of the Python language spec.
  • Notable performance improvements in many areas.

Please see What’s New In Python 3.7 for more information.

  • PEP 537, 3.7 Release Schedule
  • Report bugs at https://bugs.python.org.
  • Help fund Python and its community.
  • The binaries for AMD64 will also work on processors that implement the Intel 64 architecture. (Also known as the 'x64' architecture, and formerly known as both 'EM64T' and 'x86-64'.)
  • There are now 'web-based' installers for Windows platforms; the installer will download the needed software components at installation time.
  • There are redistributable zip files containing the Windows builds, making it easy to redistribute Python as part of another software package. Please see the documentation regarding Embedded Distribution for more information.
  • For 3.7.0, we provide two binary installer options for download. The default variant is 64-bit-only and works on macOS 10.9 (Mavericks) and later systems. We also continue to provide a 64-bit/32-bit variant that works on all versions of macOS from 10.6 (Snow Leopard) on. Both variants now come with batteries-included versions oF Tcl/Tk 8.6 for users of IDLE and other tkinter-based GUI applications; third-party and system versions of Tcl/Tk are no longer used. Consider using the new 10.9 64-bit-only installer variant, unless you are building Python applications that also need to work on older macOS systems.
  • Both python.org installer variants include private copies of OpenSSL 1.1.0. Please carefully read the Important Information displayed during installation for information about SSL/TLS certificate validation and the Install Certificates.command.
VersionOperating SystemDescriptionMD5 SumFile SizeGPG
Gzipped source tarballSource release41b6595deb4147a1ed517a7d9a58027122745726SIG
XZ compressed source tarballSource releaseeb8c2a6b1447d50813c02714af4681f316922100SIG
macOS 64-bit/32-bit installerMac OS Xfor Mac OS X 10.6 and laterca3eb84092d0ff6d02e42f63a734338e34274481SIG
macOS 64-bit installerMac OS Xfor OS X 10.9 and laterae0717a02efea3b0eb34aadc680dc49827651276SIG
Windows help fileWindows46562af86c2049dd0cc7680348180dca8547689SIG
Windows x86-64 embeddable zip fileWindowsfor AMD64/EM64T/x64cb8b4f0d979a36258f73ed541def10a56946082SIG
Windows x86-64 executable installerWindowsfor AMD64/EM64T/x64531c3fc821ce0a4107b6d2c6a129be3e26262280SIG
Windows x86-64 web-based installerWindowsfor AMD64/EM64T/x643cfdaf4c8d3b0475aaec12ba402d04d21327160SIG
Windows x86 embeddable zip fileWindowsed9a1c028c1e99f5323b9c20723d7d6f6395982SIG
Windows x86 executable installerWindowsebb6444c284c1447e902e87381afeff025506832SIG
Windows x86 web-based installerWindows779c4085464eb3ee5b1a4fffd0eabca41298280SIG