use python to split a video file into a set of parts

2013-05-07 Thread iMath
I use the following python code to split a FLV video file into a set of parts ,when finished ,only the first part video can be played ,the other parts are corrupted.I wonder why and Is there some correct ways to split video files import sys, os kilobytes = 1024 megabytes = kilobytes * 1000 chunk

Re: how to detect the character encoding in a web page ?

2013-06-05 Thread iMath
在 2012年12月24日星期一UTC+8上午8时34分47秒,iMath写道: > how to detect the character encoding in a web page ? > > such as this page > > > > http://python.org/ I found PyQt’s QtextStream can very accurately detect the character encoding in a web page . even for this bad page chard

Re: how to detect the character encoding in a web page ?

2013-06-05 Thread iMath
在 2012年12月24日星期一UTC+8上午8时34分47秒,iMath写道: > how to detect the character encoding in a web page ? > > such as this page > > > > http://python.org/ I found PyQt’s QtextStream can very accurately detect the character encoding in a web page . even for this bad page ht

Re: how to detect the character encoding in a web page ?

2013-06-05 Thread iMath
在 2012年12月24日星期一UTC+8上午8时34分47秒,iMath写道: > how to detect the character encoding in a web page ? > > such as this page > > > > http://python.org/ by the way ,we cannot get character encoding programmatically from the mate data without knowing the character encod

Re: how to detect the character encoding in a web page ?

2013-06-09 Thread iMath
在 2012年12月24日星期一UTC+8上午8时34分47秒,iMath写道: > how to detect the character encoding in a web page ? > > such as this page > > > > http://python.org/ Finally ,I found by using PyQt’s QtextStream , QTextCodec and chardet ,we can get a web page code more securely even f

Re: how to detect the character encoding in a web page ?

2013-06-09 Thread iMath
在 2012年12月24日星期一UTC+8上午8时34分47秒,iMath写道: > how to detect the character encoding in a web page ? > > such as this page > > > > http://python.org/ here is one thread that can help me understanding my code http://stackoverflow.com/questions/17001407/how-to-detect-the-ch

What’s the differences between these two pieces of code ?

2012-07-06 Thread iMath
What’s the differences between these two pieces of code ? (1) for i in range(1, 7): print(2 * i, end=' ') (2) for i in range(1, 7): print(2 * i, end=' ') print() when executed both respectively in Python shell ,I get the same effect . Who can tell me why ? -- http://mail.python.o

Does os.getcwd() and os.curdir have the same effect ?

2012-09-09 Thread iMath
Does os.getcwd() and os.curdir have the same effect ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there any difference between print 3 and print '3' in Python ?

2012-09-09 Thread iMath
在 2012年3月26日星期一UTC+8下午7时45分26秒,iMath写道: > I know the print statement produces the same result when both of these two > instructions are executed ,I just want to know Is there any difference > between print 3 and print '3' in Python ? thx everyone -- http://mail.python.o

Re: What’s the differences between these two pieces of code ?

2012-09-09 Thread iMath
在 2012年7月7日星期六UTC+8下午12时56分35秒,iMath写道: > What’s the differences between these two pieces of code ? > > (1) > > for i in range(1, 7): > > print(2 * i, end=' ') > > > > thx everyone > > (2) > > for i in range(1, 7): > >

regular expression : the dollar sign ($) work with re.match() or re.search() ?

2012-09-26 Thread iMath
I only know the dollar sign ($) will match a pattern from the end of a string,but which method does it work with ,re.match() or re.search() ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Does os.getcwd() and os.curdir have the same effect ?

2012-09-26 Thread iMath
On Sunday, September 9, 2012 9:39:28 PM UTC+8, Thomas Jollans wrote: > On 09/09/2012 03:22 PM, iMath wrote: > Does os.getcwd() and os.curdir have > the same effect ? > Python 3.2.3 (default, May 3 2012, 15:51:42) [GCC 4.6.3] > on linux2 Type "help", "copyright&quo

write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212.

2012-09-28 Thread iMath
write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212. -- http://mail.python.org/mailman/listinfo/python-list

