> Great! It works.
>
There is a builtin function called hex() that does the same, but also shares
the same problem as the solution above:
>>> hex(10)
'0xa'
>>>
This is probably not "nice" in your printouts, it doesn't allign.
with the printf inspired solution you can set the precision like
Den Tue, 05 Jun 2007 22:01:44 +0200 skrev Rob Wolfe:
> Thomas Dybdahl Ahle <[EMAIL PROTECTED]> writes:
>
>> But you can't ever catch sigkill.
>
> There is no protection against sigkill.
>
>> Isn't there a way to make sure the os kills the childprocess when the
>> parrent dies?
>
> If the paren
> I am looking at ctypes and it might do what I need but I can't figure
> out a way to convert a Python File object to a C FILE pointer (which is
> the needed argument for getmntent).
>
> Any ideas?
I think you are supposed to pass the pointer to getmntent that you
obtained from setmntent (likely
Den Tue, 05 Jun 2007 15:46:39 -0500 skrev Michael Bentley:
> But actually *that* is an orphan process. When a parent process dies
> and the child continues to run, the child becomes an orphan and is
> adopted by init. Orphan processes can be cleaned up on most Unices with
> 'init q' (or somethin
On 2007-06-05, Troels Thomsen wrote:
> with the printf inspired solution you can set the precision like this:
>
a = "12\n34"
for c in a:
> ... print "%#04x" % ord(c),
> ...
> 0x31 0x32 0x0a 0x33 0x34
And if you just want to do the conversion w/o printing:
>>> a = "12\n34"
>>> ' '.j
hello,
after cleaning up a PC, Python can't find any libraries anymore.
But happily I've still one PC, where Python is running perfect.
Now I always read about the environment variable "PYTHONPATH".
But on neither PC there exists a "PYTHONPATH".
On the PC that works ok,
there is the standard "PAT
Hi!
Only under Win: PLUIE (http://ponx.org/ponx/guie)
This GUI is natively HTML.
--
@-salutations
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Glenn Hutchings <[EMAIL PROTECTED]> wrote:
>On 4 Jun, 21:29, [EMAIL PROTECTED] wrote:
>> Is there a way to resize the width of the "tkMessageBox.askyesno"
>> dialog box, so that the text does not wrap to the next line.
>
>You can use the Tk option database, either e
In article <[EMAIL PROTECTED]>,
jim-on-linux <[EMAIL PROTECTED]> wrote:
>On Monday 04 June 2007 16:29, [EMAIL PROTECTED]
>wrote:
>> Hi,
>> Is there a way to resize the width of the
>> "tkMessageBox.askyesno" dialog box, so that the
>> text does not wrap to the next line. Thanks
>> Rahul
>I don't
On Jun 5, 2007, at 4:17 PM, Thomas Dybdahl Ahle wrote:
> Den Tue, 05 Jun 2007 15:46:39 -0500 skrev Michael Bentley:
>
>> But actually *that* is an orphan process. When a parent process dies
>> and the child continues to run, the child becomes an orphan and is
>> adopted by init. Orphan processe
On Jun 5, 8:38 pm, Chris Shenton <[EMAIL PROTECTED]> wrote:
> Yeah, I think this is the cause. Unfortunately I'm using a couple
> dozen files and a bunch more libraries and if they're doing a logging.debug()
> or whatnot they're creating this.
I wouldn't have thought that well-written third part
On Jun 5, 2:57 pm, ZioMiP <[EMAIL PROTECTED]> wrote:
> Hi to all...
>
> I'm actually using Tkinter for my GUI... but I need to "put a piece of a
> web-page in a widget" how can I do?
>
> which GUI module do you suggest me to use for do that?
>
> or which GUI module do you suggest me to use at all?
> I know that WxPython work only under Windows
Hmm, there seems to be some disparity between what you know and the
truth...
WxPython works everywhere (Windows, Linux, MacOS), and it works well.
Also, it has web widgets that come standard (wx.html.HtmlWindow).
Matt
--
http://mail.python.org/mai
Matimus ha scritto:
>> I know that WxPython work only under Windows
>
> Hmm, there seems to be some disparity between what you know and the
> truth...
>
> WxPython works everywhere (Windows, Linux, MacOS), and it works well.
> Also, it has web widgets that come standard (wx.html.HtmlWindow).
>
>
ZioMiP je napisao/la:
> Hi to all...
>
> I'm actually using Tkinter for my GUI... but I need to "put a piece of a
> web-page in a widget" how can I do?
>
> which GUI module do you suggest me to use for do that?
>
> or which GUI module do you suggest me to use at all?
>
> I'm acutally using Windows
Hi to all...
I'm actually using Tkinter for my GUI... but I need to "put a piece of a
web-page in a widget" how can I do?
which GUI module do you suggest me to use for do that?
or which GUI module do you suggest me to use at all?
I'm acutally using Windows Xp but I also use Linux...
I know th
"Warren Stringer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| I am porting code that only uses this form
|a[:4]b()
|
| Which translates to:
|
| for i in range(4):
|a[i].b()
Or, more directly and perhaps more efficiently:
for e in a[:4]: e.b()
tjr
--
http://mail.py
On Jun 5, 2007, at 5:13 PM, Michael Bentley wrote:
>
> On Jun 5, 2007, at 4:17 PM, Thomas Dybdahl Ahle wrote:
>
>> Den Tue, 05 Jun 2007 15:46:39 -0500 skrev Michael Bentley:
>>
>>> But actually *that* is an orphan process. When a parent process
>>> dies
>>> and the child continues to run, the
Il Tue, 05 Jun 2007 23:57:15 +0200, Stef Mientki ha scritto:
> hello,
>
> after cleaning up a PC, Python can't find any libraries anymore.
> But happily I've still one PC, where Python is running perfect.
> Now I always read about the environment variable "PYTHONPATH".
> But on neither PC there e
> The solution was to recognize when we where finished with it to set
> self.over_there to None.
To my knowledge python does not handle all cyclic gc anyway. Here is
some information from the gc documentation:
[doc]
garbage
A list of objects which the collector found to be unreachable but
could
Cameron Laird ha scritto:
> In article <[EMAIL PROTECTED]>,
> ZioMiP <[EMAIL PROTECTED]> wrote:
>> Hi to all...
>>
>> I'm actually using Tkinter for my GUI... but I need to "put a piece of a
>> web-page in a widget" how can I do?
>>
>> which GUI module do you suggest me to use for do that?
>>
>>
Modify the PATHEXT environment variable to include .py;
For example the default one on Windows XP is:
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;
Modify it so it says:
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.py
Now you can run python programs from your c
On Jun 3, 8:56 am, [EMAIL PROTECTED] (Alex Martelli) wrote:
> Allowing a trailing ! in method names has no such cost, because in no
> language I know is ! used as a "postfix unary operator"; the gain in the
> convention "mutators end with !" is not huge, but substantial. So, the
> tradeoffs are d
In article <[EMAIL PROTECTED]>,
ZioMiP <[EMAIL PROTECTED]> wrote:
>Hi to all...
>
>I'm actually using Tkinter for my GUI... but I need to "put a piece of a
>web-page in a widget" how can I do?
>
>which GUI module do you suggest me to use for do that?
>
>or which GUI module do you suggest me to us
On Tue, 05 Jun 2007 18:08:31 +, Lenard Lindstrom wrote:
> Steven D'Aprano wrote:
>> On Mon, 04 Jun 2007 22:19:35 +, Lenard Lindstrom wrote:
>>
>>> What is "magic" about __init__ and __repr__? They are identifiers just
>>> like "foo" or "JustAnotherClass". They have no special meaning to
On Jun 4, 12:37 pm, walterbyrd <[EMAIL PROTECTED]> wrote:
> I mean other than sysadmins, programmers, and web-site developers?
>
> I have heard of some DBAs who use a lot of python.
>
> I suppose some scientists. I think python is used in bioinformatics. I
> think some math and physics people use p
Does anyone have code to copy a generator?
Here is what I'd like to do:
def foo():
yield 1
yield 2
yield 3
f = foo()
g = copy(foo)
print f.next()
1
print f.next()
2
print g.next()
1
Thanks,
Horace
--
http://mail.python.org/mailman/listinfo/python-list
Why not just do this:
>>> def foo():
... yield 1
... yield 2
... yield 3
...
>>> f = foo()
>>> g = foo()
>>> f.next()
1
>>> f.next()
2
>>> f.next()
3
>>> g.next()
1
>>> g.next()
2
>>> g.next()
3
--
http://mail.python.org/mailman/listinfo/python-list
I have about a 1600 line Pythron program I'd like to make some simple mods
to, but have really just a nodding acquaintance with Python and Tkinter. I
know quite a few languages, including C++. Let's change that. I've not used
anything but C in recent years, and C++ was in my bag before that alon
On 2007-06-05, ZioMiP <[EMAIL PROTECTED]> wrote:
> I know that WxPython work only under Windows and PyGTK work only under
> Linux...
You 'know' wrong.
wxPython works fine under Windows, Linux and OSX.
PyGTK works under Linux and Windows, but doens't use native
widgets under Windows, so it wo
My example wasn't very good. Here's another try:
def foo():
yield 1
yield 2
yield 3
f = foo()
f.next()
1
g=copy(f) # copy the generator after an iteration
f.next()
2
f.next()
3
g.next()
2
I want to copy the generator's state after one or more iterations.
In article <[EMAI
Horace Enea wrote:
> My example wasn't very good. Here's another try:
>
> def foo():
>yield 1
>yield 2
>yield 3
>
> f = foo()
> f.next()
> 1
>
> g=copy(f) # copy the generator after an iteration
>
> f.next()
> 2
> f.next()
> 3
>
> g.next()
> 2
>
> I want to copy the generat
On Jun 5, 6:17 pm, John Machin <[EMAIL PROTECTED]> wrote:
> On Jun 5, 1:04 pm, james_027 <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Jun 4, 8:16 pm, John Machin <[EMAIL PROTECTED]> wrote:
>
> > > On Jun 4, 3:52 pm, yuce <[EMAIL PROTECTED]> wrote:
>
> > > > i think this one works pretty nice:http://www.
--- walterbyrd <[EMAIL PROTECTED]> wrote:
> I am getting the idea that most python "programmers"
> use python more
> like a tool, rather than as their primary
> specialization. In other
> words, python is usually not the primary
> specialization.
I'm one of the exceptions to this rule. My prima
On Jun 5, 4:17 pm, ZioMiP <[EMAIL PROTECTED]> wrote:
> Cameron Laird ha scritto:
>
>
>
> > In article <[EMAIL PROTECTED]>,
> > ZioMiP <[EMAIL PROTECTED]> wrote:
> >> Hi to all...
>
> >> I'm actually using Tkinter for my GUI... but I need to "put a piece of a
> >> web-page in a widget" how can I do
For example,
class A:
def __init__(self,a):
self.a = a
def __eq__(self, other):
return self.a == other.a
class B:
def __init__(self,b):
self.b = b
def __eq__(self, other):
return self.b == other.b
A(1) == B(1)
---> AttributeError: B instance has no attribute a
B
Steve,
Hey, thanks. I'll try that.
Horace
In article <[EMAIL PROTECTED]>,
Steven Bethard <[EMAIL PROTECTED]> wrote:
> Horace Enea wrote:
> > My example wasn't very good. Here's another try:
> >
> > def foo():
> >yield 1
> >yield 2
> >yield 3
> >
> > f = foo()
> > f.next()
> > 1
>
On Tue, 05 Jun 2007 18:26:50 -0400, Terry Reedy wrote:
> "Warren Stringer" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED] | I am porting code that
> only uses this form |a[:4]b()
> |
> | Which translates to:
> |
> | for i in range(4):
> |a[i].b()
>
> Or, more directly and p
Interesting. So I guess to accomplish my goals, I'll have to explore one of
these frameworks.
On 6/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
On Jun 5, 9:24 pm, Christoph Haas <[EMAIL PROTECTED]> wrote:
> On Tue, Jun 05, 2007 at 03:01:01PM -0400, Chris Stewart wrote:
> > I'm intereste
En Mon, 04 Jun 2007 23:03:04 -0300, <[EMAIL PROTECTED]> escribió:
> Thanks Gabriel. That was exactly what I was looking for. Also, I'm
> glad to make a connection to the StringIO class. I'm sure I will
> remember it the next time I need it.
Glad to see it helped. Certainly StringIO is a good t
Try adding the following diagnostic messages to your __eq__ class
definitions, and see if it will dispel the confusion for the four
equality tests you have tried:
class A:
def __init__(self,a):
self.a = a
def __eq__(self, other):
print "(A) self:%r, other:%r" %(self.__class__,
On Tue, 05 Jun 2007 19:16:53 -0700, Bill Jackson wrote:
[snip]
> From the above, it seems that Python always uses the function defined
> by the class on the LEFT. However, I don't understand the following
> then:
[snip]
In general, infix operators like + - * etc. will call the appropriate
me
Steven D'Aprano wrote:
> On Tue, 05 Jun 2007 18:26:50 -0400, Terry Reedy wrote:
>
>> "Warren Stringer" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED] | I am porting code that
>> only uses this form |a[:4]b()
>> |
>> | Which translates to:
>> |
>> | for i in range(4):
>> |a
En Tue, 05 Jun 2007 03:41:19 -0300, <[EMAIL PROTECTED]> escribió:
> On 5 Jun., 01:32, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
>> Yes, it appears that you are building a plain list but your code is
>> expecting another kind of object. I'm unfamiliar with Numeric arrays, if
>> that is what y
On Jun 6, 12:07 pm, Steve Howell <[EMAIL PROTECTED]> wrote:
> --- walterbyrd <[EMAIL PROTECTED]> wrote:
> > I am getting the idea that most python "programmers"
> > use python more
> > like a tool, rather than as their primary
> > specialization. In other
> > words, python is usually not the primar
On Jun 5, 9:24 pm, Christoph Haas <[EMAIL PROTECTED]> wrote:
> On Tue, Jun 05, 2007 at 03:01:01PM -0400, Chris Stewart wrote:
> > I'm interested in learning web based python without the use of fancy
> > frameworks
> > that are out there. I'm having a hard time coming up with resources and
> > exa
On Jun 6, 12:13 pm, Eric <[EMAIL PROTECTED]> wrote:
> On Jun 5, 4:17 pm, ZioMiP <[EMAIL PROTECTED]> wrote:
>
>
>
> > Cameron Laird ha scritto:
>
> > > In article <[EMAIL PROTECTED]>,
> > > ZioMiP <[EMAIL PROTECTED]> wrote:
> > >> Hi to all...
>
> > >> I'm actually using Tkinter for my GUI... but I
On Jun 5, 12:37 am, walterbyrd <[EMAIL PROTECTED]> wrote:
> I mean other than sysadmins, programmers, and web-site developers?
>
> I have heard of some DBAs who use a lot of python.
>
> I suppose some scientists. I think python is used in bioinformatics. I
> think some math and physics people use p
En Tue, 05 Jun 2007 17:59:18 -0300, Thomas Dybdahl Ahle <[EMAIL PROTECTED]>
escribió:
> When I close my (gtk) program, I get errors like the below.
> It seams that when the interpreter shuts down, it sets every variable to
> None, but continues running the threads, (seems only in cases where
> t
On 2007-06-06, Vijayendra Bapte <[EMAIL PROTECTED]> wrote:
> Python is a rapid application development language..we uses it
> every where.. in web application development..GUI
> development..Automation/Regression test-suite
> development..Text/XML processing..website Scrapping
Boy, do I know some
In article <[EMAIL PROTECTED]>,
<[EMAIL PROTECTED]> wrote:
>
>ZioMiP je napisao/la:
>> Hi to all...
>>
>> I'm actually using Tkinter for my GUI... but I need to "put a piece of a
>> web-page in a widget" how can I do?
>>
>> which GUI module do you suggest me to use for do that?
>>
>> or which GUI
Thomas Dybdahl Ahle <[EMAIL PROTECTED]> wrote:
> But you can't ever catch sigkill.
> Isn't there a way to make sure the os kills the childprocess when the
> parrent dies?
Not as far as I know.
If you've got a pipe open to the child then killing the parent should
deliver SIGPIPE to the child w
Steven D'Aprano wrote:
> On Tue, 05 Jun 2007 18:08:31 +, Lenard Lindstrom wrote:
>
>> Steven D'Aprano wrote:
>>> On Mon, 04 Jun 2007 22:19:35 +, Lenard Lindstrom wrote:
>>>
What is "magic" about __init__ and __repr__? They are identifiers just
like "foo" or "JustAnotherClass". T
Hi!
This image show IronPython.
But... what is it?
Link :
http://msdn2.microsoft.com/en-us/vstudio/bb510103.vss_IronPython_large.jpg
--
@-salutations
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
The follow statement comes from the Python 2.5 documentation
--
encode( [encoding[,errors]])
Return an encoded version of the string. Default encoding is the
current default string encoding. errors may be given to set a
different error handling scheme.
---
what's the "Defau
101 - 155 of 155 matches
Mail list logo