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 accor
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
--
https://mail.python.org/mailman/listinfo/pyth
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 :
> On Sat, 15 Jul 2017, 12:35 oyster, wrote:
>>
>> as the title says. ha
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 os
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 me
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 SECTIO
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 se
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 py
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 got
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=17&t=20057&p=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
http://www.lusiya.com/bbs/attachment/thumb/Mon
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
nice
the only pity is that amcharts is not a money-free product
--
http://mail.python.org/mailman/listinfo/python-list
=%0i' %(a, len(a))
print 'b="%s", len=%0i' %(b, len(b))
print
a='helloworld yeaheventeven '
b= evenReplace(a, 27)
print 'a="%s", len=%0i' %(a, len(a))
print 'b="%s", len=%0i' %(b, len
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 am12
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", r"Theory.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 www
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:
[TABL
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.
--
http://ma
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 do
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
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, L
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
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 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 and
> On Oct 11, 1:27 am, "Timothy Grant" <[EMAIL PROTECTED]> wrote:> On Fri, Oct
> > 10, 2008 at 10:16 PM, oyster <[EMAIL PROTECTED]> wrote:
> > > > os.utime works only against files. so what to do for a directory?
> > > > thanx
> >
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 every
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 'c
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 htt
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 n<2:
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
> Subject: Re: a module.pth 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]>>> i
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 co
currently I am using
[code]
req=urllib2.Request(url)
data=''
if '' 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 html pa
that is, there is no TABLE tag between a TABLE, for example
something with out table tag
what is the RE pattern? thanks
the following is not right
[^table]*?
--
http://mail.python.org/mailman/listinfo/python-list
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 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
--
http://mail.python.org/mailman/listi
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
#b.p
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 use
with JFreeChart, anyone interested to help?
> On Jan 14, 6:51 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 py
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 it
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?
cdll.LoadLibrary(r"c:
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
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
--
htt
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 of
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 nCtr
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 _T
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" loo
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)
newletter=s
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 wi
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
pyth
I want to visualize my disk space like http://www.werkema.com/img/scrnshot/spacemonger.gif. ie. draw the directory as a big rectangle and 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 lib/s
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). N
65 matches
Mail list logo