Derek Basch wrote:
> This one has always bugged me. Is it better to just slap a "self" in
> front of any variable that will be used by more than one class method
> or should I pass around variable between the methods?
Try to distinguish the state of the object from the parameters to methods.
An
Terry Tang wrote:
> it hits a "Runtime Error" (which is shown in a message box saying "abnormal
> program termination") and a message like the following is printed in the
> console:
> Fatal Python error: Interpreter not initialized (version mismatch?)
both the main executable (e.g. python.exe or
George Sakkis wrote:
> Is there any tool in python (or with python bindings) like Oracle
> Application Express, former HTML DB
> (http://www.oracle.com/technology/products/database/application_express/index.html)
> ? Ideally it should be dbms-agnostic, e.g. by using SQLObject to talk
> to the datab
I not only want to compare class *instances* but also the classes
themselves. Something like:
class T(object):
@classmethod
def __cmp__(cls, other):
return cmp(cls.__name__, other.__name__)
@instancemethod
def __cmp__(self, other):
return cmp(self.x, other.x)
class
> PythonWin is just an IDE. For what reason you have to delete all objects by
> yourself? Garbage collector is there for that :)
I think the garbage collector is on strike. :-)
Example:
# 1st execution
a = [1,2,3]
print a
>>> [1,2.3]
program ends.
Then I comment out a = [1,2,3] and run the pr
I'm stumped. I'm piping some content to a python program, but then want
the python program to prompt me for an answer. It goes on reading
the pipe and gives a "EOFError: EOF when reading a line".
eg:
#!/usr/bin/python
import sys
text = sys.stdin.read()
sel = raw_input('Selection?
[EMAIL PROTECTED] wrote:
> This is from a database I didn't design and can't change. The problem
> is that the ODBC module suffixes an "L" to any integer returned that
> was defined as data type number(p). For example, an integer stored as:
> 56 will be returned as 56L. Numbers that were specifie
[EMAIL PROTECTED] wrote:
> The other thing I didn't do a good job of explaining is that I want to
> have a layer of abstraction between the underlying RDBMS and the
> business logic. It's the business logic I want to use Python for, so
> that would stay roughly the same between RDBMS changes, if we
[EMAIL PROTECTED] wrote:
> I not only want to compare class *instances* but also the classes
> themselves. Something like:
> sorted([B, A]) => [A, B]
>
> My motivation for doing so is simply to sort classes based on their
> names and not (as it seems is the default behaviour) on the order in
>
I was messing around with the native ODBC module (I am using Python in
a Win32 environment), e.g:
import dbi, odbc
...and it seems to meet my needs. I'd rather use a module that comes
natively with Python if it works (don't care about performance in this
particular use case; just that it works).
Been using the ODBC module for Python 2.1 (Win32) and had another
question. When I return data from date columns, it's in a strange
object form, e.g. (don't have the output in front
of me>.
What's an easy way to convert date objects into a human-readable
string? I'm using this module to extract d
To clarify, how can I get a normal terminal prompt for raw_input to
enable me to insert a value into variable 'sel'?
The program wants to keep reading from the piped file, it seems.
Rory
On 01/03/06, Rory Campbell-Lange ([EMAIL PROTECTED]) wrote:
> I'm stumped. I'm piping some content to a pytho
[EMAIL PROTECTED] wrote:
> I was messing around with the native ODBC module (I am using Python in
> a Win32 environment), e.g:
>
> import dbi, odbc
>
> ...and it seems to meet my needs. I'd rather use a module that comes
> natively with Python if it works (don't care about performance in this
>
On Thu, 23 Feb 2006 17:49:31 -0600, rumours say that Larry Bates
<[EMAIL PROTECTED]> might have written:
>IMHO leading and/or trailing spaces in filenames is asking for
>incompatibilities with cross-platform file access. Much like
>using single-quote in filenames which are perfectly legal in
>DOS
On 3/2/06, - C Saha - <[EMAIL PROTECTED]> wrote:
>
> Hello Python Experts
>
> I am Chirantan, a beginner in python programming world. I have some
> programming knowledge in SHELL, BATCH and little bit PERL. I subscribed to
> this list with the hope that I will get support and help from all of you.
Steven Bethard wrote:
> I assume the intention was to indicate that the initialization required
> multiple statements. I just couldn't bring myself to write that
> horrible for-loop when the sum() function is builtin. ;)
Yes, this was just dummy code standing for something that really
requires
Steven Bethard wrote:
> I don't run into this often, but when I do, I usually go Jack
> Diederich's route::
>
> class A(object):
> class __metaclass__(type):
> def __init__(cls, name, bases, classdict):
> cls.sum = sum(xrange(10))
Good idea, that is really
Hi All I am getting the result but along with this error, any idea what could be the reason? fibo.fib(1000) 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987Traceback (most recent call last): File "", line 1, in ? File "fibo.py", line 8, in fib return resultNameError: global name 'res
David Boddie wrote:
> That's where QPrintDialog comes in:
>
> http://doc.trolltech.com/4.1/qprintdialog.html
>
> It's also secretly available in Qt 3 via the QPrinter.setup() method:
>
> printer = QPrinter()
> printer.setup()
> # Now, paint onto the printer as usual.
No - that was in m
There is no variable called result in your function or, presumably, in
the global scope of the programme.
As you aren't returning anything you may as well omit that line.
On 02/03/06, - C Saha - ([EMAIL PROTECTED]) wrote:
> I am getting the result but along with this error, any idea what could
On 3/2/06, - C Saha - <[EMAIL PROTECTED]> wrote:
> I am getting the result but along with this error, any idea what could be
> the reason?
>
> fibo.fib(1000)
> 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987Traceback (most recent call
> last):
> File "", line 1, in ?
> File "fibo.py", line 8, i
Hi there,
I am puzzled by the comportment of the line function from the ImageDraw
module with regard to the way it draws or does not draw the last pixel
of a line.
Below I test this function on a 3x3 image and show schematic
representations of obtained images (where o means a drawn pixel)
import
Sorry about that. I must have just skipped over the setup() call in
your code. If you're creating highly customized content then I think
you'll always need to think about getting the pages to the printer in
the right order.
For rich text documents, there's code that does this in the Qt 3 text
draw
I am having trouble with the python interactive shell. The arrow keys render as
^[[D, ^[[A, etc making line editing impossible. The arrow keys (and function
keys) work fine in bash, but in the python shell they are printed. Any ideas
what is going on?
--
http://mail.python.org/mailman/listinfo/py
On 3/2/06, William Meyer <[EMAIL PROTECTED]> wrote:
> I am having trouble with the python interactive shell. The arrow keys render
> as
> ^[[D, ^[[A, etc making line editing impossible. The arrow keys (and function
> keys) work fine in bash, but in the python shell they are printed. Any ideas
> wh
[EMAIL PROTECTED] writes:
>Thanks for the reply. I've replaced the call to read_very_eager() with
>read_until() and enabled debugging messages. My script now looks like
>this...
>#
>import telnetlib
>tn = telnetlib.Telnet('192.168.100.11')
>tn.set_debuglevel(9)
>tn
ianaré wrote:
> Hey all,
>
> if i use a os.walk() to append files to a list like so...
>
> files = []
> root = self.path.GetValue() # wx.TextCtrl input
> filter = self.fileType.GetValue().lower() # wx.TextCtrl input
> not_type = self.not_type.GetValue() # wx.CheckBox input
>
> for base, dirs,
Simon Brunning brunningonline.net> writes:
> Sounds like a readline problem. Your OS? How did you install Python?
Yea, that was it. I just had to copy readline.so from another installation.
Thanks for the quick reply
--
http://mail.python.org/mailman/listinfo/python-list
Hi. I'm using the logging package. I would like to send my log messages
to a Text widget creating using Tkinter. I was wondering if there was a
logging handler class that would do this. It seems that the standard
handlers do not support this. Has anyone tried to do this?
Thx for any help,
alex
-
"Tim Golden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
[Sergey]
>import wmi
>c = wmi.WMI (computer="srv", user="[EMAIL PROTECTED]", password="")
>pid, retval = c.Win32_Process.Create (CommandLine="notepad.exe")
Wonderful... It works.
But I tryed the module, by the sample f
Rory Campbell-Lange wrote:
> To clarify, how can I get a normal terminal prompt for raw_input to
> enable me to insert a value into variable 'sel'?
>
> The program wants to keep reading from the piped file, it seems.
>
> Rory
>
> On 01/03/06, Rory Campbell-Lange ([EMAIL PROTECTED]) wrote:
> > I'm
Thanks - I took at both. Also at 'percepts', which I used a long time
ago (had forgotten about it). Percepts has a great little java applet
for viewing the class hierarchy. I don't think it works for python,
just C++ though. Looks like doxygen will fit the bill.
--
http://mail.python.org/mailm
Steven Bethard wrote:
> I don't run into this often, but when I do, I usually go Jack
> Diederich's route::
>
> class A(object):
> class __metaclass__(type):
> def __init__(cls, name, bases, classdict):
> cls.sum = sum(xrange(10))
I think you should call t
[Sergey]
| "Tim Golden" <[EMAIL PROTECTED]> wrote in
| message news:[EMAIL PROTECTED]
| [Sergey]
|
| >import wmi
| >c = wmi.WMI (computer="srv", user="[EMAIL PROTECTED]", password="")
| >pid, retval = c.Win32_Process.Create (CommandLine="notepad.exe")
|
| Wonderful... It works.
|
| But I t
That works great for me on my unixoid system.
Thanks, Fredrik.
On 02/03/06, Fredrik Lundh ([EMAIL PROTECTED]) wrote:
> since there's only one input channel for a program (stdin), and raw_input
> reads from that channel, I don't think there's a portable way to do this.
>
...
> # rebind sys.st
[EMAIL PROTECTED] wrote:
> Been using the ODBC module for Python 2.1 (Win32) and had another
> question. When I return data from date columns, it's in a strange
> object form, e.g. (don't have the output in front
> of me>.
>
> What's an easy way to convert date objects into a human-readable
> str
Kent Johnson wrote:
> dirs.sort(key=str.lower) # note no need for lambda
However, this will raise a TypeError for unicode directory names while the
lambda continues to work.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
Great, thanks Diez! Should I just use str(n) to convert it to a format
I can write out to a flat file? I'm also struggling with the strange
date object format that the ODBC module returns when I fetch rows. I
need to convert that to a text string in a format that a mainframe
flatfile database requi
Thanks Frank. Much appreciated. I will give it a go.
--
http://mail.python.org/mailman/listinfo/python-list
Thanks Frank. Much appreciated. I will give it a go.
--
http://mail.python.org/mailman/listinfo/python-list
[Sergey]
| "Tim Golden" <[EMAIL PROTECTED]> wrote in
| message news:[EMAIL PROTECTED]
| [Sergey]
|
| >import wmi
| >c = wmi.WMI (computer="srv", user="[EMAIL PROTECTED]", password="")
| >pid, retval = c.Win32_Process.Create (CommandLine="notepad.exe")
|
| Wonderful... It works.
Also, in ca
[EMAIL PROTECTED] wrote:
> Great, thanks Diez! Should I just use str(n) to convert it to a format
> I can write out to a flat file? I'm also struggling with the strange
I guess so, yes.
> date object format that the ODBC module returns when I fetch rows. I
> need to convert that to a text string
Alexandre Guimond wrote:
> Hi. I'm using the logging package. I would like to send my log messages
> to a Text widget creating using Tkinter. I was wondering if there was a
> logging handler class that would do this. It seems that the standard
> handlers do not support this. Has anyone tried to do
Hi Ben. I hadn't realize that walk was just giving the file name so the
join did the job just great. Many thanks for helping me out with this.
Regards,
David
Ben Cartwright wrote:
> David Pratt wrote:
>
>>OSError: [Errno 2] No such file or directory: '.DS_Store'
>
>
>
> Ah. You didn't menti
"Tim Golden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
[Sergey]
>| >import wmi
>| >c = wmi.WMI (computer="srv", user="[EMAIL PROTECTED]", password="")
>| >pid, retval = c.Win32_Process.Create (CommandLine="notepad.exe")
>|
>| Wonderful... It works.
>Also, in case you haven't
[Sergey]
| Yes, I had run it.
|
| And, just now I updated python, pythonwin and wmi.py to
| latest version. And got:
|
| >>> a=wmi.WMI()
| >>> a.Win32_Process.Create(CommandLine="notepad.exe")#
| --- it works
| >>> a.Win32_Process.new().Create(CommandLine="notepad.exe")
| # it still fail
Derek Basch wrote:
> This one has always bugged me. Is it better to just slap a "self" in
> front of any variable that will be used by more than one class method
s/class method/method/
In Python, a "class method" is a method working on the class itself (not
on a given instance).
> or should I pa
Sorry for the double-thanks Frank.
I'm using Python 2.1 for Win32 and import datetime fails.
Does the datetime module come standard with later releases of Python?
If so, which release? If not, will datetime with with Python 2.1, if it
will, where can I get it? I'm still such a newbie with Python
I'm looking for a nice way to do i18n with XSLT, preferably using the
gettext framework. Currently I'm using 4Suite for XSLT processing. Do
you know of any solutions to this problem?
If no solutions currently exist, I'll try to write something myself. Any
ideas on how to do this properly? Any exis
There is a strange freeze/crash only on dual core machines:
I have a python app (Python 2.3.5 /Pythonwin build 203 / Windows)
running with no stability problems on normal machines (Or a crash is so
rare, that absolutely nobody obverses it, though the overall majority of
users uses single core m
I am in the process of learning Python. I have the basics down and I
now want to test my abilitiy to use them in a (very) small project. I
have the idea for a (very) small text based game mapped out in my head.
It will include two rooms, random creatures (amounts and type) in each
room and rando
[EMAIL PROTECTED] wrote:
> Sorry for the double-thanks Frank.
>
> I'm using Python 2.1 for Win32 and import datetime fails.
>
> Does the datetime module come standard with later releases of Python?
> If so, which release? If not, will datetime with with Python 2.1, if it
> will, where can I get
This (unabashed plug) might help. Most of the tutorial is about
networking, but just skip that stuff. Hopefully the architecture
section helps. But it sounds like you're pretty much on your way
already. Just read through your first paragraph, circle every noun,
and determine whether that noun
If in Windows XP I use:
openstring= "test.py >foo.txt"
os.system(openstring)
it works.
But if I use:
file1='foo.txt'
openstring= "test.py >"+file1
It gives an IOError about no such file or directory as
\\mydidr\\foo.txt
What does it mean ?
--
http://mail.python.org/mailman/listinfo/pyth
thank you for the help, i didn't know you could sort in place like
that. definitly will come in handy.
However, i need the sorting done after the walk, due to the way the
application works... should have specified that, sorry.
TIA
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> If in Windows XP I use:
>
> openstring= "test.py >foo.txt"
> os.system(openstring)
>
> it works.
>
>
> But if I use:
>
> file1='foo.txt'
> openstring= "test.py >"+file1
>
> It gives an IOError about no such file or directory as
> \\mydidr\\foo.txt
>
> What does
Christoph Zwerschke wrote:
> Usually, you initialize class variables like that:
>
> class A:
> sum = 45
>
> But what is the proper way to initialize class variables if they are the
> result of some computation or processing as in the following silly
> example (representative for more:
>
> class
I am a newbie with Python. It's a great language, but I would like to be
able to present a simple gui menu for some of my scripts; something better
than using 'raw_input' prompts.
Any recommendations for a program that will allow me to create the gui
screens? Something useable in Linux.
thanks.
Hello
i how can set with pyserial the following data?
> byte delay= 4
> serial control line:
> dtr = high
> rts= low
Thanks Luca
--
http://mail.python.org/mailman/listinfo/python-list
Tkinter is the GUI toolkit that comes with Python and is available on
all platform without any
installation effort. It is quite OK for simple things and I would
recommend it for any beginner.
Google for "An Introduction to Tkinter" by F. Lund.
Michele Simionato
--
http://mail.python.org/mai
I must be missing something..in my SvcDoRun function, first line is
"self.timeout=1" , followed by my "while 1:" loop which listens for
the connection, processes the data, etc. Where should I place the
"rc=win32event.." and "if rc" lines? I have a feeling I'm pretty close
here.. :) Thanks ve
I understand that after you import something once, you can reload it to
pick up new changes. But does reload work with from statements? I tried
this:
from X import *
and then did my testing. I changed X and tried to reload it, but that
didn't seem to work. I figure the reason is because the mo
A minor concern, but I'm curious if there is any kind of best practice
for using whitespace within expressions and argument lists in the Python
world. For example:
1 + 2 or 1+2
func(1,2) or func(1, 2)
To me, the space makes it nicer and more readable, but I was surprised
to read in Guido's
John Salerno <[EMAIL PROTECTED]> writes:
> 1 + 2 or 1+2
>
> func(1,2) or func(1, 2)
I prefer and use 1 + 2 and func(1, 2)
I don't do whitespaces only in argument defaults like
func(foo=baz)
--
Lawrence - http://www.oluyede.org/blog
"Anyone can freely use whatever he wants but the light at
John Salerno wrote:
> A minor concern, but I'm curious if there is any kind of best practice
> for using whitespace within expressions and argument lists in the Python
> world. For example:
>
> 1 + 2 or 1+2
IMO, good style calls for spaces. Most companies have style guides for
programmers t
Hi,
I searched the web and docs but cannot figure out whats wrong with this
code:
#!/usr/bin/python
import Tkinter as Tk
class testtk(Tk.Frame):
def __init__(self):
self.root = Tk.Tk()
Tk.Frame.__init__(self,self.root)
self.frame = Tk.Frame(self.root)
self.var = Tk.Stri
John Salerno enlightened us with:
> To me, the space makes it nicer and more readable, but I was
> surprised to read in Guido's blog that he thinks 1+2 should be the
> normal way to write it. What does everyone else think?
I usually write 1 + 2 and func(a, b). Sometimes I even use more spaces
to a
Diez B. Roggisch wrote:
> [EMAIL PROTECTED] wrote:
>
> > Sorry for the double-thanks Frank.
> >
> > I'm using Python 2.1 for Win32 and import datetime fails.
> >
> > Does the datetime module come standard with later releases of Python?
> > If so, which release? If not, will datetime with with Pyth
os.popen3 delivers no error exit status on .close() - while os.popen does
Is this intended or a bug? How do I get the status?
Robert
Python 2.4.1 (#2, May 5 2005, 11:32:06)
[GCC 3.3.5 (Debian 1:3.3.5-12)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> imp
Hi group,
some days ago I posted here and say that python "forgot" to raise an
exception, but my code was too long for make some tries possible.
But now I can reproduce the problem into another, little, project:
(Need wx 2.6)
Here is the code:
www.unipex.it/vario/wxFrameSchedule.py
www.unipex.it
Sybren Stuvel wrote:
> John Salerno enlightened us with:
>> To me, the space makes it nicer and more readable, but I was
>> surprised to read in Guido's blog that he thinks 1+2 should be the
>> normal way to write it. What does everyone else think?
>
> I usually write 1 + 2 and func(a, b). Sometim
wxPython is another good option, especially since there is
boa-constructor, which is a great GUI builder, almost makes it too easy
to make a nice looking app in no time at all.
http://www.wxpython.org/download.php
http://boa-constructor.sourceforge.net/
if you decide to give wxPython a go, make
Hello,
I have a short looping script that runs in the background (Windows 2000) and
I want to have a tray icon so I know that it is running. I have looked at
wxTaskBarIcon and the examples on the web and in the demo, but it seems
pretty complex and I haven't had any success even getting one to show
John Salerno wrote:
> Guido listed a few rules that he'd like to see implemented in 2.5, and
> one of them was no more than one consecutive white space. I don't know
> how realistic some of those suggestions are, but they seem to be getting
> a little to restrictive.
in his april 1st, 2005 paper
On 2 Mar 2006 04:06:17 -0800
"kpd" <[EMAIL PROTECTED]> wrote:
> Thanks - I took at both. Also at 'percepts', which I used a long time
> ago (had forgotten about it). Percepts has a great little java applet
> for viewing the class hierarchy. I don't think it works for python,
> just C++ though. L
Sorry for the many messages, but I've been looking into it further -
since I have the server services listening and waiting for incoming
connections, how would I interrupt it to let the program know that a
stop request has been issued? For example, if I put the stop check
before it listens, I woul
3c273 wrote:
> Hello, I have a short looping script that runs in the background
> (Windows 2000) and I want to have a tray icon so I know that it is
> running. I have looked at wxTaskBarIcon and the examples on the web
> and in the demo, but it seems pretty complex and I haven't had any
> success e
Sorry, I can't help much with the issue. You are getting a low-level
hardware fault, and
not much information is being propagated up throught the system. It's
not a Python problem, but something with SANE, and the Python wrapper
is just propagating the SANE error to you. I have a few suggestions
Hello
I have the following code:
builder.py #
class HtmlBuilder(object):
@staticmethod
def page(title=''):
return HtmlPage(title)
@staticmethod
def element(tag, text=None, **attribs):
return HtmlElement(tag, text, **attribs)
@staticmethod
de
John Salerno enlightened us with:
> Guido listed a few rules that he'd like to see implemented in 2.5,
> and one of them was no more than one consecutive white space. I
> don't know how realistic some of those suggestions are, but they
> seem to be getting a little to restrictive.
I just read the
Fredrik Lundh wrote:
> in his april 1st, 2005 paper ?
>
> http://www.artima.com/weblogs/viewpost.jsp?thread=101968
That was an April's Fools joke, right? I like it though :)
Maybe it'll happen!
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> John Salerno wrote:
>
>> Guido listed a few rules that he'd like to see implemented in 2.5, and
>> one of them was no more than one consecutive white space. I don't know
>> how realistic some of those suggestions are, but they seem to be getting
>> a little to restrictive.
>
3c273 wrote:
> Hello,
> I have a short looping script that runs in the background (Windows 2000) and
> I want to have a tray icon so I know that it is running. I have looked at
> wxTaskBarIcon and the examples on the web and in the demo, but it seems
> pretty complex and I haven't had any success e
In article <[EMAIL PROTECTED]>,
robert <[EMAIL PROTECTED]> wrote:
> os.popen3 delivers no error exit status on .close() - while os.popen does
>
> Is this intended or a bug? How do I get the status?
http://docs.python.org/lib/popen3-objects.html
Worth reading the rest of the documentation abo
rtilley wrote:
> John Salerno wrote:
>> A minor concern, but I'm curious if there is any kind of best practice
>> for using whitespace within expressions and argument lists in the
>> Python world. For example:
>>
>> 1 + 2 or 1+2
>
> IMO, good style calls for spaces. Most companies have style
rtilley wrote:
> Fredrik Lundh wrote:
>> in his april 1st, 2005 paper ?
>>
>> http://www.artima.com/weblogs/viewpost.jsp?thread=101968
>
> That was an April's Fools joke, right? I like it though :)
> Maybe it'll happen!
All of it was a joke?
--
http://mail.python.org/mailman/listinfo/python-list
"Michele Petrazzo" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> wxTaskBarIcon is very, very simple!
> Into the demo, inside 80 line, you can find all the taskbar work, the
> menu connected with the rclick and its image change...
> Where do you find this complex?
I guess since it
"Thomas Heller" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> 3c273 wrote:
> > Can someone point me to a simple example that just shows an icon? I
don't
> > need it to anything but show up. Any help is appreciated.
> > Louis
> >
> >
> Simon Bruning has made something that should yo
As allternative you might want to try the commands.getstatusoutput()
method, it returns a tuple with the exit code and output of the command
you run, see http://docs.python.org/lib/module-commands.html
--
http://mail.python.org/mailman/listinfo/python-list
Thanks!!
This makes sense. And you were right about my misunderstanding.
Michael Tobis wrote:
> I think the answers so far are unnecessarily confusing and off the
> mark.
>
> Here is what I think you think you want to know:
>
> 1) import only works once. If you try import again, it will see the
Gregor Horvath schrieb:
> if __name__ == "__main__":
> t = testtk()
> t.var.set("TEST")
>
> Result:
>
> _tkinter.TclError: can't set "PY_VAR0": invalid command name
> "-1210125972check"
>
>
> Any ideas, why I cant set the variable var?
Ok. The problem is that the program enters the mainl
On Thu, 2 Mar 2006, John Salerno wrote:
> I understand that after you import something once, you can reload it to pick
> up new changes. But does reload work with from statements? I tried this:
>
> from X import *
>
> and then did my testing. I changed X and tried to reload it, but that didn't
>
TurboGears has Catwalk. Have a look at that. It is a web UI that let's
you manipulate the db. Have a look at the the TG Toolbox.
--
http://mail.python.org/mailman/listinfo/python-list
Gerard Flanagan wrote:
> Hello
>
> I have the following code:
>
> builder.py #
> class HtmlBuilder(object):
>
> @staticmethod
> def page(title=''):
> return HtmlPage(title)
>
> @staticmethod
> def element(tag, text=None, **attribs):
> return HtmlElem
Andreas R. wrote:
> 4. In the found_terminator() method, the data is attempted to be
> uncompressed, but it failes, since the received data does not have the
> same size as the data which is sent. Sometimes, the difference in size
> is often 512 between client and server, when running len(packet
Kent Johnson wrote:
> Steven Bethard wrote:
>> I don't run into this often, but when I do, I usually go Jack
>> Diederich's route::
>>
>> class A(object):
>> class __metaclass__(type):
>> def __init__(cls, name, bases, classdict):
>> cls.sum = sum(xrange(10)
Hey!
Are there any "live" modules for working with shared memory in Python?
I found some but they are all dead(posh,shm)...
Thanks, Sebastjan
--
http://mail.python.org/mailman/listinfo/python-list
Dave Benjamin wrote:
> In general, "from X import *" should be avoided anyway, for reasons that
> have been discussed many times in the past. The annoyance with reloading
> is just one more reason. Better to just use "import X" in the first place.
>
Thanks. I kind of figured it's better to use
I needed to find the instance from a bound method. Eg
>>> class C(object):
... def fn(self): print "hello"
...
>>> c=C()
>>> fn=c.fn
>>> fn
>
>>> fn.im_self
<__main__.C object at 0xb7dd2acc>
>>> fn.__self__
Traceback (most recent call last):
File "", line 1, in ?
This is a real small point, but I'd like to hear what others do in this
case. It's more an 'administrative' type question than Python code
question, but it still involves a bit of syntax.
One thing I like to do is use tabs for my indentation, because this
makes it easy to outdent when I need to
1 - 100 of 205 matches
Mail list logo