小编sri*_*sar的帖子

如何在python中的reportlab Canvas中设置任何字体?

我正在使用reportlab来创建pdfs.当我尝试使用以下方法设置字体时,我得到一个KeyError:

pdf = Canvas('test.pdf')
pdf.setFont('Tahoma', 16)
Run Code Online (Sandbox Code Playgroud)

但如果我使用'Courier'而不是'Tahoma'没有问题.我怎么用Tahoma?

python reportlab

34
推荐指数
2
解决办法
2万
查看次数

如何使用批处理文件运行多个程序

我喜欢使用批处理文件运行两个程序,但条件是,第二个程序必须在第一个程序加载后启动,所以有没有办法控制使用计时器来控制程序何时启动.

batch-file

15
推荐指数
4
解决办法
6万
查看次数

如何在Windows中将cmthon添加到cmd

我安装了python 3.1,并且我已将它添加到系统路径中.现在我可以打开"cmd"并键入python来启动python,但每当我尝试使用(shift +右键单击 - >打开命令提示符)在特定目录中打开cmd,并键入python时,它会显示"command not found "!

我怎样才能解决这个问题?

python windows python-3.x

13
推荐指数
2
解决办法
4万
查看次数

我必须安装jdk win64吗?

我已经安装了Windows 7 x64,因此我是否需要安装JDK x64或JDK x86时会感到困惑?请帮帮我,谢谢

java 64-bit jvm jdk1.6 windows-7-x64

8
推荐指数
2
解决办法
1万
查看次数

为什么比较C中的字符串不起作用?

我有以下程序

main()
{

    char name[4] = "sara";
    char vname[4] = "sara";

    if(strcmp(name, vname) == 0)
    {
        printf("\nOK");
    }
    else
    {
        printf("\nError");
    }

}
Run Code Online (Sandbox Code Playgroud)

这个程序总是打印"错误"......这里有什么问题帮助我

但如果我更改char vname [] ="sara",那么它打印出"OK"......为什么?

c

4
推荐指数
3
解决办法
5755
查看次数

为什么这个奇怪的输出在c?

我有以下程序

#include <stdio.h>

main()
{

    char ch[10];

    gets(ch);

    printf("\nTyped: %s\n\n", ch);

    int i = 0;
    while ( ch[i] != '\0' )
    {
        printf("Letter: %c\n", ch[i]);
        i++;
    }

    printf("\nTyped: %s\n\n", ch);


}
Run Code Online (Sandbox Code Playgroud)

这是输入"Hello world is good"时的输出

hello world is good

Typed: hello world is good

Letter: h
Letter: e
Letter: l
Letter: l
Letter: o
Letter:
Letter: w
Letter: o
Letter: r
Letter: l
Letter:


Typed: hello worl?
Run Code Online (Sandbox Code Playgroud)

为什么我在while循环后为同一命令获得两个不同的输出?虽然循环与它有任何关系..请帮助..

c

1
推荐指数
2
解决办法
104
查看次数

标签 统计

c ×2

python ×2

64-bit ×1

batch-file ×1

java ×1

jdk1.6 ×1

jvm ×1

python-3.x ×1

reportlab ×1

windows ×1

windows-7-x64 ×1