question on callback functions with ctypes
I try to use GoVCL( https://github.com/ying32/govcl ) in python via
ctypes. GoVCL supplies C header and simple C demo under
https://github.com/ying32/govcl/tree/master/Tools/makeCHeader/test
Now the simple python code can run on both win7 and win10
The attachment is a very simple code that uses the DLL from
https://github.com/ying32/govcl to create a GUI application. The code
runs on my python 3.6.10 64 bits with win7 64 bits, but failed on my
python 3.6.10 64 bits and python 3.7.5 with win10 64 bits, by saying
following message. What is the
I wrote a post on
https://stackoverflow.com/questions/53833884/failed-to-show-calculation-steps-with-sympy-and-markdown
Now I wrote https://github.com/retsyo/expand_expression to answer the
post partly
I released it for it can help others.
Thanks
--
sorry, I mean "PEP 465 - A dedicated infix operator for matrix
multiplication" on
https://docs.python.org/3/whatsnew/3.5.html#whatsnew-pep-465
2017-07-15 20:05 GMT+08:00 Matt Wheeler <m...@funkyhat.org>:
> On Sat, 15 Jul 2017, 12:35 oyster, <lepto.pyt...@gmail.com> wrote
as the title says. has @ been used in projects?
--
https://mail.python.org/mailman/listinfo/python-list
why does not type(subprocess.Popen)==? Thanks
[quote]
Python 3.4.4 |Anaconda 2.3.0 (64-bit)| (default, Feb 16 2016, 09:54:04) [MSC v.1
600 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> type(subprocess.Popen)
>>> import
for a simple code
[code]
vexList = [1, 2, 3]
print('vexList', list(vexList))
vexList=map(lambda e: e+1, vexList)
print('vexList', list(vexList))
vexList = list(vexList)
print('vexList', list(vexList))
vexList=map(lambda e: e*2,vexList)
print('vexList', list(vexList))
[/code]
py27 says
[quote]
there is shutil module, but I find it limits the user heavily. For
example, I want to move 2 directories "a/scene" and "c/scene" to "d",
but there is "scene" under d already. Then shutil.move will raise
Error, "Destination path '%s' already exists" % real_dst
So is there any module, which allow
First of all, thank you all for your answers. I received python
mail-list in a daily digest, so it is not easy for me to quote your
mail separately.
I will try to explain my situation to my best, but English is not my
native language, I don't know whether I can make it clear at last.
Every
I have a long text, which should be splitted into some sections, where
all sections have a pattern like following with different KEY. And the /n/r
can not be used to split
I don't know whether this can be done easily, for example by using RE module
[demo text starts]
a line we do not need
I am
I found an extension on this blog
http://www.cnblogs.com/DxSoft/archive/2011/04/08/2009132.html
or you can download the extension directly from
http://files.cnblogs.com/DxSoft/PyFetion.rar
I found that I can do from DxVcl import * in py 2.5/2.6/2.7. When I try
this in py24, a msgbox says no
I want to make an animated GIF from 3200+ png
I searched and found http://code.google.com/p/visvis/source/browse/#hg/vvmovie
and I wrote:
[code]
allPic=glob.glob('*.png')
allPic.sort()
allPic=[Image.open(i) for i in allPic]
writeGif('lala3.gif',allPic, duration=0.5, dither=0)
[/code]
However I
Can any image(not for line plot, but for pixel set) lib behaves like a
person? that is to say:
when we are doing image processing( for exapmle,
http://www.freebasic.net/forum/viewtopic.php?f=17t=20057p=176300#p176300)
, the new image maybe have a bigger canvas size than the original
image's, and
I want to use python to do some automatical operation on windows.
the following is the code, which try to open a file with unicode
characters in its filename in msword
but I can't get it work correctly. Can anybody help me?
if that is the shortcoming of WScript, is there any other way to do so
in
I mean writeonly, hidden, system and so on attributes
I use windows, but if possible, is there any method to do so in a
crossplatfrom way?
thanks
--
http://mail.python.org/mailman/listinfo/python-list
My problem is some complex, because some condition is not supplied as a
given value
please have a look at
http://www.lusiya.com/bbs/attachment/thumb/Mon_0906/80_3201_d2fa7bd75d28675.jpg
because I have to do futher calculation based on previous steps as
nice
the only pity is that amcharts is not a money-free product
--
http://mail.python.org/mailman/listinfo/python-list
in my case, I want to replace all the function name with '', that is
sin(1) - (1)
sin(pi*(2+4)) - (pi*(2+4))
how can I use RE in this situation? thanx
--
http://mail.python.org/mailman/listinfo/python-list
I have some strings, and I want to write them into a text files, one
string one line
but there is a requirement: every line has a max length of a certain
number(for example, 10), so I have to replace extra SPACE*3 with
SPACE*2, at the same time, I want to make the string looks good, so,
for I
even '
b= evenReplace(a, 27)
print 'a=%s, len=%0i' %(a, len(a))
print 'b=%s, len=%0i' %(b, len(b))
print
[/code]
2009/6/2 oyster lepto.pyt...@gmail.com:
I have some strings, and I want to write them into a text files, one
string one line
but there is a requirement: every line has
I have to say: please let dabo use english if it does not find any
langauge resource!
I have 'e:\prg\py\sap-24\python
e:\prg\py\pure_pylib\_dabo\tools\remove_dLocalize.py .', but then the
scripts says 'I don't know _
--
http://mail.python.org/mailman/listinfo/python-list
I want to extract some pages from vary pdf files, then write them
with/witout rotation into one new pdf file. something likes this
[py]
import gfx
doc = gfx.open(pdf, rTheory.pdf)
pdf = gfx.PDF()
for pagenr in [1,5,7]:
page = doc.getPage(pagenr)
if pagenr==1:
page.rotate(90)
I have read for many times that the modern appliaction (not a web one,
but desktop on) uses html + js for its UI, and python code is for the
background work
but I have never found event a simple (yet completed) article on how
to develop such a thing from scrach in these advocacy thing.
Can anyone
I mean chart, not plot. If you don't know the difference, you can
check www.advsofteng.com, which is a commercial program
is there such a thing with many kinds of chart, i.e. pie-chart,
line-chart, ..?
A long time ago, I programmed a rmchart interface, however rmchart is
windows only, and
I mean not a code to do seperated functions, but a real project
I have read the doc of pysqlite, but since I know little about
database, I found it is still very hard for me to cook a real database
app from the scratch with the help of codelet in pysqlite doc. here is
the simplified details:
is there any this kind of lib for python?
thanx
--
http://mail.python.org/mailman/listinfo/python-list
Hi, guys, my fib(xx) is just an example to show what is a single
function and what is the effect I expect to see when enable
multi-core.
My real purpose is to know whether multi-core can help to improve the
speed of a common function. But I know definitely that the answer is
NO.
--
I mean this
[code]
def fib(n):
if n=1:
return 1
return fib(n-1)+fib(n-2)
useCore(1)
timeit(fib(500)) #this show 20 seconds
useCore(2)
timeit(fib(500)) #this show 10 seconds
[/code]
Is it possible?
and more, can threads/multi-processors/clusters be used to improve fib?
thanx
--
there are some pics(most of them are JPGs) on my disk, but some are
not completed, that is to say, if I view it in irfanview, the bottom
is displayed as a gray block.
so I want to check where they are completed. but how to do that in python?
(No, I am not saying how to tell the fileszie when I
http://www.terrainformatica.com/htmlayout/ uses its own lightweight
HTML rendering engine, helps you to create applications with the Web
style user interface
http://ubrowser.com/ is a library that makes it a little easier to
embed the Mozilla Gecko rendering engine into your application
is there
you can try jungle ( http://www.suda-chen.biz/?page_id=21 ) also
-- 已转发邮件 --
From: MRAB [EMAIL PROTECTED]
To: python-list@python.org
Date: Mon, 20 Oct 2008 15:47:55 -0700 (PDT)
Subject: Re: Creating single .exe file without py2exe and pyinstaller
On Oct 20, 4:48 pm, Larry
I don't remember its name very clear, it may be 'jingle' or not
this program runs on windows and can compile a python program into exe
file without gcc
it has no webspace but is announced on the author's blog when I find
it some times ago.
I can't find the link now. I there anybody else know it
but the pyparsing.py in pyparsing-1.5.1.tar.gz is marked as 2008-10-02
I think it is good too touch all the files' time up-to-date.
--
http://mail.python.org/mailman/listinfo/python-list
I believe that is the problem with encode/code.
you can find more @ http://groups.google.com/group/python-cn
--
http://mail.python.org/mailman/listinfo/python-list
10, 2008 at 10:16 PM, oyster [EMAIL PROTECTED] wrote:
os.utime works only against files. so what to do for a directory?
thanx
Not sure why you'd say that.
I am. He's running Windows.
drwxr-xr-x 2 tjg tjg 68 Oct 10 22:23 test
([EMAIL PROTECTED]) python
os.utime works only against files. so what to do for a directory?
thanx
--
http://mail.python.org/mailman/listinfo/python-list
my code is not right, can sb give me a hand? thanx
for example, I have 1000 urls to be downloaded, but only 5 thread at one time
def threadTask(ulr):
download(url)
threadsAll=[]
for url in all_url:
task=threading.Thread(target=threadTask, args=[url])
threadsAll.append(task)
for
For many external lib, python( and www.freebasic.net) use only the DLL
version, whcih is very big often if we want to release our program.
So, is there such a tool that can scan a DLL then strip the unused
function's code out, so yields a small working DLL?
for example, in my program I use only
in fact, during my work, I often write documnets in ms-word. But the
doc has many numbers in it, which need to be calculated and to be
modified frequently.
Is there a method to write a ms-word add-in, so that
1.I can type in the calculation steps in some program language,
please have a look at
In my ms-word documnet, there are some calculation whihc I have to
change due to different argumnet. is there any way to embed python
code in word, so that I can write the following as a macro or
something else, then the result (i.e. 2) is shown in the word
documnet?
def f(n):
if n2:
return
there is 2 files: text2pdf.py and cab.py
but I get a cab, in which there is a file text2pdf.py in it, but
cab.py is created as a directory!
[your cab.py starts]
blahblah
if __name__ == __main__:
import os, glob
hfci = HFCI(my-first.cab, verbose=1)
files = glob.glob(r*.py)
for fnm
My py24 is installed in h:\python24
I installed pyglet(http://pyglet.org/) in
H:\pure_pylib\Multimedia\pyglet-1.0\, if I do
[code]
import sys
sys.path.append(r'H:\pure_pylib\Multimedia\pyglet-1.0')
import pyglet
[/code]
it is ok.
but if I created h:\pure_pylib\pyglet.pth file, which containts
question
On Jul 14, 6:26 am, oyster [EMAIL PROTECTED] wrote:
My py24 is installed in h:\python24
I installed pyglet(http://pyglet.org/) in
H:\pure_pylib\Multimedia\pyglet-1.0\, if I do
[code] import sys
sys.path.append(r'H:\pure_pylib\Multimedia\pyglet-1.0')
import pyglet
[/code
currently I am using
[code]
req=urllib2.Request(url)
data=''
if '/htm' not in data:
fd=urllib2.urlopen(req)
data=fd.read()
time.sleep(10)
time.sleep(10)
blahblah
[/code]
Is there any other ready-to-use function? And what if the internet
connection is chocked so that the
It is so funny that the official GUI lib for python is Tkinter, but I
cannot find an articles which explains indetail how can we use
thounsands of Tcl/Tk widget in Tkinter.
For example, I have download the dll at
http://www.hwaci.com/sw/tkhtml/index.html, renamed it to tkhtml12.dll
and put it in
that is, there is no TABLE tag between a TABLE, for example
table something with out table tag/table
what is the RE pattern? thanks
the following is not right
table.*?[^table]*?/table
--
http://mail.python.org/mailman/listinfo/python-list
that is an html editor with text and picture, while the picture is
linked to the local image file.
for wxPython, the richtextcontrol save the image as en embedded
object, so it is not my choice
is there any other GUI lib and/or sample code to do so?
thanks
--
why the following 2 prg give different results? a.py is ok, but b.py
is 'undefiend a'
I am using Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC
v.1310 32 bit (Intel)] on win32
#a.py
def run():
if 1==2:# note, it always False
global a
a=1
run()
a
Pyharu is a pure python interface to haru(Haru Free PDF Library,
http://libharu.sourceforge.net/) via ctypes. All of the C API is
usable. All the example programs in haru C src has been ported. It
(should) run on windows/linux without modification.
Pyharu is only 1M, which is small and easy to
As you may know, there is no beautiful and free chart(not plot, you
can find the examples at http://www.jfree.org/jfreechart,
http://www.rmchart.com) module for python than runs on
windows/linux/mac osx.
On the other hand, there is a living
package(http://www.jfree.org/jfreechart) for java, and
am, oyster [EMAIL PROTECTED] wrote:
As you may know, there is no beautiful and free chart(notplot, you
can find the examples
athttp://www.jfree.org/jfreechart,http://www.rmchart.com) module for python
than runs on
windows/linux/mac osx.
Actually, may I humbly suggest two:
Chaco: http
2008/1/9, [EMAIL PROTECTED] [EMAIL PROTECTED]:
Date: Tue, 8 Jan 2008 17:11:18 -0800 (PST)
Subject: ctypes
1. please make your title more specific
from ctypes import *
cdecl =
cdll.LoadLibrary(c:\projects\python\geinterface.dll)
2. are you sure '\' is ok?
you need wx-c.so from wxnet.sourceforge.net on linux
My source uses wx-c.dll, because I am in ms win2k
On Jan 4, 10:30 pm, Nick Craig-Wood [EMAIL PROTECTED] wrote:
oyster [EMAIL PROTECTED] wrote:
The following is my pure-python wxwidgets test.
It is hardly pure python since it depends
The following is my pure-python wxwidgets test. It runs and give a
frame, but soon python comes up to say unexpected parameter
'mini.py' and I have to close it.
I cannot find the reason. Can somebody give me a hint to let it work
well? Thanks
http://pyguiviactypes.googlepages.com/mini.py
--
For the word Pure, I mean it is not a C/C++/Z++.. extension, so that
we can use it under pythons of different version. Is it possible?
I don't like to update the module for different python and the module
Currently, I am writing the interface to
iup(http://www.tecgraf.puc-rio.br/iup) via ctypes,
1. What is it?
pyRMChart is an interface to DLL-verison
RMChart(http://rmchart.com), which is a free, lightweight and elegant
chart creator
2. Dependency?
Python + ctypes
3. How to install?
a) you should install RMChart and make sure it works. On
win2k/me/98, maybe you have to get a copy
I am porting www.rmchart.com to python, now the code is almost
finished, and I have supplied some examples.py which write to
picturefiles directly, but the example to draw the chart on GUI stops
me.
that is the vb declaration
nResult (LONG) = RMC_CreateChartOnDC(
ByVal nParentDC (LONG),
ByVal
you can download the files at
http://www.newsmth.net/att.php?s.284.38015.655.zip
the dll and exe are created by freebasic
import ctypes
mydll=ctypes.windll.LoadLibrary(mydll.dll)
_TwoTimes=getattr(mydll,'[EMAIL PROTECTED]')
_TwoTimes.argtypes=[ctypes.c_double]
def TwoTimes(i):
return
as the title says, and thanx.
for example, that is the help on cpselect(input, base) starts the Control
Point Selection Tool (
www.mathworks.com/access/helpdesk/help/toolbox/images/cpselect.html)
--
http://mail.python.org/mailman/listinfo/python-list
1. first of all, what is the English jargon (Optimize? But I think
this is not a very good keyword :( )for this problem? So I can use it
to search on the internet
2. is there any free/open lib for this?
3. I know for some questions(case 1, case 2, and sudoku), we can use
bundles of FOR...NEXT loop
I find that the existing email moudle is some hard for me to
understand, especially the part of how to set the CC, BCC and attach
the files. Is there any more easy one like this p-code?
import easyemail
smtpserver=easyemail.server('something')
smtpserver.login('[EMAIL PROTECTED]', pwd)
Just like excel or vb does. A grid always looks like a normal grid, and can acts as a normal gird, where we can input some text. but when we click the right-most part, this grid becomes a choice widget, so we can choose some pre-defined gizmo; or it becomes a file-selector, and there is a button
Hi, everyone.
http://bibus-biblio.sourceforge.net/ is a bibliographic and reference
management software, which runs on windows/linux thru wxwidget. On
windows, it uses win32com to insert reference into winword
automatically.
I have installed all the modules, and can launch and use bibus in my
I want to visualize my disk space like http://www.werkema.com/img/scrnshot/spacemonger.gif. ie. draw the directory as a big rectangleand its size is proportionable to the file size under this directory, then draw and fill small rectangles into it to behalf the size of every files. Is there a
Hi, everyone. I work on windows os and want to write a IE based webbrowser. For I find that the only method which can handle most of the HTML standard is to embed IE object, I want to change demo\wxIEHtmlWin.py (from old wxPython) into a kind of multi-tab webbrowser( like greenbrowser, maxthon).
65 matches
Mail list logo