Derek Basch wrote:
> print [(key, value) for key, value in form.keys() and form[key].value]
and
> bump
The tutorial is always willing to make time for you :-)
>>> import cgi
>>> fs = cgi.FieldStorage(environ=dict(QUERY_STRING="alpha=1&beta=2"))
>>> [(key, fs[key].value) for key in fs.keys()]
[
Can we stop crossposting this shit to the Beatles NG, please?
Donald L McDaniel wrote:
> Matt Hayden wrote:
> > Johnny Gentile wrote:
> >> C'mon. Everyone knows God plays a Martin.
> >
> > I dunno. I think God has a honkin' big collection so he won't
offend
> > ANY luthiers when they come to visit
On Wed, 27 Apr 2005 10:17:13 -0400, Bill Mill <[EMAIL PROTECTED]>
wrote:
>On 4/27/05, monkey <[EMAIL PROTECTED]> wrote:
>> Read through python site for programming tool, really plenty of choices :-)
>> (For c++, I just can't breath with very very limited choices)
>>
>> Tried Spe, it come with wxG
On Thu, 28 Apr 2005 15:45:50 +1200 Thomas wrote:
T> d = [ ('cmd', 'add-item'),
T> ('protocol_version', '2.1'),
T> ('userfile', open(FILE)),
T> ]
T> req = urllib2.Request(URL, d)
[...]
T> TypeError: sendall() argument 1 must be string or read-only buffer,
T> not list
Exactly as err
> so you're saying that the set of people that can deal with
> no more than one
> file at a time but knows how to install and configure Python
> (which in itself
> comes with a few thousand files) is larger than zero?
Take me as an example: Very often, I needed software that could solve a
specific
On 27 Apr 2005 07:36:28 -0700, "Matt" <[EMAIL PROTECTED]> wrote:
>The ActiveGrid IDE is a sample app with wxPython. It has a lot of good
>features including a source code debugger that allows you to debug wx
>apps and set breakpoints from the code editor. I am also biased
>though--I work on that I
On Thu, 28 Apr 2005 00:10:00 +0800, "monkey" <[EMAIL PROTECTED]> wrote:
>Is it related to wxpython you mean? or program with GUI in tk (the default
>installed with python) is faster? Would you mind to tell me more...
I have the impression, that the startup time of tkinter is twice as fast
as in w
On Wed, 27 Apr 2005 12:52:21 -0700, James Stroud <[EMAIL PROTECTED]> wrote:
[snip]
How might I query the size of a fixed-width font in pixles? It appears that
the width of the font in points does not correlate with its width in pixels
based on some simple expriments I have done.
This is the case on
Dave Cook wrote:
(snip)
Once upon a time emacs was considered bloated,
That was when "640ko ought to be enough" ?-)
but it's tiny compared to eclipse.
Yeps. And a *lot* faster. And in not that much bigger than Vim in fact...
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w
Martin v. Löwis wrote:
Maurice LING wrote:
I've emailed to catelog-sig mailing list and is still waiting to hear
something. Currently, I have no idea of the structure of PyPI. I hope I
can hear from them soon and generate some starting points...
Posting questions is not the only way to find answer
Skip Montanaro wrote:
..
I'm not sure why the mmap() solution is so much slower for you. Perhaps on
some systems files opened for reading are mmap'd under the covers. I'm sure
it's highly platform-dependent. (My results on MacOSX - see below - are
somewhat better.)
I'll have a go at doing th
http://kscraft.sourceforge.net/convert_xhtml.php?doc=pyqt-windows-install.xhtml
Lorenzo
--
http://mail.python.org/mailman/listinfo/python-list
java are also wide-spread browser plugin with interactive and multimedia
capabilities,
and java-applets can be written with python (jython)
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
news:[EMAIL PROTECTED]
> you are after _might_ be done using macromedia flash - as that is a
> wide-spread bro
Ville Vainio wrote:
> What version? PyDev has increased in maturity quite a bit lately.
PyDev 0.9.2 with Eclipse 3.0.2. It's a nice effort currently, but some
of my issues are:
* Code completion doesn't work properly for me, and I have no idea why.
I have to type the '.' then ADD A SPACE, *then*
Oh yeah, and what's with not being able to configure the code completion
key sequence. How about *no* key sequence? That's the way every other
IDE I've used does it. This is more like semi-automatic code completion.
--
Brian Beck
Adventurer of the First Order
--
http://mail.python.org/mailman/lis
Brian Beck wrote:
>>What version? PyDev has increased in maturity quite a bit lately.
I realize 0.9.3 is the latest release, but the installation fails
through the Eclipse updater:
Unable to complete action for feature "PyDev for Eclipse" due to errors.
Unable to create file
"/opt/eclipse-exten
poisondart wrote:
I've seen it on certain websites that will
generate a file under certain parameters (through forms) that will
dissapear (i.e. delete itself) after a specified amount of time...
Is there a group of library functions that allow this?
No.
The easiest way, in my mind would be to store
[EMAIL PROTECTED] wrote:
> Hi,
>
> I am sure that this question might have come up repeatedly. Companies
> may not want to distribute their python code in source form. Even
> though pyc files are one option, it gets inconvenient to distribute
> bunch of them . If there is some way to bundle pyc fi
Brian Beck wrote:
> I realize 0.9.3 is the latest release, but the installation fails
> through the Eclipse updater:
>
> Unable to complete action for feature "PyDev for Eclipse" due to errors.
> Unable to create file
> "/opt/eclipse-extensions-3/eclipse/plugins/org.python.pydev_0.9.3/PySrc/Sock
> "Brian" == Brian Beck <[EMAIL PROTECTED]> writes:
Brian> Oh yeah, and what's with not being able to configure the
Brian> code completion key sequence. How about *no* key sequence?
Brian> That's the way every other IDE I've used does it. This is
Brian> more like semi-automatic
> "Brian" == Brian Beck <[EMAIL PROTECTED]> writes:
Brian> Okay, sorry for spamming the newsgroup so much, but I
Brian> installed 0.9.3 properly and the same issues I mentioned
Brian> before persist. Code completion for imports or locals don't
Brian> work at all -- the space t
Ville Vainio wrote:
> Perhaps you are just being impatient?
>
> Also, make sure that Preferences/pydev/code completion has
> "Autocomplete on '.'" box checked.
Yeah, that option is enabled. I actually just discovered that it does
work in the example you give and for other modules in the standard
Hello Michael,
Eckhoff, Michael A wrote:
> Hello,
>
> I failed to locate a list for pygtk, so I thought I'd
> ask my question here. Is it possible to write CGI
> scripts that bring up a GUI (as in GTK+, QT, Tk, ...)
> or an openGL display that is windowed inside a web
> browser?
>
> The answer wou
Hi,
I'm trying to set the title of the console window (CMD.EXE) in Windows.
I want it set to the basename of the current directory and it should
stay after the script has finished.
Now, the console title is easily set with the DOS-command 'title
NewTitle'. But I'd like to do this from a Python scr
Ok I get your point.
Well actually my application is small in the begining, but then may be
will a large one when we want to add more features.
--
http://mail.python.org/mailman/listinfo/python-list
Hansan wrote:
Hi.
Sorry forgot to post a "non-working" example
That could be
print "", "some text" '''"
I know that it isnt very creative, but I am having a hard time getting html
to work together with python.
When the link "some text" is clicked I want to send both the first variable
called v
> CherryPy and Quixote are for programming in the small
May I ask why you say that ?
Just because a framework is light and easy doesn't mean it doesn't
scale well ...
> I have not idea how they scale in the large.
Well, I do :-)
Among many other sites, CherryPy powers the BackOffice system of a
On Wed, 27 Apr 2005 17:28:04 +0200, rumours say that "Fredrik Lundh"
<[EMAIL PROTECTED]> might have written:
>> import errno
>>
>> try:
>> ...
>> except OSError, exc:
>> if exc.errno == errno.ENOENT: # file inexistant
>> ...
>> elif exc.errno == errno.EPERM: # no permissions
>> ...
>
Something like this should be close:
import win32com.client, pythoncom
ie=win32com.client.Dispatch('internetexplorer.application')
ie.Visible=1
ie.Navigate('somepagewithjavascript.html')
id=ie.Document.Script._oleobj_.GetIDsOfNames('somejsfunction')
res=ie.Document.Script._oleobj_.Invoke(id, 0, py
> "Brian" == Brian Beck <[EMAIL PROTECTED]> writes:
Brian> Ville Vainio wrote:
>> Perhaps you are just being impatient?
>>
>> Also, make sure that Preferences/pydev/code completion has
>> "Autocomplete on '.'" box checked.
Brian> Yeah, that option is enabled. I actual
Thanks for you help, it is working now :D
Take care
"Kent Johnson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hansan wrote:
>> Hi.
>>
>> Sorry forgot to post a "non-working" example
>>
>> That could be
>> print "", "some text" > type=hidden name="eventid" value='''+str(varia
Jason Mobarak wrote:
There's also the shutil module, which is platform independant.
http://docs.python.org/lib/module-shutil.html
...see the rmtree function
Thanks, this is what I was looking for.
A.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I have a following problem. Let's say there is a module which could be
imported or run as __main__. It is going to contain hundreds of classes,
something like that:
import moduleA
from moduleB import *
class A:
pass
class B:
pass
class C:
pass
[...]
I would like to be
Michael Hoffman wrote:
The easiest way, in my mind would be to store the files in a directory
according to the hour they were requested, for example, a file generated
between 2 p.m. and 3 p.m. today:
http://www.example.com/temp/20050428T14/d41d8cd98f00b204e9800998ecf8427e.html
Depending on the
> 4) I doubt seriously whether God plays a guitar, since guitars are made by
> men, for men. His Son could theoretically play a guitar. Perhaps He does.
> Perhaps He doesn't. Only the Father and His Holy Angels know.
Perlse.
Do you really take this stuf seriously ?
It's like the ancien
runes wrote:
> I'm trying to set the title of the console window (CMD.EXE) in Windows.
> I want it set to the basename of the current directory and it should
> stay after the script has finished.
>
> Any ideas?
>
I don't think you can do that.
Whenever you start an application from the command p
Jason Mobarak <[EMAIL PROTECTED]> wrote:
> Why do you want to do this in a thread? What's wrong with
> reactor.callLater?
>
> import time
> from twisted.internet import reactor
>
> def shutdown():
>
>time.sleep(3)
>print "stopping"
>reactor.callFromThread(reactor.stop)
>
> reactor.
Thx very much, I got the point now ( ;
> The latter. It's not completely self contained, there is an
> ..exe and some dll files that need to be distributed together.
> It's explained very clearly by the py2exe web site:
>
> http://starship.python.net/crew/theller/py2exe/
>
> Never used google b
I've just tried to build both console and windows exe and
it works just fine
monkey wrote:
Thx very much, I got the point now ( ;
--
http://mail.python.org/mailman/listinfo/python-list
You didn't say what platform, but if it is Windows take a
look at Inno Installer. It is a complete installation
framework that allows you to package everything into a
single setup.exe file. I use a combination of py2exe and
Inno to do my apps that are to be distributed. Nothing
could be simpler.
Well, let me specialize my sentence
> CherryPy and Quixote are for programming in the small
in
> CherryPy and Quixote are good for programming in the small
meaning that these frameworks help you when programming in the small.
This statement does NOT imply that they get in your way when you
pr
"Donald L McDaniel" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> 4) I doubt seriously whether God plays a guitar, since guitars are made by
> men, for men. His Son could theoretically play a guitar. Perhaps He
> does. Perhaps He doesn't. Only the Father and His Holy Angels
[EMAIL PROTECTED] wrote:
> I'm trying to build 'MySQL-python-1.2.0' on my Linux FC2:
...
> gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -march=i386
> -mcpu=i686 -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.3 -c
> _mysql.c -o build/temp.linux-i686-2.3/_mysql.o -I'/usr/include/mysql'
Hmm.
>From an interactive interpreter this works for me.
import os
os.system('title Jay')
but the title returns to its previous value when I Ctrl-Z out of the
process.
If I save this as a file and run it, it seems to work without spawning
a new window but resets it the title after the program f
Any class has a .__module__ attribute giving the name
of the module where the class was defined, so you
need something like
[c for c in globals() if inspect.isclass(c) and c.__module__ ==
"__main__"]
Michele Simionato
--
http://mail.python.org/mailman/listinfo/python-list
IMO the fact that so many people ask
"How can I create executables in Python on Windows"
indicates that standard "batteries included" Windows Python
distribution is missing a vital battery. There are tools such as
py2exe, but this functionality should be built-in, so that a newbie to
Python can j
[EMAIL PROTECTED] writes:
> http://kscraft.sourceforge.net/convert_xhtml.php?doc=pyqt-windows-install.xhtml
Which, afaics, unfortunately requires either that you have msvc or
that you compile python and every addon with mingw :-(
--
Brian (remove the sport for mail)
http://www.et.dtu.dk/staff/b
William Park <[EMAIL PROTECTED]> writes:
> Russell E. Owen <[EMAIL PROTECTED]> wrote:
> > Can anyone recommend a fast cross-platform plotting package for 2-D
> > plots?
> >
> > Our situation:
> > We are driving an instrument that outputs data at 20Hz. Control is via
> > an existing Tkinter appl
> Whenever you start an application from the command prompt the title
is
> modified by appending a dash and the name of the program you started.
When
> the application terminates the title is reset (to remove the name of
the
> running program). So any change to the title will only last until the
ne
Positions: Scientific Programmers
Location: Department of Radiation Oncology, Division of Bioinformatics
and Outcomes Research, Washington University School of Medicine, St.
Louis, Missouri
Our newly created Division of Bioinformatics and Outcomes Research has
immediate openings for scientifica
Hi,
I would like for all platforms, not just for windows. In any case, the
above two replies about "zipfile" support and "eggs" answer my
question. That's exactly what I was looking for. Thanks for prompt and
useful responses.
Raghu.
--
http://mail.python.org/mailman/listinfo/python-list
I see the ones in the docs, but I really (apparently) need some usage
notes. Something as simple as an "echo" would probably do the trick.
--
http://mail.python.org/mailman/listinfo/python-list
Hi Jay. It seems like my requirement is a light edition of your. I like
having many console windows open, and to make it easier to switch
between them, I like to name them. Todays solution is rather tedious
- a batch file that calls a python script that isolates the directory
name and stores it i
Report to [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL PROTECTED], [EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
python -o foo.exe foo.py
at the command line, and get an executable, without any further effort.
Hence making the resulting program useless to users of most operating
systems.
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Eric Brunel <[EMAIL PROTECTED]> wrote:
>On 26 Apr 2005 13:37:29 -0700, infidel <[EMAIL PROTECTED]> wrote:
>
>> from Tkinter import Tk, Button
>>
>> def say_hello(event):
>> print 'hello!'
>> print event.widget['text']
>>
>> root = Tk()
>> button1 = Button(roo
I see lambda is "going away", so I want to use something that will be
around for awhile.
All I want to do is provide an "inline function" as an argument to
another function.
For example, let's say I have a function which binds a key to a function
call. I want to do something "simple" in this f
Cool. Let me know if you want a copy of p.py (in all of it's
hard-coded glory).
I can easily put it under Public Domain and you can copy whatever you
want out of it.
...
jay
--
http://mail.python.org/mailman/listinfo/python-list
Email was scrambled by google:
Correct email address is: bior _jobs @ yahoo.com
(remove spaces).
I apologize for that.
- Joe Deasy
--
http://mail.python.org/mailman/listinfo/python-list
Paul Miller wrote:
For example, let's say I have a function which binds a key to a function
call. I want to do something "simple" in this function call, and I have
a lot of bindings, so I don't want to have a ton of tiny little
functions scattered around:
def setVarTo1():
foo.var =
Paul Miller wrote:
> I see lambda is "going away", so I want to use something that will be
> around for awhile.
>
> All I want to do is provide an "inline function" as an argument to
> another function.
That's what lambda does. But it's going away, you'll have to use def
when it does, unless the
Antoon Pardon <[EMAIL PROTECTED]> writes:
> The problem is that the fields in lst are associated
> with a number that is off by one as they are normally
> counted. If I go and ask my colleague which field
> contains some specific data and he answers:
> the 5th, I have to remind my self I want lst[
runes wrote:
> Hi Jay. It seems like my requirement is a light edition of your. I like
> having many console windows open, and to make it easier to switch
> between them, I like to name them. Todays solution is rather tedious
>
> - a batch file that calls a python script that isolates the direct
Michael Hoffman wrote:
That's what lambda does. But it's going away, you'll have to use def
when it does, unless the language designers come up with something better.
Yeah, I'm using lamda now it works nicely/cleanly.
If a lot of the bindings are actually setting variables, you could do
something
In article <[EMAIL PROTECTED]>,
"David Isaac" <[EMAIL PROTECTED]> wrote:
> I'm looking for a Python script to repair the mbx header
> for a mail file where only the header is corrupted.
"Repair" and "corrupted" covers a lot of territory.
In the simplest case, a Python script would just be
a nui
Michael Hoffman wrote:
Paul Miller wrote:
> I see lambda is "going away", so I want to use something that will be
> around for awhile.
>
> All I want to do is provide an "inline function" as an argument to
> another function.
That's what lambda does. But it's going away, you'll have to use d
Ville Vainio wrote:
> Does this help?
Not really, my PYTHONPATH is fine. I found out that modules imported in
the format "import mx" work fine, but "from mx import DateTime" doesn't
work -- it will still only auto-complete when I type "mx." instead of
realizing that it's in the local scope now. So
Sorry about that Frank. You have to create a project (New --> Project)
and add your file to it then Run-->Run. This is a bug that slipped past
because we do all of our development using projects and hadn't even
tried the obvious: open file and run. That fix has made its way to the
wx folks, but has
Franz,
To ask for help otherwise, use the forums link from
http://sourceforge.net/projects/activegrid/
--Matt
--
http://mail.python.org/mailman/listinfo/python-list
I've a simple question. Why the following:
words = "[EMAIL PROTECTED]@^%[wordA] [EMAIL PROTECTED]".split('[EMAIL
PROTECTED]&*()_+-=[]{},./')
doesn't work? The length of the result vector is 1.
I'm using ActivePython 2.4
Alex
--
http://mail.python.org/mailman/listinfo/python-list
On 2005-04-28, alexk <[EMAIL PROTECTED]> wrote:
> I've a simple question. Why the following:
>
> words = "[EMAIL PROTECTED]@^%[wordA] [EMAIL PROTECTED]".split('[EMAIL
> PROTECTED]&*()_+-=[]{},./')
>
> doesn't work?
But it does work. Your input string (the one on the left) does
not contain the de
MC05 wrote:
> "Donald L McDaniel" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>>
>> 4) I doubt seriously whether God plays a guitar, since guitars are
>> made by men, for men. His Son could theoretically play a guitar. Perhaps
>> He does. Perhaps He doesn't. Only the Father and
On Thu, 28 Apr 2005 05:07:34 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote:
... some not quite correct code ;-/
(I copy/pasted and created an illusion. My code dict has no EOS, so
I decode pad zero bits as code that a single zero stands for ('a' in this case)
so that was an oversight. I should have
Steve Holden <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> John Bokma wrote:
> > Alan Little wrote:
> >
> >
> >>Steve Holden <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >>>Your statement then becomes
> >>>
> >>>select * from foo where bar=1; drop table foo
> >>>
> >>>which is clea
alexk wrote:
I've a simple question. Why the following:
words = "[EMAIL PROTECTED]@^%[wordA] [EMAIL PROTECTED]".split('[EMAIL
PROTECTED]&*()_+-=[]{},./')
doesn't work? The length of the result vector is 1.
I'm using ActivePython 2.4
Alex
Do you mean, why doesn't it split on every character in '[EM
"Donald L McDaniel" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> MC05 wrote:
> > "Donald L McDaniel" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >>
> >> 4) I doubt seriously whether God plays a guitar, since guitars are
> >> made by men, for men. His Son cou
Hey yall,
I'm new to Python and I love it. Now I can get most of the topics
covered with the Python tutorials I've read but the one thats just
stumping me is Object Orientation. I can't get the grasp of it. Does
anyone know of a good resource that could possibly put things in focus
for me? Thanks.
Cameron Laird wrote:
In article <[EMAIL PROTECTED]>,
Eric Brunel <[EMAIL PROTECTED]> wrote:
Unfortunately, making a binding to on Button widgets does not
have the same behavior as setting their 'command' option.
Without unraveling my own confusion about who has said what to whom, does
everyone rea
[EMAIL PROTECTED] wrote:
> Hey yall,
> I'm new to Python and I love it. Now I can get most of the topics
> covered with the Python tutorials I've read but the one thats just
> stumping me is Object Orientation. I can't get the grasp of it. Does
> anyone know of a good resource that could possibly p
Yes, all of you are right. Thank you all for your answers - I'll use a
regex.
--
http://mail.python.org/mailman/listinfo/python-list
I'd be just such a newbie; I don't understand why it would matter if I
left the book instance referencing itself
However these wonderful responses have gotten me a very long way
towards my goal. I just have a couple of quick questions.
firstly, I am trying hard to figure out how to create a
On 28 Apr 2005 10:34:44 -0700, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hey yall,
> I'm new to Python and I love it. Now I can get most of the topics
> covered with the Python tutorials I've read but the one thats just
> stumping me is Object Orientation. I can't get the grasp of it. Does
> a
How about using the csv module instead of splitting ?
[EMAIL PROTECTED] wrote:
> What you want I guess is to read first all lines of the file into a
> string as you did, and then let the split method split it based on
> newlines only - see example below.
>
> Then you use split again to put all
I just learn to make a blank windows frame with python and wxpython. I found
the statment "import wx" cannot work as the original "from wxPython.wx
import *". I see in the readme file of wxpython that if I install it as the
default one, I can use "import wx" instead of the long one. What is wrong?
Here's a slight variation of tiissa's solution that gives the callable
a reference to the actual widget instead of just it's name:
from Tkinter import Tk, Button
class say_hello:
def __init__(self, widget):
self.widget = widget
def __call__(self):
print 'Hello,', self.widg
googleboy wrote:
firstly, I am trying hard to figure out how to create a new file with
the list rather than print to standard out. I haev done this:
for book in books:
print book # just to be sure it works as I expect
sort1 = open(r'D:\path to\sort1.csv', 'w+')
print >
Dave Benjamin wrote:
I think you meant to write something like this:
def attrsetter(obj, name, value):
def _return_func():
return setattr(obj, name, value)
return _return_func
Sure did. Sorry.
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list
> I'd be just such a newbie; I don't understand why it would matter if
I
> left the book instance referencing itself
It's just kind of sloppy and unnecessary to have self.self
> firstly, I am trying hard to figure out how to create a new file
with
> the list rather than print to standard out
In article <[EMAIL PROTECTED]>,
tiissa <[EMAIL PROTECTED]> wrote:
.
.
.
>So far, the OP is proposed the choice to either use the event/bind
>mecanism or use different callbacks for his different buttons (either
>with the met
In article <[EMAIL PROTECTED]>,
Peter Hansen <[EMAIL PROTECTED]> wrote:
>Paul Miller wrote:
>> For example, let's say I have a function which binds a key to a function
>> call. I want to do something "simple" in this function call, and I have
>> a lot of bindings, so I don't want to have a ton o
Cameron Laird wrote:
In article <[EMAIL PROTECTED]>,
tiissa <[EMAIL PROTECTED]> wrote:
So far, the OP is proposed the choice to either use the event/bind
mecanism or use different callbacks for his different buttons (either
with the method I proposed or not).
Is there general understanding that
Michael Hoffman wrote:
Dave Benjamin wrote:
I think you meant to write something like this:
def attrsetter(obj, name, value):
def _return_func():
return setattr(obj, name, value)
return _return_func
Sure did. Sorry.
You guys have been very helpful!
While on the subject, is there an
Hi Duncan, sorry, I was unprecise. I'm thinking of a script, called
t.py that can be used in the console like an ordinary command. Som if
I change directory from S:\scripts to d:\projects and execute the
script the title changes to "projects" etc.
I have that functionality today with a combina
I did this YEARS ago with Python 1.5, and I recall it being slightly
painful. I have an embedded Python interpreter and I want to provide an
interactive console (implemented in my GUI application with a Qt
TextEdit widget). I can handle the GUI part of it, but I'm wondering
what the latest Pyth
I'm running activestate Python 2.4 for windows, and the latest BLT,
under XP. I'm using pythonWin as my environment.
When I run my plotting program the first time, it works just fine. If I
exit out (normally), and then run it again from PythonWin, I get the
following error. It's as if something is
I'm running PythonWin on XP. When I run my plotter program the first
time, it works fine. The second time I run it, I get the following
error. If I exit PythonWin, and restart, I can again run it once. Any
ideas?
Error: 1
TclError Exception in Tk callback
Function: > (type: )
Args: ()
Tracebac
Paul Miller wrote:
Michael Hoffman wrote:
Dave Benjamin wrote:
I think you meant to write something like this:
def attrsetter(obj, name, value):
def _return_func():
return setattr(obj, name, value)
return _return_func
Sure did. Sorry.
You guys have been very helpful!
While on the
"Roger Upole" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Something like this should be close:
>
> import win32com.client, pythoncom
> ie=win32com.client.Dispatch('internetexplorer.application')
> ie.Visible=1
> ie.Navigate('somepagewithjavascript.html')
> id=ie.Document.Script._
Paul Miller wrote:
While on the subject, is there an equivalent for "methodcaller"?
ie. if I want to bind a function which calls a specific method of an
object with a specific parameter?
def funccaller(func, *args, **kwargs):
def _return_func():
return func(*args, **kwargs)
return
Dave Benjamin wrote:
You could use a combination of bound methods and the "curry" function
defined in the Python Cookbook:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52549
The examples in the discussion do just that.
Also, in the CVS version of Python, there's a new module called
"f
1 - 100 of 176 matches
Mail list logo