Hello,
I'm a relative python newbie but I've been tasked to figure out how to
embed calls to a python library in an Excel XLL add-in.
The Python/C API for doing this seems pretty straightforward, but I
seem to have read somewhere online that it's important that the C++
program or DLL linking to a
Hi Python users,
I just realize that my post yesterday shouldn't be specifically for mechanize.
It should be a general question for file-like objects.
>>> f = open('my_file.txt')
>>> print f.readlines()
( prints a list of strings
>>> print f.readlines()
[]
There are quite a few methods
Hi Python users,
I have a question about the instance of closeable_response in module Mechanize.
from mechanize import ParseResponse, urlopen
url = "http://wwwsearch.sourceforge.net/mechanize/example.html";
r = urlopen(url)
forms = ParseResponse(r, backwards_compat
Hi Zero,
I see! This is very helpful. Thank you.
- Yingjie
On Aug 19, 2011, at 3:30 PM, Zero Piraeus wrote:
> :
>
> On 19 August 2011 15:09, Yingjie Lin wrote:
>>
>> I have been using try...except statements in the situations where I can
>> expect a certain
Hi John and Chris,
Thanks for the help.
I looked at both and think that mechanize suits my needs better,
since it simply needs a python script and doesn't depend on Firefox.
Yingjie
> From: John Gordon
> Mechanize seems like what you want. It's built on top of
> urllib2.http://wwwsearch.s
Hi Python users,
I have been using try...except statements in the situations where I can expect
a certain type of errors might occur.
But sometimes I don't exactly know the possible error types, or sometimes I
just can't "spell" the error types correctly.
For example,
try:
response
Hi Python users,
I am maintaining a website written with Python CGI scripts. To make sure the
website is working well,
I would like to have a script which automatically "uses" this website and
checks it's output everyday. It
would be better if this script runs from the clients' side.
Could any
Hi Python users,
I have two lists:
li1 = ['a', 'b']
li2 = ['1', '2']
and I wish to obtain a list like this
li3 = ['a1', 'a2', 'b1', 'b2']
Is there a handy and efficient function to do this, especially when li1 and li2
are long lists.
I found zip() but it only gives [('a', '1'), ('b', '2')],
Hi all,
I have a python cgi script which looks like this:
[CODE STARTING HERE]
open('x')
print 'Content-Type: text/html\n\n'
..
print '' % myURL
..
### after printing the webpage
os.system('python myfile.py')
logfile.write('END OF SCRIPT')
logfile.close()
[CODE ENDING]
Question:
{'__file__':setup_script, '__name__':'__main__'}
> File "setup.py", line 9, in
> File "/tmp/easy_install-uPz7qO/Gluttony-0.3/gluttony/__init__.py",
> line 1, in
> #
> File "/tmp/easy_install-uPz7qO/Glutton
/gluttony/tg2_dot.png
Hope this could be helpful :P
Regards.
Victor Lin.
--
http://mail.python.org/mailman/listinfo/python-list
rect? How can I monitor the memory allocation
of Python? Is there any available tools for this? Or is that modifying
the Python source code and recompiling the only way to monitor
allocation of memory?
Thanks.
Victor Lin.
--
http://mail.python.org/mailman/listinfo/python-list
h0uk writes:
> On 8 янв, 08:44, Water Lin wrote:
>> I am a new guy to use Python, but I want to parse a html page now. I
>> tried to use HTMLParse. Here is my sample code:
>> --
>> from HTMLParser import HTMLParser
>> from urllib2 im
parse it. I can locate the div tag but I don't know how
to get the text for the tag which is "open article title" in my example.
How can I get the html content? What's wrong in my handle_data function?
Thanks
Water Lin
--
Water Lin's notes and pencils: http://en.waterlin.org
Email: water...@ymail.com
--
http://mail.python.org/mailman/listinfo/python-list
arser that parse header of c library and
generate ctypes python module automatically. My question is, is there
any available tools can achieve this? If not, what tool can I use to
such a job easily. I need a c parser, is there any C parser written in
python?
Thanks.
Victor Lin.
--
http://mail.pytho
On 3月8日, 下午10時20分, Christian Heimes wrote:
> Victor Lin wrote:
> > Hi,
>
> > I am going to develop a c library binding with ctypes. That c library
> > will call callback from worker threads it created. Here comes the
> > problem : Will the GIL be acquired before it
On 3月8日, 下午9時56分, "Diez B. Roggisch" wrote:
> Victor Lin schrieb:
>
>
>
> > Hi,
>
> > I am going to develop a c library binding with ctypes. That c library
> > will call callback from worker threads it created. Here comes the
> > problem : Wi
allback. As the document
says.
WINFUNCTYPE will release GIL during the call
But it does not mention callback about Python function? How about a
call from another thread? Could somebody help me?
Thanks.
Victor Lin.
--
http://mail.python.org/mailman/listinfo/python-list
d the program? And how can I know
what lock are there in threads caused the deadlock?
Thanks.
Victor Lin.
--
http://mail.python.org/mailman/listinfo/python-list
On 2月4日, 上午2時44分, Philip Semanchuk wrote:
> On Feb 3, 2009, at 12:51 PM, Victor Lin wrote:
>
>
>
> > It seems that my program can't call to Python's function from thread
> > directly, because there is Global Interpreter Lock. The python's GIL
> > is
void operator() (double time, const AudioData &data) {
// acquire lock
m_Function(time, data);
// release lock
}
Thanks.
Victor Lin.
--
http://mail.python.org/mailman/listinfo/python-list
ong is at least 32 bit but usually
> sizeof(ptr).
>
Ah, this makes sense. Thanks.. The main reason I'm trying 64-bit
Python is that I want to write files bigger than 4GB. This should work
on Windows x64, right? (i.e., are the pointers bona fide 64 bit?)
-lin
--
http://mail.python.org/mailman/listinfo/python-list
installation problem? Thank you very much!
--lin
--
http://mail.python.org/mailman/listinfo/python-list
be considered as a bug?
If it is, how to report this bug?
Is my solution correct?
Are there any side effect will caused by doing so?
If the code I write is fine, and solve that problem, how to report it
to Python's project?
I think this could be helpful for people who also encountered this
problem.
Thanks.
Victor Lin.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I'd like to write some class that can help me build reusable formula
easily, some simple code like this.
# -*- coding: utf8 -*-
class OperationResult:
def __init__(self, left, right):
self.dataSource = dataSource
def __add__(self, other):
self.dataSource.stack.append(
m: If I move my directory, I have to modify
the path again. This is not a library, they are some programs to do
specific task. I think they should be executable in every where I move
or copy the directory to.
Victor Lin.
--
http://mail.python.org/mailman/listinfo/python-list
On 2月10日, 上午11時42分, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Sat, 09 Feb 2008 09:49:46 -0200, Victor Lin <[EMAIL PROTECTED]>
> escribi�:
>
> > I encounter a problem with pickle.
> > I download a html from:
>
> >http://www.amazon
t stop
running program without any message.
I think it is also implement with recursion way, and it also over flow
stack when dumping soup.
Are there any version of pickle that implement with no-recursion way?
Thanks.
Victor Lin.
--
http://mail.python.org/mailman/listinfo/python-list
data would just keep in memory and discarded with
the program's ending.
Why sqlite3 just keep inserted data in memory? And how to force
inserted data into file?
Thanks.
Victor Lin.
--
http://mail.python.org/mailman/listinfo/python-list
It's known that combining GTK+ or Qt with Python could enable the
GUI design with pygtk/pyqt.
In Mac OSX, it's suggested that use Cocoa be the GUI framework.
Is there py-cocoa framework?
--
http://mail.python.org/mailman/listinfo/python-list
thanks again for all the help! especially the advice on ideas of
tracking down the memory leak :). (sorry for not mentioning it
earlier...i had thought deleting everything might be a quick and dirty
way short-term fix. :P)
best,
-Johnny
--
http://mail.python.org/mailman/listinfo/python-list
thanks everyone for the replies!
John Hunter, yep, this is Johnny Lin in geosci :).
re using return: the problem i have is somewhere in my code there's a
memory leak. i realize return is supposed to unbind all the local
variables, but since the memory leak is happening despite retu
Hi!
Is there a way to automate the unbinding of multiple variables? Say I
have a list of the names of all variables in the current scope via
dir(). Is there a command using del or something like that that will
iterate the list and unbind each of the variables?
Thanks much! (If anyone posts an
Hi,
Sorry for this newbie question, I was wondering if anyone knows why when I run
the test, the "test_anydbm" test will seg fault and the tests "test_aepack" and
"test_al" are skipped?
Thanks in advance.
______
Robert
34 matches
Mail list logo