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

  • SEARCH
  • Home
  • 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 709799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:32:37+00:00 2026-05-14T04:32:37+00:00

I want to execute python code from C# with following code. static void Main(string[]

  • 0

I want to execute python code from C# with following code.

   static void Main(string[] args)
    {
        ScriptEngine engine = Python.CreateEngine();
        ScriptSource source = engine.CreateScriptSourceFromFile(@"F:\Script\extracter.py");
        source.Execute();
    }

I have the problem at line source.Execute(), I got error “No module named difflib”.
What is wrong in my code?

This is my python code (extracter.py).

import re
import itertools
import difflib
print "Hello"
  • 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-05-14T04:32:37+00:00Added an answer on May 14, 2026 at 4:32 am

    This looks like your engine does not have access to Python standard library – it does not see difflib.py. Either fix the sys.path or copy difflib.py from Python 2.6 to f:\script folder.

    re and itertools modules are written in C# and are part of IronPython.modules.dll – that’s why importing them work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 508k
  • Answers 508k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I would do it like this: <script type="javascript/text" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script… May 16, 2026 at 4:17 pm
  • Editorial Team
    Editorial Team added an answer Firstly, I would recommend replacing the line Process process =… May 16, 2026 at 4:17 pm
  • Editorial Team
    Editorial Team added an answer See this http://www.jsfiddle.net/ , that might help you in understand… May 16, 2026 at 4:17 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I run the following code from a python interpreter, and expect the insert statement
How do I execute a string containing Python code in Python? Editor's note: Never
I'm trying to write a python script that does the following from within a
I want to read and write python-source-files from the file system in a thread-safe
I want to execute a Powershell script from SQL Server's maintenance plan. This is
I have some code that I want to execute as follows. But I keep
In VIM, I want to execute a command (like :!mkdir src/main/scala/xxx ) Then, I
I want to execute stored procedure with one parameter that returns table using EF4
In my application, I want to execute logic at the very last moment. The
I have a User1 belonging to primarygroup Group1 in linux. I want to execute

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.