where to view range([start], stop[, step])'s C implementation source code ?

2012-10-01 Thread iMath
where to view range([start], stop[, step])'s C implementation source code ? -- http://mail.python.org/mailman/listinfo/python-list

To get the accurate value of 1 - 0.999999999999999 ,how to implement the python algorithm ?

2012-10-08 Thread iMath
To get the accurate value of 1 - 0.999 ,how to implement the python algorithm ? BTW ,Windows’s calculator get the accurate value ,anyone who knows how to implement it ? -- http://mail.python.org/mailman/listinfo/python-list

how to use pyODBC to connect to MySql ,please give me a sample

2012-10-16 Thread iMath
host name : localhost user name:root password:19910512 database name : shopping -- http://mail.python.org/mailman/listinfo/python-list

Re: where to view range([start], stop[, step])'s C implementation source code ?

2012-10-17 Thread iMath
On Monday, October 1, 2012 11:42:26 PM UTC+8, Ian wrote: > On Mon, Oct 1, 2012 at 9:28 AM, iMath wrote: > > > where to view range([start], stop[, step])'s C implementation source code ? > > > > http://hg.python.org/cpython/file/3f739f42be51/Objects/r

How to only get a list of the names of the non-directory files in current directory ('.')?

2012-11-05 Thread iMath
How to only get a list of the names of the non-directory files in current directory ('.')? (Note excluding its subdirectories ). I need the code : ) -- http://mail.python.org/mailman/listinfo/python-list

Re: How to only get a list of the names of the non-directory files in current directory ('.')?

2012-11-06 Thread iMath
在 2012年11月6日星期二UTC+8下午1时24分41秒,Chris Angelico写道: > On Tue, Nov 6, 2012 at 4:19 PM, iMath wrote: > > > How to only get a list of the names of the non-directory files in current > > directory ('.')? > > > (Note excluding its subdirectories ). > > >

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

2012-12-06 Thread iMath
the following code originally from http://zetcode.com/databases/mysqlpythontutorial/ within the "Writing images" part . import MySQLdb as mdb import sys try: fin = open("Chrome_Logo.svg.png",'rb') img = fin.read() fin.close() except IOError as e: print ("Error %d: %s" % (e.arg

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

2012-12-07 Thread iMath
在 2012年12月6日星期四UTC+8下午7时07分35秒,Hans Mulder写道: > On 6/12/12 11:07:51, iMath wrote: > > > the following code originally from > > http://zetcode.com/databases/mysqlpythontutorial/ > > > within the "Writing images" part . > > > > &g

where to view open() function's C implementation source code ?

2012-12-17 Thread iMath
where to view open() function's C implementation source code ? -- http://mail.python.org/mailman/listinfo/python-list

Re: where to view open() function's C implementation source code �

2012-12-17 Thread iMath
在 2012年12月18日星期二UTC+8下午1时35分58秒,Roy Smith写道: > In article , > > iMath wrote: > > > > > where to view open() function's C implementation source code ? > > > > http://www.python.org/download/releases/ > >

Re: where to view open() function's C implementation source code �

2012-12-18 Thread iMath
在 2012年12月19日星期三UTC+8上午4时57分37秒,ru...@yahoo.com写道: > On Monday, December 17, 2012 10:35:58 PM UTC-7, Roy Smith wrote: > > > iMath wrote: > > > > where to view open() function's C implementation source code ? > > > h

Re: where to view open() function's C implementation source code �

2012-12-18 Thread iMath
在 2012年12月19日星期三UTC+8上午4时57分37秒,ru...@yahoo.com写道: > On Monday, December 17, 2012 10:35:58 PM UTC-7, Roy Smith wrote: > > > iMath wrote: > > > > where to view open() function's C implementation source code ? > > > h

how to detect the encoding used for a specific text data ?

2012-12-20 Thread iMath
how to detect the encoding used for a specific text data ? -- http://mail.python.org/mailman/listinfo/python-list

Re: how to detect the encoding used for a specific text data ?

