• 大小: 1.27MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-01-01
  • 语言: C#
  • 标签: C#  Python  C#调用Py  

资源简介

开发环境:vs2017 framework4.7.2 关于python 自己在vs2017里安装好。也可以不在vs2017里安装。 调试流程: 打开源码,运行调试,看看python文件路径,根据您的机器硬盘位置修改一下。如果感觉framework版本太高,自己改一下项目的版本就行。

资源截图

代码片段和文件信息

# -*- coding: utf-8 -*-

import time

‘‘‘
输入一个名字,返回直接打招呼的整个字符串。
‘‘‘
def SayHelloToWhom(name):
    t = time.localtime
    showtime = time.strftime(‘%Y.%m.%d %H:%M:%S‘time.localtime(time.time()))
    str = ‘Hello %s! Today is %s‘ % (nameshowtime)
    # print(str)
    return str

# abc = SayHelloToWhom(‘王小二‘)
# print(“duo 多重显示 %s“ % abc)


‘‘‘
稍微复杂一点的方法,套用。
‘‘‘
def AuthorSayToYou(name):
    t = time.localtime
    showdate = time.strftime(‘%Y.%m.%d‘time.localtime(time.time()))
    str = ‘Today is %s \n\r我是电子信息产业不的UFO,哈哈。在这里向你问好。\n\r你好呀!\n\r%s!‘ % (showdateSayHelloToWhom(name))
    return str



number = 0 #数数用的变量,看看能不能连续上涨。
‘‘‘
看看这个数数问题。
在py文件中都是相同的、但调用结果不同,有往上连续涨的,也有不变的。
‘‘‘
def GetNumber(): 
    global number
    number = number+1
    return number


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    ..A..H.     58880  2019-03-29 11:31  CSharpWithPython\.vs\CSharpWithPython\v15\.suo

     文件        189  2019-03-29 08:31  CSharpWithPython\CSharpWithPython\App.config

     文件      14336  2019-03-29 11:27  CSharpWithPython\CSharpWithPython\bin\Debug\CSharpWithPython.exe

     文件        189  2019-03-29 08:31  CSharpWithPython\CSharpWithPython\bin\Debug\CSharpWithPython.exe.config

     文件      24064  2019-03-29 11:27  CSharpWithPython\CSharpWithPython\bin\Debug\CSharpWithPython.pdb

     文件      22984  2019-03-29 08:31  CSharpWithPython\CSharpWithPython\bin\Debug\CSharpWithPython.vshost.exe

     文件        189  2019-03-29 08:31  CSharpWithPython\CSharpWithPython\bin\Debug\CSharpWithPython.vshost.exe.config

     文件        490  2017-09-29 21:43  CSharpWithPython\CSharpWithPython\bin\Debug\CSharpWithPython.vshost.exe.manifest

     文件    1802752  2018-02-16 14:52  CSharpWithPython\CSharpWithPython\bin\Debug\IronPython.dll

     文件    1069568  2018-02-16 14:52  CSharpWithPython\CSharpWithPython\bin\Debug\Microsoft.Dynamic.dll

     文件     140800  2018-02-16 14:52  CSharpWithPython\CSharpWithPython\bin\Debug\Microsoft.scripting.dll

     文件       4154  2019-03-29 10:13  CSharpWithPython\CSharpWithPython\CSharpWithPython.csproj

     文件       6399  2019-03-29 11:30  CSharpWithPython\CSharpWithPython\DemoMain.cs

     文件       9842  2019-03-29 11:08  CSharpWithPython\CSharpWithPython\DemoMain.Designer.cs

     文件       6215  2019-03-29 11:08  CSharpWithPython\CSharpWithPython\DemoMain.resx

     文件          0  2019-03-29 11:27  CSharpWithPython\CSharpWithPython\obj\Debug\CSharpWithPython.csproj.CopyComplete

     文件         42  2019-03-29 10:13  CSharpWithPython\CSharpWithPython\obj\Debug\CSharpWithPython.csproj.CoreCompileInputs.cache

     文件       1248  2019-03-29 09:52  CSharpWithPython\CSharpWithPython\obj\Debug\CSharpWithPython.csproj.FileListAbsolute.txt

     文件       1015  2019-03-29 11:13  CSharpWithPython\CSharpWithPython\obj\Debug\CSharpWithPython.csproj.GenerateResource.cache

     文件      62024  2019-03-29 10:07  CSharpWithPython\CSharpWithPython\obj\Debug\CSharpWithPython.csprojAssemblyReference.cache

     文件        180  2019-03-29 11:13  CSharpWithPython\CSharpWithPython\obj\Debug\CSharpWithPython.DemoMain.resources

     文件      14336  2019-03-29 11:27  CSharpWithPython\CSharpWithPython\obj\Debug\CSharpWithPython.exe

     文件      24064  2019-03-29 11:27  CSharpWithPython\CSharpWithPython\obj\Debug\CSharpWithPython.pdb

     文件        180  2019-03-29 10:13  CSharpWithPython\CSharpWithPython\obj\Debug\CSharpWithPython.Properties.Resources.resources

     文件        831  2019-03-29 08:41  CSharpWithPython\CSharpWithPython\obj\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       7299  2019-03-29 10:13  CSharpWithPython\CSharpWithPython\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件          0  2019-03-29 08:31  CSharpWithPython\CSharpWithPython\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs

     文件          0  2019-03-29 08:31  CSharpWithPython\CSharpWithPython\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

     文件          0  2019-03-29 08:31  CSharpWithPython\CSharpWithPython\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs

     文件        531  2019-03-29 08:32  CSharpWithPython\CSharpWithPython\Program.cs

............此处省略34个文件信息

评论

共有 条评论