现在我正在使用Pyinstaller.我有一个脚本从img文件夹中获取图像..
/python
|----/img
|----|----icon1.ico
|----|----icon2.ico
|----maint.py
Run Code Online (Sandbox Code Playgroud)
我生成.exe的脚本是
pyinstaller.py --windowed --noconsole --clean --onefile maint.py
Run Code Online (Sandbox Code Playgroud)
问题是只生成.exe文件但是省略了整个文件夹/ img.
问题:为了自动获取.exe文件+/img文件夹,我需要在上一行中添加哪种附加语法?
2013年12月18日更新
我的意思是:执行pyinstaller.py脚本后,所有参数,我必须在/ dist文件夹中看到:.exe文件+/img文件夹,包含我的应用程序的所有图标或位图文件
谢谢
我正在开发基于Java Swing的应用程序+ Hibernate + Mysql + Spring.当我测试CRUD操作时,我没有读取问题,但在insert语句系统中显示消息:
Unknown system variable `tx_read_only`
Run Code Online (Sandbox Code Playgroud)
我有最新版本的MySQl
你能告诉我现在要解决的问题是什么吗?
有人知道为什么在JtextField中,当我设置setDocument()属性-class PlainDocument-当我执行程序时,它向我显示字段ok,但只有我可以输入N-1个字符,当我将maxlength prop设置为N字符长度.
// Block 1
txtPais.setDocument(new MaxLengthTextCntry());
Run Code Online (Sandbox Code Playgroud)
我有另一个内部设置最大长度的类
// Block 2
public class MaxLengthTextCntry extends MaxLengthGeneric{
public MaxLengthTextCntry(
{
super(2);
}
}
Run Code Online (Sandbox Code Playgroud)
最后是MaxLengthGeneric类
// Block 3
public abstract class MaxLengthGeneric extends PlainDocument {
private int maxChars;
public MaxLengthGeneric(int limit) {
super();
this.maxChars = limit;
}
public void insertString(int offs, String str, AttributeSet a)
throws BadLocationException {
if (str != null && (getLength() + str.length() < maxChars)) {
super.insertString(offs, str, a);
}
}
}
Run Code Online (Sandbox Code Playgroud)
解
维护块2,我用块1代替了块1
((AbstractDocument) txtRucnumero.getDocument()).setDocumentFilter(new …Run Code Online (Sandbox Code Playgroud)