2012-12-20 Thread iMath
which package to use ? -- http://mail.python.org/mailman/listinfo/python-list

redirect standard output problem

2012-12-20 Thread iMath
redirect standard output problem why the result only print A but leave out 888 ? import sys class RedirectStdoutTo: def __init__(self, out_new): self.out_new = out_new def __enter__(self): sys.stdout = self.out_new def __exit__(self, *args): sys.stdout = sys._

Pass and return

2012-12-20 Thread iMath
Pass and return Are these two functions the same ? def test(): return def test(): pass -- http://mail.python.org/mailman/listinfo/python-list

Re: redirect standard output problem

2012-12-22 Thread iMath
在 2012年12月21日星期五UTC+8下午3时24分10秒,Chris Angelico写道: > On Fri, Dec 21, 2012 at 4:23 PM, iMath wrote: > > > redirect standard output problem > > > > > > why the result only print A but leave out 888 ? > > > > No idea, because when I paste your code in

how to detect the character encoding in a web page ?

2012-12-23 Thread iMath
how to detect the character encoding in a web page ? such as this page http://python.org/ -- http://mail.python.org/mailman/listinfo/python-list

urllib.error.HTTPError: HTTP Error 403: Forbidden

2012-12-23 Thread iMath
>>> import urllib.request >>> response = >>> urllib.request.urlopen('http://en.wikipedia.org/wiki/Internet_media_type') Traceback (most recent call last): File "", line 1, in response = urllib.request.urlopen('http://en.wikipedia.org/wiki/Internet_media_type') File "C:\Python32\lib\urlli

Re: how to detect the character encoding in a web page ?

2012-12-23 Thread iMath
在 2012年12月24日星期一UTC+8上午8时34分47秒,iMath写道: > how to detect the character encoding in a web page ? > > such as this page > > > > http://python.org/ but how to let python do it for you ? such as this page http://python.org/ how to detect the character encoding in th

Re: how to detect the character encoding in a web page ?

2012-12-23 Thread iMath
在 2012年12月24日星期一UTC+8上午8时34分47秒,iMath写道: > how to detect the character encoding in a web page ? > > such as this page > > > > http://python.org/ but how to let python do it for you ? such as these 2 pages http://python.org/ http://msdn.microsoft.com/en-us/library

Re: how to detect the character encoding in a web page ?

2012-12-23 Thread iMath
在 2012年12月24日星期一UTC+8上午8时34分47秒,iMath写道: > how to detect the character encoding in a web page ? > > such as this page > > > > http://python.org/ but how to let python do it for you ? such as these 2 pages http://python.org/ http://msdn.microsoft.com/en-us/library

EOFError why print(e) cannot print out any information ?

