我正在使用reportlab来创建pdfs.当我尝试使用以下方法设置字体时,我得到一个KeyError
:
pdf = Canvas('test.pdf')
pdf.setFont('Tahoma', 16)
Run Code Online (Sandbox Code Playgroud)
但如果我使用'Courier'
而不是'Tahoma'
没有问题.我怎么用Tahoma?
我喜欢使用批处理文件运行两个程序,但条件是,第二个程序必须在第一个程序加载后启动,所以有没有办法控制使用计时器来控制程序何时启动.
我安装了python 3.1,并且我已将它添加到系统路径中.现在我可以打开"cmd"并键入python来启动python,但每当我尝试使用(shift +右键单击 - >打开命令提示符)在特定目录中打开cmd,并键入python时,它会显示"command not found "!
我怎样才能解决这个问题?
我已经安装了Windows 7 x64,因此我是否需要安装JDK x64或JDK x86时会感到困惑?请帮帮我,谢谢
我有以下程序
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"......为什么?
我有以下程序
#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 ×2
python ×2
64-bit ×1
batch-file ×1
java ×1
jdk1.6 ×1
jvm ×1
python-3.x ×1
reportlab ×1
windows ×1