Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7897985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:18:41+00:00 2026-06-03T08:18:41+00:00

What should I do if I want to call command like terminal(ubuntu) from python

  • 0

What should I do if I want to call command like terminal(ubuntu) from python 2.7
so I want to use nfc-mfclassic which it able to use in terminal of ubuntu…Someone can help me to use that in python please..

I run this thing :nfc-mfclassic r a dumptest.mfd in terminal (Ubuntu)

Usage: nfc-mfclassic r|w a|b <dump.mfd> [<keys.mfd>]
  r|w           - Perform read from (r) or write to (w) card
  a|b           - Use A or B keys for action
  <dump.mfd>    - MiFare Dump (MFD) used to write (card to MFD) or (MFD to card)
  <keys.mfd>    - MiFare Dump (MFD) that contain the keys (optional)
Or: nfc-mfclassic x <dump.mfd> <payload.bin>
  x             - Extract payload (data blocks) from MFD
  <dump.mfd>    - MiFare Dump (MFD) that contains wanted payload
  <payload.bin> - Binary file where payload will be extracted
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T08:18:42+00:00Added an answer on June 3, 2026 at 8:18 am

    You can use subprocess directly, but there are a couple of very good subprocess wrappers that will make your life a lot easier.

    I like PBS:

    PBS is a unique subprocess wrapper that maps your system programs to Python functions dynamically. PBS helps you write shell scripts in Python by giving you the good features of Bash (easy command calling, easy piping) with all the power and flexibility of Python.

    Example:

    import pbs
    print pbs.nfc_mfclassic("r", "a", "dumptest.mfd")
    

    If you want to deal with an iterative application, perhaps you should look for something like pyexpect:

    # This connects to the openbsd ftp site and
    # downloads the recursive directory listing.
    import pexpect
    child = pexpect.spawn ('ftp ftp.openbsd.org')
    child.expect ('Name .*: ')
    child.sendline ('anonymous')
    child.expect ('Password:')
    child.sendline ('noah@example.com')
    child.expect ('ftp> ')
    child.sendline ('cd pub')
    child.expect('ftp> ')
    child.sendline ('get ls-lR.gz')
    child.expect('ftp> ')
    child.sendline ('bye')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to write a small program that should print something like testing CPU...
I have a .jar file which has a command line interface. I want to
So I want to be able to do the following in PHP. From the
I need to run a shell command asynchronously from a Python script. By this
Using Python I can test my code in the terminal / command line by
I want to call a thor task from a Migration. With rake I can
I'm trying to use C# to control a command line application background, which can
Should be simple and quick: I want a C# equivalent to the following Java
I want to define a constant that should be available in all of the
Should I wrap all the files I want to install in individual components? What

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.