2012-12-25 Thread iMath
why print(e) cannot print out any information ? class user: def __init__(self, x,y,z): self.id = x self.name = y self.emailadd=z def dispuser(self): print('User ID: ', self.id) print('User Name : ', se

need a url that its http response header that cotain 401 status code

2012-12-26 Thread iMath
I am going to do a Basic Authentication , so I need a url that its http response header that cotain 401 status code. -- http://mail.python.org/mailman/listinfo/python-list

os.path.realpath(path) bug on win7 ?

2013-01-05 Thread iMath
os.path.realpath(path)  bug on win7 ?Temp.link is a Symbolic linkIts target location is C:\test\test1But >>> os.path.realpath(r'C:\Users\SAMSUNG\Temp.link\test2')'C:\\Users\\SAMSUNG\\Temp.link\\test2'I thought the return value should be ' C:\\test\\test1\\test2'Is it a bug ? anyone can clear it to

Re: os.path.realpath(path) bug on win7 ?

2013-01-06 Thread iMath
在 2013年1月6日星期日UTC+8下午3时06分10秒,Chris Rebert写道: > On Sat, Jan 5, 2013 at 10:55 PM, iMath <2281570...@qq.com> wrote: > > > > > > os.path.realpath(path) bug on win7 ? > > > > > > Temp.link is a Symbolic link > > > Its target location is C:

Re: os.path.realpath(path) bug on win7 ?

2013-01-07 Thread iMath
在 2013年1月7日星期一UTC+8上午7时40分06秒,Victor Stinner写道: > It looks like the following issue: > > http://bugs.python.org/issue14094 > > Victor > > Le 6 janv. 2013 07:59, "iMath" <22815...@qq.com> a écrit : > > > > > os.path.realpath(path)  bug on w

Re: how to detect the character encoding in a web page ?

2013-01-07 Thread iMath
在 2012年12月24日星期一UTC+8上午8时34分47秒,iMath写道: > how to detect the character encoding in a web page ? > > such as this page > > > > http://python.org/ up to now , maybe chadet is the only way to let python automatically do it . -- http://mail.python.org/mailman/listinfo/python-list

Re: regular expression : the dollar sign ($) work with re.match() or re.search() ?

2013-01-07 Thread iMath
在 2012年9月26日星期三UTC+8下午3时38分50秒,iMath写道: > I only know the dollar sign ($) will match a pattern from the > > end of a string,but which method does it work with ,re.match() or re.search() > ? I thought re.match('h.$', 'hbxihi') will match ‘hi’ ,bu

what’s the difference between socket.send() and socket.sendall() ?

2013-01-07 Thread iMath
what’s the difference between socket.send() and socket.sendall() ? It is so hard for me to tell the difference between them from the python doc so what is the difference between them ? and each one is suitable for which case ?-- http://mail.python.org/mailman/listinfo/python-list

How to implement mouse gesture by python or pyqt ?

2013-01-07 Thread iMath
It would be better to give me some examples .thanks in advance ! P.S. which module or lib are needed ? -- http://mail.python.org/mailman/listinfo/python-list

how to download internet files by python ?

2013-01-07 Thread iMath
for example ,if I want to download this file ,how to implement the download functionality by python ? http://down.51voa.com/201208/se-ed-foreign-students-friends-16aug12.mp3 as for download speed ,of course ,the fast ,the better ,so how to implement it ? It would be better to show me an examp

How to get the selected text of the webpage in chrome through python ?

2013-01-07 Thread iMath
How to get the selected text of the webpage in chrome through python ? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get the selected text of the webpage in chrome through python ?

2013-01-08 Thread iMath
在 2013年1月8日星期二UTC+8下午12时20分28秒,iMath写道: > How to get the selected text of the webpage in chrome through python ? I need the code ,cuz I am only familiar with Python ,so it would be better to give me the code written in Python . You can also give me the code in other programming langu

Re: How to get the selected text of the webpage in chrome through python ?

2013-01-08 Thread iMath
在 2013年1月8日星期二UTC+8下午9时19分51秒,Bruno Dupuis写道: > On Mon, Jan 07, 2013 at 08:20:28PM -0800, iMath wrote: > > > How to get the selected text of the webpage in chrome through python ? > > > > What you need is a way to get selected text from wherever it comes. The >

Re: How to get the selected text of the webpage in chrome through python ?

2013-01-08 Thread iMath
在 2013年1月8日星期二UTC+8下午9时11分30秒,Dave Angel写道: > On 01/08/2013 07:38 AM, Dennis Lee Bieber wrote: > > > On Mon, 7 Jan 2013 20:20:28 -0800 (PST), iMath > > > declaimed the following in gmane.comp.python.general: > > > > > >> How to get the selected te

Re: How to implement mouse gesture by python or pyqt ?

2013-01-08 Thread iMath
在 2013年1月8日星期二UTC+8上午8时44分20秒,iMath写道: > It would be better to give me some examples .thanks in advance ! > > > > P.S. which module or lib are needed ? what I wanna perhaps like this: when a right mouse button is pressed and we go down and right with a cursor. As in letter

Re: How to get the selected text of the webpage in chrome through python ?

2013-01-09 Thread iMath
在 2013年1月9日星期三UTC+8下午5时35分15秒,Alister写道: > On Mon, 07 Jan 2013 20:20:28 -0800, iMath wrote: > > > > > How to get the selected text of the webpage in chrome through python ? > > > > i think you need to explain your requirement further > > also what do

Re: how to download internet files by python ?

2013-01-09 Thread iMath
在 2013年1月8日星期二UTC+8下午1时04分54秒,Roy Smith写道: > In article , > > Cameron Simpson wrote: > > > > > On 07Jan2013 20:19, iMath wrote: > > > | for example ,if I want to download this file ,how to implement the > > download > > > | function

How to call wget by python ?

2013-01-09 Thread iMath
can you give me an example code ? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to implement mouse gesture by python or pyqt ?

2013-01-09 Thread iMath
在 2013年1月10日星期四UTC+8上午8时06分13秒,Michael Torrie写道: > On 01/08/2013 07:57 PM, iMath wrote: > > > 在 2013年1月8日星期二UTC+8上午8时44分20秒,iMath写道: > > >> It would be better to give me some examples .thanks in advance ! > > >> > > >> >

To make a method or attribute private

2013-01-20 Thread iMath
To make a method or attribute private (inaccessible from the outside), simply start its name with two underscores 《Beginning Python From Novice to Professional》 but there is another saying goes: Beginning a variable name with a single underscore indicates that the variable should be treated

Re: To make a method or attribute private

2013-01-20 Thread iMath
在 2013年1月17日星期四UTC+8上午9时04分00秒,alex23写道: > On Jan 17, 10:34 am, "iMath" <2281570...@qq.com> wrote: > > > To make a method or attribute private (inaccessible from the outside), > > simply start its > > > name with two underscores > > > > &

Re: To make a method or attribute private

2013-01-20 Thread iMath
在 2013年1月17日星期四UTC+8上午8时34分22秒,iMath写道: > To make a method or attribute private (inaccessible from the outside), simply > start its  > name with two underscores > > > 《Beginning Python From Novice to Professional》 > > > but there is another saying goes: > Be

anyone can make a Python bindings of VLC-Qt ?

2013-01-24 Thread iMath
anyone can make a Python bindings of VLC-Qt ? https://github.com/ntadej/vlc-qt accurately, can anyone make a PyQt bindings of VLC-Qt ? -- http://mail.python.org/mailman/listinfo/python-list

what is the difference between commenting and uncommenting the __init__ method in this class?

2013-01-28 Thread iMath
what is the difference between commenting and uncommenting the __init__ method in this class? class CounterList(list): counter = 0 ##def __init__(self, *args): ##super(CounterList, self).__init__(*args) def __getitem__(self, index): self.__class__.coun

[os.path.join(r'E:\Python', name) for name in []] returns []

2013-01-29 Thread iMath
why [os.path.join(r'E:\Python', name) for name in []] returns [] ? please explain it in detail ! -- http://mail.python.org/mailman/listinfo/python-list

Re: [os.path.join(r'E:\Python', name) for name in []] returns []

2013-01-29 Thread iMath
在 2013年1月29日星期二UTC+8下午9时33分26秒,Steven D'Aprano写道: > iMath wrote: > why [os.path.join(r'E:\Python', name) for name in []] returns > [] ? Because you are iterating over an empty list, []. That list > comprehension is the equivalent of: result = [] for name in []: > r

Re: matplotlib basemap colorbar exception : Given element not contained in the stack

2022-05-29 Thread iMath
please see the formated code at https://stackoverflow.com/questions/72423464/matplotlib-basemap-colorbar-exception-given-element-not-contained-in-the-stack -- https://mail.python.org/mailman/listinfo/python-list

Re: matplotlib basemap colorbar exception : Given element not contained in the stack

2022-05-30 Thread iMath
在 2022年5月30日星期一 UTC+8 03:29:28, 写道: > On 2022-05-29 13:57, iMath wrote: > > please see the formated code at > > https://stackoverflow.com/questions/72423464/matplotlib-basemap-colorbar-exception-given-element-not-contained-in-the-stack > The problem might be that you're pa

recover pickled data: pickle data was truncated

2021-12-25 Thread iMath
Normally, the shelve data should be read and write by only one process at a time, but unfortunately it was simultaneously read and write by two processes, thus corrupted it. Is there any way to recover all data in it ? Currently I just get "pickle data was truncated" exception after reading a po

Re: recover pickled data: pickle data was truncated

2021-12-29 Thread iMath
> You have lost the data in that case. But I found the size of the file of the shelve data didn't change much, so I guess the data are still in it , I just wonder any way to recover my data. -- https://mail.python.org/mailman/listinfo/python-list

Re: recover pickled data: pickle data was truncated

2021-12-31 Thread iMath
在 2021年12月30日星期四 UTC+8 03:13:21, 写道: > On Wed, 29 Dec 2021 at 18:33, iMath wrote: > > But I found the size of the file of the shelve data didn't change much, so > > I guess the data are still in it , I just wonder any way to recover my data. > I agree with Barry, Chris

Re: recover pickled data: pickle data was truncated

2022-01-05 Thread iMath
Thanks for all your kind help, wish you a promising year! -- https://mail.python.org/mailman/listinfo/python-list

use regex to search the page one time to get two types of Information

2016-08-19 Thread iMath
I need to use regex to search two types of Information within a web page, while it seems searching the page two times rather than one is much time consuming , is it possible to search the page one time to get two or more types of Information? -- https://mail.python.org/mailman/listinfo/python-

Re: use regex to search the page one time to get two types of Information

2016-08-19 Thread iMath
each regex only has one matched result in the web page -- https://mail.python.org/mailman/listinfo/python-list

index for regex.search() beyond which the RE engine will not go.

2016-08-19 Thread iMath
for regex.search(string[, pos[, endpos]]) The optional parameter endpos is the index into the string beyond which the RE engine will not go, while this lead me to believe the RE engine will still search on till the endpos position even after it returned the matched object, is this Right ? --

Re: use regex to search the page one time to get two types of Information

2016-08-19 Thread iMath
1. searching the page two times rather than one is a little bit time consuming . 2. starting the second search from the first match.endpos does reduce the time consuming . 3. how to combine both patterns into one regex? while using the special | regex operator only matches one regex not both --

Re: use regex to search the page one time to get two types of Information

2016-08-20 Thread iMath
On Friday, August 19, 2016 at 9:19:22 PM UTC+8, Chris Angelico wrote: > On Fri, Aug 19, 2016 at 11:13 PM, iMath wrote: > > 1. searching the page two times rather than one is a little bit time > > consuming . > > Have you measured that? If not, ignore it. You're searchi

Re: use regex to search the page one time to get two types of Information

2016-08-20 Thread iMath
On Friday, August 19, 2016 at 9:45:08 PM UTC+8, Friedrich Rentsch wrote: > On 08/19/2016 09:02 AM, iMath wrote: > > I need to use regex to search two types of Information within a web page, > > while it seems searching the page two times rather than one is much time > &

Re: index for regex.search() beyond which the RE engine will not go.

2016-08-20 Thread iMath
On Friday, August 19, 2016 at 10:09:19 PM UTC+8, Steve D'Aprano wrote: > On Fri, 19 Aug 2016 09:14 pm, iMath wrote: > > > > > for > > regex.search(string[, pos[, endpos]]) > > The optional parameter endpos is the index into the string beyond which > > t

easy way to return a list of absolute file or directory path within a directory

2016-09-07 Thread iMath
Any easier solutions on returning a list of absolute file or directory path within a directory? Mine is list(map(lambda entry: os.path.join(directory,entry),os.listdir(directory))) -- https://mail.python.org/mailman/listinfo/python-list

Re: easy way to return a list of absolute file or directory path within a directory

2016-09-08 Thread iMath
On Wednesday, September 7, 2016 at 4:00:31 PM UTC+8, Steven D'Aprano wrote: > On Wednesday 07 September 2016 17:08, iMath wrote: > > > Any easier solutions on returning a list of absolute file or directory path > > within a directory? Mine is > > > > list(map(l

filesystem encoding 'strict' on Windows

2016-09-29 Thread iMath
the doc of os.fsencode(filename) says Encode filename to the filesystem encoding 'strict' on Windows, what does 'strict' mean ? -- https://mail.python.org/mailman/listinfo/python-list

python3 - set '\n\n' as the terminator when writing a formatted LogRecord

2016-12-29 Thread iMath
Is it possible to set '\n\n' as the terminator when writing a formatted LogRecord to a stream by changing the format parameter of logging.basicConfig? I know it is possible using the terminator attribute of StreamHandler class to implement this, I just wonder Is it possible to achieve this featu

Introducing my Python/PyQt5 powered Bing wallpaper open source project

2017-01-04 Thread iMath
Hello everyone , I'd like to introduce my Python/PyQt5 powered Bing wallpaper open source project. ​ BingNiceWallpapers https://github.com/redstoneleo/BingNiceWallpapers BingNiceWallpapers can get background images from http://www.bing.com/?mkt=zh-CN and set them as your desktop wallpaper by

Introducing my Python/PyQt5 powered Bing wallpaper open source project

2017-01-06 Thread iMath
Hello everyone , I'd like to introduce my Python/PyQt5 powered Bing wallpaper open source project. â ï BingNiceWallpapers https://github.com/redstoneleo/BingNiceWallpapers BingNiceWallpapers can get background images from http://www.bing.com/?mkt=zh-CN and set them as your desktop wallpaper by

send PIL.Image to django server side and get it back

2018-07-16 Thread iMath
I also posted the question here https://stackoverflow.com/questions/51355926/send-pil-image-to-django-server-side-and-get-it-back I don't know what's under the hood of sending an image from client side to server side, so stuck by the following scenario. I want to send a PIL.Image object to djang

Re: send PIL.Image to django server side and get it back

2018-07-22 Thread iMath
Thanks, I solved it finally stackoverflow.com/a/51453785/1485853 -- https://mail.python.org/mailman/listinfo/python-list

right way to use zipimport, zipimport.ZipImportError: not a Zip file

2018-08-13 Thread iMath
The same question also posted here https://stackoverflow.com/questions/51820473/right-way-to-use-zipimport-zipimport-zipimporterror-not-a-zip-file I have managed to use [this module][1] without installation - just import it from path to use , import sys url = 'https://example.com' s

Re: right way to use zipimport, zipimport.ZipImportError: not a Zip file

2018-08-14 Thread iMath
I think someone gives the true reason caused the exception here https://stackoverflow.com/a/51821910/1485853 Thanks to his explanation , I extracted the zip archive and then add the extracted to a zip archive using Bandizip, this time `zipimport.zipimporter(r'C:\Users\i\Downloads\you-get-0.4.11

Re: right way to use zipimport, zipimport.ZipImportError: not a Zip file

2018-08-14 Thread iMath
I think someone gives the true reason caused the exception here https://stackoverflow.com/a/51821910/1485853 Thanks to his explanation , I extracted the zip archive and then add the extracted to a zip archive using Bandizip, this time `zipimport.zipimporter(r'C:\Users\i\Downloads\you-get-0.4.11

Re: right way to use zipimport, zipimport.ZipImportError: not a Zip file

2018-08-15 Thread iMath
Not works on Windows >>> import sys >>> sys.path.insert(0, >>> 'C:/Users/i/Downloads/you-get-0.4.1128.zip/you-get-0.4.1128/src') >>> from you_get import common

Design an encrypted time-limited API on Client/Server side

2016-06-08 Thread iMath
​I am planning design an encrypted time-limited API on both Client and Server sides, the server side is written in Django, the client side is a GUI program which call the API by import requests c = requests.post("http://127.0.0.1:8000/VideoParser/";, data={'videoUrl': videoUrl }) The way it call

Re: Win32 API in pywin32

2016-08-04 Thread iMath
On Friday, August 5, 2016 at 7:50:28 AM UTC+8, jj0ge...@gmail.com wrote: > According to Python.org Mark Hammond has an Add-on (pywin32) that supports > Win32 and COM. > > Does anyone know if the Add-on covers all Win32 API functions, and if not is > there a list of the subset of Win32 API functi

get a certain request url during Loading a web page

2016-08-04 Thread iMath
During Loading this web page(http://www.iqiyi.com/v_19rrkkri8k.html) , the browser makes many requests,now I need a certain request url (e.g.starts with 'http://cache.video.qiyi.com/vms?') during the Loading process ,and the request is made on condition that the adobe flash player plugin for NPA

find all js/css/image pathnames in a HTML document

2019-05-11 Thread iMath
To find all js/css/image pathnames in a HTML document, I used regular expression(in the last line of my code snippet) to do this as the following, are there any other shorter regular expressions or more efficient ways to do this ? import re translation=''' bee·tle™

celery multi celery.exceptions.TimeoutError: The operation timed out

2020-09-18 Thread iMath
I followed the official [Celery guide](https://docs.celeryproject.org/en/stable/getting-started/next-steps.html#in-the-background) to learn, everything works well when using `celery -A proj worker -l info` to start the worker, however , if I run the worker in the background using `celery multi

celery multi celery.exceptions.TimeoutError: The operation timed out

2020-09-21 Thread iMath
Asked 3 days ago at https://stackoverflow.com/questions/63951696/celery-multi-celery-exceptions-timeouterror-the-operation-timed-out But nobody helped yet, anyone ? -- https://mail.python.org/mailman/listinfo/python-list

Re: celery multi celery.exceptions.TimeoutError: The operation timed out

2020-09-26 Thread iMath
在 2020年9月21日星期一 UTC+8 下午8:02:44, 写道: > Op 21-09-2020 om 12:14 schreef iMath: > > Asked 3 days ago at > > https://stackoverflow.com/questions/63951696/celery-multi-celery-exceptions-timeouterror-the-operation-timed-out > > > > > > But nobody helped yet, any

run command line on Windows without showing DOS console window

2013-11-20 Thread iMath
is there anyway to run command line on Windows without showing DOS console window ? can you use the following command line to give a little example ? wget -r -np -nd http://example.com/packages/ the path to wget is C:\Program Files\GnuWin32\bin\wget.exe -- https://mail.python.org/mailman/lis

Re: run command line on Windows without showing DOS console window

2013-11-23 Thread iMath
在 2013年11月20日星期三UTC+8下午10时49分50秒,Tim Golden写道: > On 20/11/2013 14:44, iMath wrote: > > > > > > > > > is there anyway to run command line on Windows without showing DOS console > > window ? > > > > > > can you use the following command

how to implement a queue-like container with sort function

2013-11-28 Thread iMath
I want to a fixed length list-like container, it should have a sorted()-like function that I can use to sort it,I think there should also a function I can use it to detect whether the numbers of items in it reaches the length of the container , because if the numbers of items in it reaches the l

Re: how to implement a queue-like container with sort function

2013-11-28 Thread iMath
All in all,I want to first fill the container, then sort it and process all the contents in it -- https://mail.python.org/mailman/listinfo/python-list

Re: how to implement a queue-like container with sort function

2013-11-28 Thread iMath
hey , you used >>> sorted(a.queue) this means the queue.Queue() has an attribute queue ,but I cannot find it described in the DOC ,where you find it ? -- https://mail.python.org/mailman/listinfo/python-list

Re: how to implement a queue-like container with sort function

2013-11-29 Thread iMath
it seems PriorityQueue satisfy my requirement here . BTW ,the Queue object has an attribute 'queue' ,but I cannot find it described in the DOC ,what it means ? -- https://mail.python.org/mailman/listinfo/python-list

using ffmpeg command line with python's subprocess module

2013-12-02 Thread iMath
I have few wav files that I can use either of the following command line mentioned here https://trac.ffmpeg.org/wiki/How%20to%20concatenate%20%28join,%20merge%29%20media%20files to concatenate ffmpeg -f concat -i <(for f in ./*.wav; do echo "file '$f'"; done) -c copy output.wav ffmpeg -f conca

  1   2   >