ame__ == "__main__":
name = util.get_module_name(sys.modules[__name__])
module = importlib.import_module(name)
sys.modules[__name__] = module
break
# do my normal stuff at 0 indentation level
So, any thoughts? Thanks.
-eric
p.s. I might just handle this with
On Thu, Jun 9, 2011 at 12:22 AM, Eric Snow wrote:
> Sometimes when using class inheritance, I want the overriding methods
> of the subclass to get the docstring of the matching method in the
> base class. You can do this with decorators (after the class
> definition), with class dec
n the instance.
You are right about a custom descriptor.
-eric
>>>> class DocDescriptor(object):
> ... def __get__(self, instance, owner):
> ... return getattr(owner, "_mydoc", None)
> ...
>>>> class Meta(type):
> ... def __init__(cls, name, b
FYI, I started this topic up on python-ideas, as it seemed valid
enough from the responses I've gotten here [1].
-eric
[1] http://mail.python.org/pipermail/python-ideas/2011-June/010473.html
--
http://mail.python.org/mailman/listinfo/python-list
n-empty
> docstring.
>
>
Yeah, the idea of an empty docstring to trigger docstring inheritance
really appeals to me. Nice example. Incidently, aren't metaclasses
always inherited, as opposed to class decorators (which are never)?
-eric
>
> def InheritableDocstring(name, bases
On Fri, Jun 10, 2011 at 5:05 AM, Tim Chase
wrote:
> On 06/09/2011 01:22 AM, Eric Snow wrote:
>>
>> Sometimes when using class inheritance, I want the overriding methods
>> of the subclass to get the docstring of the matching method in the
>> base class. You can do this
to say
don't do it. With your idea you easily, clearly, and explicitly
indicate that you want the inheritance activated. That would work for
me.
-eric
> --
> Terry Jan Reedy
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
http://mail.python.org/mailman/listinfo/python-list
-cased to be
worth the trouble. I can just use a metaclass or class decorator that
does that, and override builtin.__build__class__ to force its use
everywhere; or use one base class for all my classes that uses the
metaclass. But it would be nice to have implicit support.
-eric
>
> Carl Banks
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
http://mail.python.org/mailman/listinfo/python-list
up the inheritance hierarchy
>> when given a method that doesn't have a docstring of its own.
>
> Since the docstrings are useful in more places than just ‘help’, I'm +1
> on having docstrings be automatically inherited if not specified.
>
> Would the OP like to propose th
On Thu, Jun 9, 2011 at 10:10 AM, Ethan Furman wrote:
> Eric Snow wrote:
>>
>> p.s. Am I missing something or can you really not change the docstring
>> of a class? I was thinking about the idea of inheriting class
>
ven a method that doesn't
> have a docstring of its own.
>
Auto inheriting docstrings would be nice, in some cases. WRT help(),
keep in mind that docstrings are used for a bunch of other things,
like doctests and some DSLs.
-eric
> Unfortunately, since unbound methods were ditched,
>
On Thu, Jun 9, 2011 at 12:37 AM, Ben Finney wrote:
> Eric Snow writes:
>
>> p.s. Am I missing something or can you really not change the docstring
>> of a class? I was thinking about the idea of inheriting class
>> docstrings too.
>
> The docstring of an object
, or am I "stuck"
with the metaclass/class decorator route? (It's not all that bad :)
Thanks!
-eric
p.s. Am I missing something or can you really not change the docstring
of a class? I was thinking about the idea of inheriting class
docstrings too.
[1]
http://code.activest
Hello,
Is there a library or regex that can determine if a string is a fqdn
(fully qualified domain name)? I'm writing a script that needs to add
a defined domain to the end of a hostname if it isn't already a fqdn
and doesn't contain the defined domain.
Thanks.
--
http://mail.python.org/mailman
trange.
>
> I'd like something like this:
> print "{solo} was captured by {jabba}".format(locals()) # WRONG!
>
> But it doesn't work.
>
> Do you have any idea?
>
You were close:
print "{solo} was captured by {jabba}".format(**locals())
This will turn l
On Tue, May 31, 2011 at 6:30 PM, Ethan Furman wrote:
> Eric Snow wrote:
>
>> Guido indicates earlier in the thread that NotImplemented is used so that
>> you know that it came from the function that you directly called, and not
>> from another call inside that function.
On Tue, May 31, 2011 at 4:18 PM, Ethan Furman wrote:
> Eric Snow wrote:
>
>> Looking at the ABC code [1], I noticed that Mapping's __eq__ method can
>> return NotImplemented. This got me curious as to why you would return
>> NotImplemented and not raise a TypeE
On Tue, May 31, 2011 at 3:46 PM, Eric Snow wrote:
> Looking at the ABC code [1], I noticed that Mapping's __eq__ method can
> return NotImplemented. This got me curious as to why you would return
> NotImplemented and not raise a TypeError or a NotImplementedError.
>
>
there a good way to tell the
difference, or would it be good practice to always handle explicitly in a
function any exception type that you may be raising there?
Thanks,
-eric
[1]
http://hg.python.org/cpython/file/29e08a98281d/Lib/collections/abc.py#l398
[2] http://bugs.python.org/issue8729
[
;def last_item(self):
>return list.last_item(self) + 1
>
>
> I was thrilled to learn a new trick, popping keyword arguments before
> calling super, and wondered why I hadn't thought of that myself. How on
> earth did I fail to realise that a kwarg dict was mut
it has its place).
Personally, I find super to make maintenance and refactoring easier, since I
don't have to fiddle with the base class name, or with passing self.
Cheers,
-eric
> http://fuhm.net/super-harmful/
>
> Cheers,
> Ian
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, May 20, 2011 at 4:55 PM, Eric Snow wrote:
>
> I have revised this and made a recipe for it:
>
>
> http://code.activestate.com/recipes/577711-validating-classes-and-objects-against-an-abstract/
>
>
I also added this:
http://code.activestate.com/recipes/577712-add
On Thu, May 19, 2011 at 11:33 PM, Eric Snow wrote:
> Thinking about class APIs and validating a class against an API. The abc
> module provides the tools to do some of this. One thing I realized, that I
> hadn't noticed before, is that the abstractness of a class is measured when
However, they mostly
seem like overkill to me. I have included them below. If anyone has ideas
on how to approach the problem of using an ABC but satisfying it with
instance names, I would love to hear it. Thanks!
-eric
[1] In this case it would be nice to know at definition time that the c
that
programmatically.
Does anyone know a better way to do ABC validation at definition time?
Thanks.
-eric
--
http://mail.python.org/mailman/listinfo/python-list
es transition the remaining ones
have less reason to stay on Python 2. The anticipation was to see everyone
on Python 3 by 5 years after its release. It was released just over 2.5
years ago.
Here are some references that you might find helpful:
http://wiki.python.org/moin/Python2orPython3
http:
I have written some code using Python 2.7 but I'd like these scripts
to be able to run on Red Hat 5's 2.4.3 version of Python which doesn't
have multiprocessing.
I can try to import multiprocessing and set a flag as to whether it is
available. Then I can create a Queue.Queue instead of a
multiproc
t color_list
>print x + "\n"
>
> color_list.append(x) # append last color left in x (no sc at end of
> string)
> print color_list
>
> print "done"
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Try the following:
color_list = x.split(&
ny of the builtin
types have custom special methods for a variety of operators, including
comparison.
Looking over the documentation, it seems like it could be touched up to
alleviate any confusion. Perhaps rewording to make it clear that the
described behavior is the default for objects,
at I needed to
look it up. I do know that the builtin list has a __eq__ method and a
__len__ method, but not a __bool__ method (which it doesn't need [3]).
-eric
[1]
http://docs.python.org/dev/py3k/reference/compound_stmts.html#the-if-statement
[2]
http://docs.python.org/dev/py3k/referen
list
empty (length 0) or is the boolean version false? Again, for lists these
are the same. For list-like classes they are not necessarily the same.
Incidently, you can also check "if li == []:". This will let the __eq__
operator jump in.
-eric
[1] http://docs.python.org/dev/py3k/re
But generally that would help bridge the inheritance gap for
isinstance cases.
-eric
p.s. I would have commented on the recipe but could not log in...
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Apr 28, 2011 at 11:01 AM, Chris Rebert wrote:
> On Thu, Apr 28, 2011 at 9:21 AM, Eric Snow
> wrote:
> > There's a big discussion going on at python-dev and python-ideas about
> NaN
> > (not-a-number, from IEEE 754). I haven't really gotten into any
> s
not clear:
1. Why is NaN not an exception? (not "why not change it to one?" Changing
it now would probably break stuff.)
2. What are the use cases for NaN? Looks like it gets used a lot as a
numeric (float?) object with non-value.
Any clarification would be really helpful. Tha
lease?
Thanks,
~Eric
--
http://mail.python.org/mailman/listinfo/python-list
his file would the socket
library then be built into the main dll file?
I'm not sure exactly how to use this config.c file.
Thanks,
~Eric
On Mon, Apr 18, 2011 at 2:30 PM, Wolfgang Rohdewald
wrote:
> On Montag 18 April 2011, Eric Frederich wrote:
>> File "F:\My_Python27\lib\s
Hello,
I have a python installation that I built myself using Visual Studio 2005.
I need this version because I need to link Python bindings to a 3rd
party library that uses VS 2005.
I want to get setuptools installed to this Python installation but the
installer won't find my version of Python e
love to see an index like this in PEP 1, but it may not be
practical, as the topics in the index can grow pretty dynamically. Maybe a
snapshot of the wiki content could be added to PEP 1? Or maybe just a link
there to the wiki page? Regardless, I hope everyone finds a topical PEP
inde
class InnerSubclass(Inner):
nonlocal Inner
class Worker(Inner.Worker):
pass
return Outer
That would pull Inner into the namespace of InnerSubclass, allowing Worker
to use it in the bases declaration.
If you really want to get crazy, I suppose you could do so metaclass
hackery...
-eric
> Thanks,
>
>
> *larry*
> **
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, Apr 8, 2011 at 11:13 PM, Jon Dowdall
wrote:
> Hi All,
>
> Sorry for the blatant advertising but hope some of you may be interested
> to know that I've created an iPad application containing the python
> interpreter and a simple execution environment. It's available in iTunes
> at http://it
On Fri, Apr 8, 2011 at 11:13 PM, Jon Dowdall
wrote:
> Hi All,
>
> Sorry for the blatant advertising but hope some of you may be interested
> to know that I've created an iPad application containing the python
> interpreter and a simple execution environment. It's available in iTunes
> at http://it
n.org/library/stdtypes.html#truth-value-testing>-eric
2011/4/6 Νικόλαος Κούρας
> >>> mail = None
> >>> mail = mail or 7
> >>> mail
> 7
>
> >>> mail = None
> >>> mail = 7 or mail
> >>> mail
> 7
>
> Here
:
> On Friday, March 25, 2011 12:02:16 PM UTC-4, Eric Frederich wrote:
>>
>> Is there something else I should call besides "exit()" from within the
>> interpreter?
>> Is there something other than Py_Main that I should be calling?
>
> Does PyRun_Interactive
ot; or "sys.exit(123)".
I cannot call any of my C cleanup code because of this.
On Sun, Mar 27, 2011 at 1:55 PM, Jerry Hill wrote:
> On Sun, Mar 27, 2011 at 9:33 AM, Eric Frederich
> wrote:
>> This is behavior contradicts the documentation which says the value
>>
This is behavior contradicts the documentation which says the value
passed to sys.exit will be returned from Py_Main.
Py_Main doesn't return anything, it just exits.
This is a bug.
On Sun, Mar 27, 2011 at 3:10 AM, Mark Hammond wrote:
> On 26/03/2011 4:37 AM, Eric Frederich wrote:
>
Added a fflush(stdout) after each printf and, as I expectedstill
only the first 2 prints.
On Fri, Mar 25, 2011 at 1:47 PM, MRAB wrote:
> On 25/03/2011 17:37, Eric Frederich wrote:
>>
>> So I found that if I type ctrl-d then the other lines will print.
>>
>>
to pass a value back from the interpreter via sys.exit.
Thanks,
~Eric
On Fri, Mar 25, 2011 at 12:02 PM, Eric Frederich
wrote:
> I am able to embed the interactive Python interpreter in my C program
> except that when the interpreter exits, my entire program exits.
>
> #include
>
ed.
I need to embed python in an application that needs to do some cleanup
at the end so I need that code to execute.
What am I doing wrong?
Is there something else I should call besides "exit()" from within the
interpreter?
Is there something other than Py_Main that I should be calling?
Thanks,
~Eric
--
http://mail.python.org/mailman/listinfo/python-list
In article
<6849fd3f-5116-4b35-b274-dc76ae39f...@a11g2000pro.googlegroups.com>,
RJB wrote:
> On Feb 16, 12:48 am, Eric Brunel
> wrote:
> > In article ,
> > Doug Epling wrote:
> >
> > > hey, does anyone find the UML useful during Python development of l
In article ,
"Richard D. Moores" wrote:
> I recently wrote some code that prints information about the 'jukugo'
> used in Japanese newspaper articles. A jukugo is a Japanese word
> written with at least 2 kanji. An example of a 2-kanji jukugo is å±æ©
> (kiki -- crisis). I found that I could no
In article ,
Doug Epling wrote:
> hey, does anyone find the UML useful during Python development of larger
> projects?
Well, UML being very Java/C++ oriented, I found out that Python idioms
were really difficult to represent in the diagrams. So I'm using it to a
very small extent and for doc
Hi, son.
Don't know if this would be of any interest to you. Well, I suppose it does
provide some interesting.
I hope your physical get-together will help out.
Love you, David.
Dad
On Feb 9, 2011, at 8:13 AM, Ilan Schnell wrote:
> Hello,
>
> I am pleased to announce that EPD (Enthought
Add City Coverage to MapPoint using the GeoNames Database
by Richard Marsden
http://www.mapforums.com/add-city-coverage-mappoint-using-geonames-database-15244.html
--
m: 312-399-1586
http://www.MapForums.com
http://www.MP2Kmag.com
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Jan 5, 2011 at 11:39 AM, Antoine Pitrou wrote:
> On Wed, 5 Jan 2011 11:27:02 -0500
> Eric Frederich wrote:
>> I have read through all the documentation here:
>>
>> http://docs.python.org/extending/newtypes.html
>>
>> I have not seen any documenta
files.
Question 2: How do I make C helper functions that are part of my
extension available to other C projects in the same way that PyList_*,
PyString_*, PyInt_* functions are available?
Is it possible to have distutils make a .lib file for me?
Thanks,
~Eric
--
http://mail.python.org/mailman/lis
On 12/22/2010 8:46 AM, Georg Brandl wrote:
Am 22.12.2010 02:15, schrieb Nick Coghlan:
On Wed, Dec 22, 2010 at 6:18 AM, Georg Brandl wrote:
Since PEP 3003, the Moratorium on Language Changes, is in effect, there
are no changes in Python's syntax and built-in types in Python 3.2.
Minor nit - w
n and
instantiate that type from C?
On Sat, Dec 18, 2010 at 1:18 AM, Stefan Behnel wrote:
> Eric Frederich, 17.12.2010 23:58:
>>
>> I have an extension module for a 3rd party library in which I am
>> wrapping some structures.
>> My initial attempt worked okay on Windo
Hello,
I have an extension module for a 3rd party library in which I am
wrapping some structures.
My initial attempt worked okay on Windows but failed on Linux.
I was doing it in two parts.
The first part on the C side of things I was turning the entire
structure into a char array.
The second part
O", python__x);
Are python__x and python__return_val the same object, a copy of the object?
Would python__x ever get garbage collected?
Should my code generator detect when there is only one output and not
go through the extra step?
Thanks,
~Eric
static PyObject *
wrapped_foo(PyObject *self,
In article ,
pyt...@bdurham.com wrote:
> Eric,
>
> Besides style support, what are the advantages of ttk.Frame vs.
> Tkinter.Frame?
I'd say none. They are both just containers for other widgets, support
the same layout managers, and so on. For me, using a ttk.Frame is really
that I have put the creation of the button and its packing in
2 lines. You should never do variable = widget.pack(â¦) since pack does
not return the widget. It always returns None, so doing so won't put
your widget in the variable).
The code above should do what you're after.
> Thanks in advance.
HTH
- Eric -
--
http://mail.python.org/mailman/listinfo/python-list
e for
each module"?
Are you saying that in python when I say from "Spam.ABC import *" I
need a file called "Spam.ABC.[so|pyd]"?
On Wed, Dec 1, 2010 at 8:39 PM, Robert Kern wrote:
> On 12/1/10 4:12 PM, Eric Frederich wrote:
>>
>> I have an extension to
raised on the line
frame.wm_manage()), you can also try to do it at tcl/tk level with the
line:
master.tk.call('wm', 'manage', frame)
> I appreciate any of this item
HTH
- Eric -
--
http://mail.python.org/mailman/listinfo/python-list
be declared as extern?
This is where I'm stuck.
Thanks,
~Eric
--
http://mail.python.org/mailman/listinfo/python-list
buffer, sizeof(MyStruct));
Then on the Python side I can unpack it using struct.unpack.
I'm just wondering if I need to jump through these hoops of packing it
on the C side or if I can do it directly from Python.
Thanks,
~Eric
--
http://mail.python.org/mailman/listinfo/python-list
g the script from a file.
So, how do I return values back to C? Python functions return values
but running a python script?... doesn't that just have an exit status?
Is there a mechanism for doing this?
Thanks in advance,
~Eric
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, Nov 19, 2010 at 8:12 AM, Ulrich Eckhardt
wrote:
> Eric Frederich wrote:
>> Do I put them [DLL dependencies] in some environment variable?
>> Do I put them in site-packages along with the .pyd file, or in some
>> other directory?
>
> Take a look at the
On Fri, Nov 19, 2010 at 7:28 AM, Ulrich Eckhardt
wrote:
>> Now when I created a 2nd function to wrap a library function I get the
>> following.
>>
>> ImportError: DLL load failed: The specified module could not be found.
>
> This can mean that the module itself couldn't be loaded or that one of t
tories and specified the
correct .lib file to get it to compile fine without any errors.
What is going on here? I tried running python with -vvv and got no
meaningful info... it just fails.
What else do I need to do?
Thanks,
~Eric
--
http://mail.python.org/mailman/listinfo/python-list
te.com/forums/komodo-discussion would be a
better place to continue this particular discussion?
Thanks for bringing up the issue though.
Eric Promislow
Komodo Developer
--
http://mail.python.org/mailman/listinfo/python-list
ter, so they probably are
even more accessible to people who never wrote a GUI before. The
documentation is here: http://docs.python.org/library/ttk.html#module-ttk
HTH
- Eric -
--
http://mail.python.org/mailman/listinfo/python-list
so the only way to figure out what can be done
is by reading the PyRTF source code
HTH
-Eric -
--
http://mail.python.org/mailman/listinfo/python-list
On 9/12/2010 4:28 PM, Paul Rubin wrote:
Bearophile writes:
I see DbC for Python as a way to avoid or fix some of the bugs of the
program, and not to perform proof of correctness of the code. Even if
you can't be certain, you are able reduce the probabilities of some
bugs to happen.
I think Db
Hello,
I have python2.7 .I have compiled tcl en tk and installed them in my
home directory, say /home/eric/tcl and /home/eric/tk .
I have edited
$ vi Modules/Setup
...
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
-L/home/eric/tcl/lib \
-L/home/eric/tk/lib \
-I/home/eric/tcl/include \
-I/home
(Top-post corrected; please don't do that, it makes messages very hard
to read via usenet)
In article
<26c363c8-11d7-49b9-a1c1-251ab5ff9...@p22g2000pre.googlegroups.com>,
Jah_Alarm wrote:
> On Aug 17, 7:19 pm, Eric Brunel
> wrote:
> > You have to call update_idletas
ssage
> that this module doesn't exist.
>
> thanks
Where did you find any reference to something called messagebox? The
actual module name is tkMessageBox and it should be imported separately:
import tkMessageBox
tkMessageBox.showinfo(message='Have a good day')
Should work that way.
HTH
- Eric -
--
http://mail.python.org/mailman/listinfo/python-list
In article
,
Jah_Alarm wrote:
> On Aug 17, 3:32Â am, Eric Brunel
> wrote:
> > In article
> > <993d9560-564d-47f0-b2db-6f0c6404a...@g6g2000pro.googlegroups.com>,
> >
> > Â Jah_Alarm wrote:
> > > hi,
> >
> > > pls help me out with t
In article
<24dc97b3-a8b5-4638-9cf5-a397f1eae...@q16g2000prf.googlegroups.com>,
Jah_Alarm wrote:
> hi, I've already asked this question but so far the progress has been
> small.
>
> I'm running Tkinter. I have some elements on the screen (Labels, most
> importantly) which content has to be upd
ball: if you don't return the control to the
GUI each time your variable is increased, the GUI won't get a chance to
update itself. Since you seem to use Tkinter (another wild guess), you
probably need a call to the update_idletasks method on any Tkinter
widget each time you change you
core,
which are basically only GIF so far.
BTW, I don't understand why you talk about label.bind If you need to do
anything when the label is clicked, you have to make a binding on the
label whatever it is.
HTH anyway.
- Eric -
--
http://mail.python.org/mailman/listinfo/python-list
In article
<72151646-65cb-47bb-bd55-e7eb67577...@z10g2000yqb.googlegroups.com>,
"Eric J. Van der Velden" wrote:
> Hello,
>
> I have,
>
> class C:
> n=0
> def __init__(s):
> __class__.n+=1
>
>
> I do
>
Hello,
I have,
class C:
n=0
def __init__(s):
__class__.n+=1
I do
>>> C()
This is fine. But of what thing I am taking the __class__ of?
I can also do
@staticmethod
def p():
print(__class__.n)
>>> C.p()
a label as a panel
> panel1 = tk.Label(root, image=image1)
> panel1.pack(side='top', fill='both', expand='yes')
> panel1.image = image1
> panel1.bind("", callback)
>
>
> panel1.pack()
> root.mainloop()
>
>
> app()
HTH
- Eric -
--
http://mail.python.org/mailman/listinfo/python-list
mes back in B and prints "B". He goes to C. Then somehow he
doesn't go again to A. He prints "C". Then back to D and prints "D".
Thanks,
Eric J.
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 11, 5:34 am, Steven D'Aprano wrote:
> On Tue, 10 Aug 2010 10:40:54 -0700, Eric Snow wrote:
> > ssl.SSLSocket.__init__ makes a call to _ssl.sslwrap (in the C module).
> > That in turn makes a call to PyArg_ParseTuple, which casts the first arg
> &
In article <770366ta10gk98vgd5n2tapl7ag6ska...@4ax.com>, John wrote:
> My python is version 2.6.5. Would you recomend I upgrade and if yes
> to which version?
>
>
> from tkinter import ttk
>
> Traceback (most recent call last):
> File "", line 1, in
> from tkinter import ttk
> ImportErro
does not inherit from _socket.socket, like
you do with file-like objects. Is there a way to make this work, or
is the PyArg_ParseTuple call going to stop me. Would I need to have
_ssl.sslwrap do something differently with its args?
-eric
--
http://mail.python.org/mailman/listinfo/python-list
In article , John wrote:
> As a learning exercise in Tkinter I htought about making a very simple
> and basic file manager for my own use. I tried searching google for
> any sample project and could not find anything. Not exactly sure how
> to start I tought I could ask here?
>
> I thought abou
nnot write the second argument with a dot, self.name .
Or can I somehow?
Thanks,
Eric J.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I understand this:
>>> l=[1,2,3]
>>> l[1:2]=[8,9]
>>> l
[1,8,9,3]
But how do you do this with list.insert?
Thanks,
Eric J.
--
http://mail.python.org/mailman/listinfo/python-list
will set the margin after a file is opened. You currently can't write
a post-file-open trigger in Python, (see bug
http://bugs.activestate.com/show_bug.cgi?id=45265)
Hope this helps,
Eric Promislow
Komodo Team Member
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 28, 5:48 am, Dave Pawson wrote:
> I've a fairly long bash script and I'm wondering
> how easy it would be to port to Python.
>
> Main queries are:
> Ease of calling out to bash to use something like imageMagick or Java?
> Ease of grabbing return parameters? E.g. convert can return both
> he
On Jun 27, 8:18 pm, MRAB wrote:
> eric dexter wrote:
> > On Jun 27, 5:56 pm, MRAB wrote:
> >> eric_dex...@msn.com wrote:
> >>> I managed to get the program running and the menu options are
> >>> appearing on the list but the programs are not running.
On Jun 27, 7:46 pm, MRAB wrote:
> Stephen Hansen wrote:
> > On 6/27/10 6:09 PM, MRAB wrote:
> >> Terry Reedy wrote:
> >>> Another would have been to add but never remove anthing, with the
> >>> consequence that Python would become increasingly difficult to learn
> >>> and the interpreter increasin
On Jun 27, 5:56 pm, MRAB wrote:
> eric_dex...@msn.com wrote:
> > I managed to get the program running and the menu options are
> > appearing on the list but the programs are not running. I suspect it
> > is my onexecutemethod
>
> [snip]
>
> > #add execute files from the text file list
> >
Hi,
I am trying to do a very simple thing with SUDS but I think I am
missing the obvious (first time I use suds)
I have small program that tries to open a wsdl. When I execute the
program I am getting 'suds.transport.TransportError: HTTP Error 401:
Unauthorized' Seems obvious but I specify userna
On May 7, 2010, at 11:00 AM, Stefan Schwarzer wrote:
=== Leipzig Python User Group ===
We will meet on Tuesday, May 11, 8:00 pm at the training
center of Python Academy in Leipzig, Germany
( http://www.python-academy.com/center/find.html ).
Julian Moritz will give a talk about CouchDB.
Food
On Nov 12, 11:31 am, Terry Reedy wrote:
> Alf P. Steinbach wrote:
> > One reaction to >http://preview.tinyurl.com/ProgrammingBookP3> has been that turtle
> > graphics may be off-putting to some readers because it is associated
> > with children's learning.
>
> > What do you think?
>
> I just star
On Nov 12, 10:10 am, Ethan Furman wrote:
> AK Eric wrote:
> > so:
>
> > # moduleA.py
> > import moduleB
>
> > # moduleB.py
> > import sys
> > stuff = sys._getframe(1).f_locals
> > print stuff
>
> > Prints:
>
> > {'__
so:
# moduleA.py
import moduleB
# moduleB.py
import sys
stuff = sys._getframe(1).f_locals
print stuff
Prints:
{'__builtins__': ,
'__file__': 'C:\\Documents and SettingsMy Documents\
\python\\moduleA.py',
'__name__': '__main__',
'__doc__': None}
Looks like you could query stuff['__file__']
201 - 300 of 1015 matches
Mail list logo