环境:本机同时安装了python27 跟 python 25
我的机器出现了这种情况
cmd:
>>> from distutils.sysconfig import get_python_lib
>>> print get_python_lib()
C:\python27\Lib\site-packages
其运行的版本也是python 2.7
双击运行文件的结果
G:\python\cocos\pyglet>testpath.py
C:\Python25\Lib\site-packages
	其运行版本为 python 2.5
修改注册表,环境变量均...
    
    
    
    
          #include <iostream>#include <cstring>using namespace std;int main(){    //源字符串    char str[100];    cin.get(str, 100);        //申请目标字符串的空间    size_t strLen = strlen(str);    char *des = new char[strLen + 1];    //源字符串上一次空格的位置    size_t lastIndex = 0;    for (size_t i = 0; i <= strLen; ++i)    {  ...
    
    
    
    
          #-*- coding: gbk -*-#素数环def IsPrimeNum(num):    for i in range(2, num):        if num % i == 0:            return False    return True    def GetPrimeDic(n):    Dic = {}    for i in range(1, n+1):        Dic[i] = []            for i in range(1, n+1, 2):        #even number        for j in range(2...
    
    
    
    
          
#include "stdafx.h"#include<iostream>#include<string>#include<sstream>using namespace std;class Computer{    double result;//保存运算结果    istringstream expr;  //保存表达示    int    paren; /*'(' paren加1,')'paren减1。一旦paren为负时就肯定是输入有错,运算全部结束后其值不为零也是出错。可以增加一个小类来做为paren的类型*/protected:    int   getSign();//...
    
    
    
    
          
//Rbtree.h#ifndef RBTREE#define RETREEtypedef int type;class Rbtree{    enum COLOR{RED,BLACK};    typedef struct Node    {        Node();        Node(type k);                /*Node(const Node&);*/        void* operator new(size_t size)        {            static int p = 0;            static...
    
    
    
    
          
#include<iostream>#include<string>using namespace std;class Computer{    double result;//保存运算结果    int    index; //保存expr的下标,index只会增大或者不变,不可能减少    string expr;  //保存表达示    int    paren; /*'(' paren加1,')'paren减1。一旦paren为负时就肯定是输入有错,运算全部结束后其值不为零也是出错。可以增加一个小类来做为paren的类型*/protected:    char getSign...
    
    
    
    
          #include<iostream>using namespace std;int jmpoftable[100][256];void Greattable(const char* str, int lenght)//跳转表的建立{    int i = 0;    for(const char *p = str; i<lenght; ++p,++i)
    {        jmpoftable[i][*p] = i+1;    }        for(int j = 1; j <= i; ++j)    {        int k = 0;        while(str[...
    
    
    
    
          
#include<iostream>#include<sstream>#include<algorithm>using namespace std;int main(){    int array[] = {0,1,2,3,4,5,6,7,8,9,10};    int size = sizeof(array)/sizeof(int);    int n;    cin >> n;    int* *index = new int*[size];    for(int i = 0; i < size; ++i)        index[i] = array+i;    int j ...
    
    
    
    
          
#include<iostream>using namespace std;int *arr;int n;void print(){    cout << n << " = " << arr[0];    int i = 1;    while(arr[i])        cout << " + " << arr[i++];    cout << endl;}void process(int arr[], int max, int n)//n为剩余值,max为当前位置可以为最大的数。{    arr[0] = max < n ? max : n;    if(n == 0)    ...
    
    
    
    
          #include<iostream>using namespace std;void printchar(int n, char ch){    for(int i = 0; i != n; ++i)    cout << ch;}void fun(int i, int j, int n){    printchar(i,' ');    printchar(j,'*');    cout << endl;    if(j<n)    {        fun(i-1,j+2,n);            printchar(i,' ');        printchar(j,'*')...
    
    
    
    
          /* Standard error macro for reporting API errors */ #define PERR(bSuccess, api){if(!(bSuccess)) printf("%s:Error %d from %s \     on line %d\n", __FILE__, GetLastError(), api, __LINE__);}void cls( HANDLE hConsole ){    COORD coordScreen = { 0, 0 };    /* here's where we'll home the               ...
    
    
    
    
          #include<iostream>using namespace std;void print(const int A[], const int B[], int Bn){    for (int i = 0; i != Bn; ++i)        cout << A[*(B+i)];}bool fun(int B[], int Bn, int An)//处理进位{    int x = Bn-1;    while(B[x] > x+An-Bn)    {        if(x == 0) return false;        B[x-1] += 1;        --x...
    
    
    
    
          关于声明,定义,初始化及赋值。//file 1int a;//定义:声明一个int类型的变量a,并为其分配存储空间,a的值为随机值(这块存储空间上原先的值)。//file 2extern int a;//声明:声明一个int类型的变量a,但并没有分配存储空间,诉编译器a是在别的地方(文件)定义。/*************end********************/int a = 0;//初值化(初始化还能分为直接初始化和复制初始化)int b;b = 0;//赋值/************************************/int a(0);//直接初始化int b ...