In <[EMAIL PROTECTED]>, mystilleef
wrote:
>
> Bruno Desthuilliers wrote:
>> mystilleef wrote:
>> > Bruno Desthuilliers wrote:
>> >
>> > Because you don't want third parties illegimately tampering with an
>> > object's internal data and thus crashing your system?
>>
>> Let's try again...
>>
>> poi
Dennis Lee Bieber wrote:
> On 19 Jul 2006 19:08:12 -0700, "gel" <[EMAIL PROTECTED]> declaimed the
> following in comp.lang.python:
>
> > import thread
> >
> Step one... Skip the thread module and use threading module instead.
>
> > def create():
> >
> > pythoncom.CoInitialize()
> >
Dave,
Python properties allow you to get rid of methods like c.getAttr(),
c.setAttr(v), c.delAttr() and replace them with simple constructs like
c.attr, c.attr=v and del c.attr.
If you have been using Java or C++ you know that as soon as you code
your class you have to start filling in the get()
John Machin wrote:
> On 20/07/2006 6:05 AM, John Machin wrote:
> > On 20/07/2006 1:58 AM, [EMAIL PROTECTED] wrote:
> >> def is_prime n:
> >
> > Syntax error. Should be:
> >def is_prime n:
>
> Whoops! Take 2:
>
> Should be:
>
> def is_prime(n):
Sorry for that, I was not able to cut-paste the c
Anoop wrote:
> Can any one help me out with the various depricated string functions
> that is followed in Python.
>
> For example how will be string.lower depricated.
>
> As far as string.lower('PYTHON') is concerned it is depricated as
> 'PYTHON'.lower(). Both of them would return an output : >>
Hi All
Can any one help me out with the various depricated string functions
that is followed in Python.
For example how will be string.lower depricated.
As far as string.lower('PYTHON') is concerned it is depricated as
'PYTHON'.lower(). Both of them would return an output : >>> python
Thanks fo
Gabriele *darkbard* Farina wrote:
> The first attempt to reach my goal was to override the __import__
> function to limit it working on modules that can be used and on custom
> import directories that can be accessed. Then I executed the scripts
> using exec. There is any security problem related t
damacy wrote:
> hello. i'm using wxPython as my GUI package and whenever my program
> executes a long process which takes at least 2 or 3 seconds, the user
> interface gets corrupted while executing the progrocess during the
> period.
>
> i have tried the following lines of code...
>
> frame = mai
Kay Schluehr wrote:
> What about letting your teammates editing certain data-structures in
> different files ( physical modules ) but using them in a uniform way
> and enable a single access point. If you have partial classes there is
> no reason why your team has to share a large file where they h
In message <[EMAIL PROTECTED]>, Georg Brandl wrote:
> Lawrence D'Oliveiro wrote:
>> In message <[EMAIL PROTECTED]>, Bob Greschke
>> wrote:
>>
>>> I'd go even one step further. Turn it into English (or your favorite
>>> non-computer language):
>>>
>>> 1. While list, pop.
>>>
>>> 2. While the le
Steve Holden wrote:
> mystilleef wrote, making me somewhat tired of his/her repeated inability
> to get what's being said [sigh]:
> > Bruno Desthuilliers wrote:
> >>mystilleef wrote:
> >>>Bruno Desthuilliers wrote:
> mystilleef wrote:
> >Gerhard Fiedler wrote:
> >>On 2006-07-15 06:55:1
> Anyway, I would suggest you NOT to use this code in production. Yes,
> Python
> can imitate Ruby, but using this kind of classes would confuse
> everybody and
> make your code extremely unpythonic. As always, consider changing your
> mindset,
> when you switch language. For you problem, you could
Michele Simionato ha scritto:
> I believe the new style system was designed to allows this sort of
> mixing and
> that there are no issues at all.
Thinking a bit more, there are no issues at all if you know what a new
style class is and if you do not expect it to work as an old-style one
;) For th
Patch / Bug Summary
___
Patches : 398 open ( +5) / 3334 closed (+19) / 3732 total (+24)
Bugs: 904 open ( -4) / 6011 closed (+36) / 6915 total (+32)
RFE : 222 open ( -1) / 231 closed ( +2) / 453 total ( +1)
New / Reopened Patches
__
Fix for #
Bruno Desthuilliers wrote:
> mystilleef wrote:
> > Bruno Desthuilliers wrote:
> >
> >>mystilleef wrote:
> (snip)
> >
> >Of course using setters for the sake of just using them is pointless.
>
> Indeed.
>
>
>
> >The reason to use them is if pre-conditions or post
Terry Reedy wrote:
>
> > Carl Banks wrote:
> >> def process_values(lst):
> >> if not lst:
> >> return
> >> do_expensive_initialization_step()
> >> for item in lst:
> >> do_something_with(item)
> >> do_expensive_finalization_step()
>
> Give
Sanjay ha scritto:
> Thanks for the code showing how to implement partial classes. Infact, I
> was searching for this code pattern. I will have a study on metaclass
> and then try it.
>
> Thanks
> Sanjay
Anyway, I would suggest you NOT to use this code in production. Yes,
Python
can imitate Ruby
hello. i'm using wxPython as my GUI package and whenever my program
executes a long process which takes at least 2 or 3 seconds, the user
interface gets corrupted while executing the progrocess during the
period.
i have tried the following lines of code...
frame = mainwindow(None, -1, 'my program
Carl Banks ha scritto:
> Pupeno wrote:
> > I see, thank you.
> >
> > class MyConfig(ConfigParser, object):
> > def add_section(self, section)
> > super(MyConfig, self).add_section(section)
> >
> > seems to work and as expected. Is there anything wrong with it ?
>
> Wow.
>
> I highly r
[EMAIL PROTECTED] wrote:
> I have a problem. I'm writing a simulation program with a number of
> mechanical components represented as objects.
Have you looked at SimPy? This may simplify much of your data
structure anguish (probably only need forward refs, without the back
refs), plus it will do
On Thu, 2006-07-20 at 02:53 +, Stan Cook wrote:
> A newbie to Tkinter here. . . . . .
>
> I'm trying to set the focus on an Entry textbox with
> focus_set. I am using the grid manager. I created the same
> interface before using the pack() method and the focus_set
> worked, but now it sa
Bruno Desthuilliers wrote:
> ZeD wrote:
> > Bruno Desthuilliers wrote:
> >
> >
> >>>I decided to change the name of an attribute. Problem is I've used the
> >>>attribute in several places spanning thousands of lines of code. If I
> >>>had encapsulated the attribute via an accessor, I wouldn't need
A newbie to Tkinter here. . . . . .
I'm trying to set the focus on an Entry textbox with
focus_set. I am using the grid manager. I created the same
interface before using the pack() method and the focus_set
worked, but now it says
"AttributeError: 'NoneType' object has no attribute 'focus_s
Grant Edwards wrote:
> If the server has closed the connection, then a recv() on the
> socket will return an empty string "",
after returning all the data the remote side had sent, of course.
> and a send() on the
> socket will raise an exception.
Send() might, and in many cases should, raise a
PyPgExplorer is a pure python application that allows the
user to browse and modify Postgresql Databases. Features
include:
o A Scripts menu that makes access to your favorite SQL
scripts only a click away.
o On unix and Mac systems, if psql is detected in a
standard location, then access to
Hi all
I am attempting to understand threads to use in a network app which I
am writing. The part that I am going to use threads on is run on the
clients/workstations. I will monitor all starting and ending
processes. Below is what I have been doing. It looks like only the
first thread is starti
Duncan Booth wrote:
> danielx wrote:
>
> Foo.func = dan# <-- Appearantly, something magical happens here,
> because...
> Foo.func
> >
> f = Foo.func
> f is dan # <-- things begins to look suprising here.
> > False
> ismethod(f)
> > True
> >
> > Imagine my
Leif K-Brooks wrote:
> danielx wrote:
> > This is still a little bit of magic, which gets me thinking again about
> > the stuff I self-censored. Since the dot syntax does something special
> > and unexpected in my case, why not use some more dot-magic to implement
> > privates? Privates don't have
Bruno Desthuilliers wrote:
> danielx wrote:
> > At first I was going to post the following:
> >
> >
> >
> (snip)
> >
> >
> >
> > but then I tried this:
> >
> >
> res = Foo.__dict__['func']
> res is dan
> >
> > True
> >
> > And it all started to make sense. The surprising thing turned out
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496746
When you think of modifying the interpreter, think of the compiler
module.
Gabriele *darkbard* Farina wrote:
> Hi,
>
> I saw the rexec module is deprecated. I need to develop a python
> application able to run custom python code based
Greetings.
In an effort to get python2.4 on my Centos 3.7, I installed the python
bootstrap rpm. This installed 2.4 alongside 2.2 and updated yum to 2.4.0.
Oddly, it didn't create a symlink 'python' for either 2.2 or 2.4. I also
get a series of troubling dependency errors when I run yum updat
In article <[EMAIL PROTECTED]>,
Michael Spencer <[EMAIL PROTECTED]> wrote:
> As others have pointed out, super, is designed to do something different from
> what you want. See
> http://www.python.org/download/releases/2.2.3/descrintro/#cooperation for
> GvR's
> explanation of super's inten
[EMAIL PROTECTED] wrote:
> Hey there,
> i have been learning python for the past few months, but i can seem to
> get what exactly a lamda is for. What would i use a lamda for that i
> could not or would not use a def for ? Is there a notable difference ?
> I only ask because i see it in code sample
"Gabriele *darkbard* Farina" <[EMAIL PROTECTED]> writes:
> Using a separate interpreter could be a solution, but restarting any
> time the interpreter give me too much overhead and the application will
> work as slow as a CGI app even if it runs using FastCGI.
How many users are you talking about?
Using a separate interpreter could be a solution, but restarting any
time the interpreter give me too much overhead and the application will
work as slow as a CGI app even if it runs using FastCGI.
Can't I put the interpreter to the starting state any time it finishes
a script execution without re
Hi, all,
i mean to convert
'c\000\000\000\000\001\000\000\000s\017\000\000\00
> 0\177\000\000\177\002\000d\000\000GHd\001\000S(\00
> 2\000\000\000s\005\000\000\000helloN(\000\000\000\
> 000(\000\000\000\000s\010\000\000\000
"Gabriele *darkbard* Farina" <[EMAIL PROTECTED]> writes:
> There is a way to reach this point without using rexec?
Not without a totally separate interpreter. If rexec were so easy
to fix, they'd fix it.
> There is a way to start a python interpreter from python to run the
> scripts?
Of course
I have a WxPython app that displays images that are typically around
600x600 pixels. I use a wxStaticBitmap, which appears to work fine on
Windows XP. However the documentation states that a StaticBitmap "...
is meant for display of the small icons in the dialog boxes and is not
meant to be a gener
Hi,
I saw the rexec module is deprecated. I need to develop a python
application able to run custom python code based on a configuration
file that tells the path of the script that have to be executed. Those
scripts can be runned simultaneously trought threading module, but the
MUST not have any w
Dan Stromberg wrote:
> I've been a sysadmin for about 13 years, but I'm realizing that my
> favorite part of being a sysadmin are those moments where there's a reason
> to write some code - preferably in python.
>
> What might one do to make the transition from sysadmin to python
> programmer, asid
Michael J. Fromberger wrote:
...
>
> Of course, I could just bypass super, and explicitly invoke them as:
>
> C.__init__(self, ...)
> D.__init__(self, ...)
>
> ... but that seems to me to defeat the purpose of having super in the
> first place.
As others have pointed out, super, is designe
Steve Holden wrote:
> [EMAIL PROTECTED] wrote:
> > I have a problem. I'm writing a simulation program with a number of
> > mechanical components represented as objects. When I create instances
> > of objects, I need to reference (link) each object to the objects
> > upstream and downstream of it,
Hi,
following is the python scripts:
import marshal
script = """
print 'hello'
"""
code = compile(script, "
I'm got a script which has a function with a while 1: loop that seems to execute the line it's doing twice instead of just once on each pass when called in a thread...#Script Startimport threading,time,cherrypy
def func(): while 1: print time.ctime() time.sleep(30)threading._start_
Georg Brandl ha scritto:
f.func_code.co_flags
> 67
g.func_code.co_flags
> 99
>
> => 32 (CO_GENERATOR in compiler.consts) is the flag that indicates a
> generator code object.
>
> Georg
What a fast reply!
Thank You very much! :-)
--
http://mail.python.org/mailman/listinfo/python-list
Dan Stromberg wrote:
> I've been a sysadmin for about 13 years, but I'm realizing that my
> favorite part of being a sysadmin are those moments where there's a reason
> to write some code - preferably in python.
>
> What might one do to make the transition from sysadmin to python
> programmer, asi
imho wrote:
> Hi all.
>
> Is there a way to know if a function object is actually a "generator
> function" or not ? e.g.:
>
> def f():
> pass
>
> def g():
> yield None
>
> f.__class__ is the same as g.__class__ , i.e. "function" type.
> But i "know" that the second, when invoked, r
Hi all.
Is there a way to know if a function object is actually a "generator
function" or not ? e.g.:
def f():
pass
def g():
yield None
f.__class__ is the same as g.__class__ , i.e. "function" type.
But i "know" that the second, when invoked, returns a generator object,
becaus
Ed Jensen schrieb:
> Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
>> Ah, you mean like in JAVA
>
> Java is not an acronym. That is: it's "Java", not "JAVA".
Now THAT was an important information RIGHT on topic.
>> where the compiler prevents you from accessing
>> private variables, but the runti
Larry Bates <[EMAIL PROTECTED]> writes:
[...]
> That said, I disagree that 3.5Mb is too much to download. It
> only takes about 7 seconds on my machine (cable modem). If your
> users won't wait that long, they weren't very interested in your
> application.
[...]
For some markets (very far from a
Sion Arrowsmith <[EMAIL PROTECTED]> writes:
[...]
> Who's going to notice if your executable is a couple of M slimmer?
Anybody with a modem.
John
--
http://mail.python.org/mailman/listinfo/python-list
"Bayazee" <[EMAIL PROTECTED]> writes:
> Hi ,
> I have a web site and i want to write a perogram with python that my
> users can convert custom web page of site to pdf (or other type :jpeg,
> doc,odt,or...) and download it . i dont want only convert text . it is
> be very good to i can don it for b
Matthew Wilson schrieb:
> I sometimes inadvertently create a new attribute on an object rather
> update a value bound to an existing attribute. For example:
>
> In [5]: class some_class(object):
>...: def __init__(self, a=None):
>...: self.a = a
>...:
>
Marc 'BlackJack' Rintsch skrev:
> In <[EMAIL PROTECTED]>, alfa1234 wrote:
>
> > Hi Diez !!
> > Thanks for the reply.. Tried a little well dokumented program:
> >
> > # file: construct.ini
> > retries = 10
> >
> > # file: construct.py
> > import cfgparse
> >
> > c = cfgparse.ConfigParser()
> > c.a
Matthew Wilson wrote:
> I sometimes inadvertently create a new attribute on an object rather
> update a value bound to an existing attribute. For example:
> All comments are welcome. Is there a better way of implementing the
> above class, OR, is this approach generally wrong-headed? Am I the o
"Vlad Dogaru" <[EMAIL PROTECTED]> writes:
[...]
> I am trying to write a simple login script. I understand (or rather I
> think I understand) how to set a cookie with the Cookie module. My
> problem is getting the cookies that are currently set. How can I do
> that?
You still haven't explicitly sa
In <[EMAIL PROTECTED]>, alfa1234 wrote:
> Hi Diez !!
> Thanks for the reply.. Tried a little well dokumented program:
>
> # file: construct.ini
> retries = 10
>
> # file: construct.py
> import cfgparse
>
> c = cfgparse.ConfigParser()
> c.add_option('retries', type='int')
> c.add_file('construct.
On Wed, 19 Jul 2006 20:42:40 GMT, Matthew Wilson <[EMAIL PROTECTED]> wrote:
>
>I sometimes inadvertently create a new attribute on an object rather
>update a value bound to an existing attribute. For example:
>
> [snip]
Write more unit tests. If you have mistakes like this, they will fail
and yo
[EMAIL PROTECTED] wrote:
> I have a problem. I'm writing a simulation program with a number of
> mechanical components represented as objects. When I create instances
> of objects, I need to reference (link) each object to the objects
> upstream and downstream of it, i.e.
>
> supply = supply()
> c
In article <[EMAIL PROTECTED]>,
Georg Brandl <[EMAIL PROTECTED]> wrote:
> Lawrence D'Oliveiro wrote:
> > One of my rules is, always program like the language actually has a Boolean
> > type, even if it doesn't. That means, never assume that arbitrary values
> > can be interpreted as true or false
I sometimes inadvertently create a new attribute on an object rather
update a value bound to an existing attribute. For example:
In [5]: class some_class(object):
...: def __init__(self, a=None):
...: self.a = a
...:
In [6]: c = some_class(a=1)
In
Pupeno <[EMAIL PROTECTED]> wrote:
> class MyConfig(ConfigParser, object):
> def add_section(self, section)
> super(MyConfig, self).add_section(section)
>
> seems to work and as expected. Is there anything wrong with it ?
yes.
(1) There's a colon missing in the def-line. ;-)
(2) Th
Bruno Desthuilliers wrote:
> [EMAIL PROTECTED] wrote:
[...]
> > Sorry, but I kinda agree with Boris here.
>
> On what ?
On the argument that you are (implicitly?) disagreeing with him on,
obviously. That the OP problem is not definitely the default values
question. As you say:
> >>If the OP has o
On 20/07/2006 6:05 AM, John Machin wrote:
> On 20/07/2006 1:58 AM, [EMAIL PROTECTED] wrote:
>> def is_prime n:
>
> Syntax error. Should be:
>def is_prime n:
Whoops! Take 2:
Should be:
def is_prime(n):
--
http://mail.python.org/mailman/listinfo/python-list
I have thrown together a script which reads a list or urls from a txt file and navigates to each url while recording how long it takes for the page to render completely using PAMIE. For some reason I randomly get crashes reporting:
File "c:\Python24\scripts\PAM.py", line 30, in IE_Invoke
On 20/07/2006 1:58 AM, [EMAIL PROTECTED] wrote:
> Hi,
>
> I'm new at python as I just started to learn it, but I found out
> something weird. I have wrote a little program to compute Mersenne
> number:
>
> # Snipet on
> def is_prime n:
Syntax error. Should be:
def is_prime n:
> for i in
In article <[EMAIL PROTECTED]>,
"Nick Vatamaniuc" <[EMAIL PROTECTED]> wrote:
> Michael,
> You only need to call the __init__ method of the superclass if you need
> to do something special during initialization.
Hi, Nick,
Thank you for responding. I understand the purpose in invoking the
supe
Diez B. Roggisch skrev:
> alfa1234 wrote:
>
> > Trying to convert TCL code to python.
> >
> > Have a property file from where I read some VAR's. Looks like this:
> > EARPROJECT = sgs-procDist
> > APPNAME = SGSProcedure
> >
> >
> > In my TCL code I confirm the existence of the VAR = f.ex EARPROJEC
Hi Diez !!
Thanks for the reply.. Tried a little well dokumented program:
# file: construct.ini
retries = 10
# file: construct.py
import cfgparse
c = cfgparse.ConfigParser()
c.add_option('retries', type='int')
c.add_file('construct.ini')
opts = c.parse()
print 'Number of retries:',opts.retries
G
Pupeno wrote:
> I see, thank you.
>
> class MyConfig(ConfigParser, object):
> def add_section(self, section)
> super(MyConfig, self).add_section(section)
>
> seems to work and as expected. Is there anything wrong with it ?
Wow.
I highly recommend not doing this, unless the new type
Claudio Grondi a écrit :
> Yves Lange wrote:
>> Hello,
>> i'm searching a method to take a snapshot and save it in a jpg, bmp or
>> gif file. I tried with win32api and win32con but it save the snapshot
>> to the clipboard, so i tried to redirect this in a file but i have
>> some problems while g
Tobias Brox a écrit :
> [Jason]
>
>>Nothing like being forced to write getters and setters in C++/Java
>>before you feel like shooting your source code. Please don't bring
>>this code-rage into Python.
>
>
> "Code generation" springs into my mind. IMO, if the code needs to be
> generated, the
Patrick Maupin wrote:
> The original post did not say "this function is iterating twice over
> the same data." It only said that there might be a significant
> computational cost on an empty iterator, and wished that the code would
> somehow throw an exception to alert the programmer to this cost
[EMAIL PROTECTED] a écrit :
>>Even if you need to do something during attachment of components it is
>>more Pythonic to use properties. So you will write a method in your
>>class name something like _set_up(self,upstream_obj) an _get_up(self).
>> And then at the end of your class put up=property(_
Ed Jensen wrote:
> > where the compiler prevents you from accessing
> > private variables, but the runtime allows access to these very variables
> > via reflection?
>
> Java does not allow access to private members via reflection.
Yes it does. You can call setAccessible(true) on the Method objec
In article <[EMAIL PROTECTED]>,
"Michele Simionato" <[EMAIL PROTECTED]> wrote:
> Michael J. Fromberger ha scritto:
>
> > Consider the following class hierarchy in Python:
> >
>
> > Is there a better (i.e., more elegant) way to handle the case marked
> > (**) above?
> >
> > Curious,
> > -M
> >
On 2006-07-19 14:12:33, Tobias Brox wrote:
> "Code generation" springs into my mind. IMO, if the code needs to be
> generated, the language is not sufficiently advanced.
Isn't that just a question of level? I'm sure there are editors that
generate Python class stubs, GUI builders that generate P
Hi,
I am newbie python dude. I need few hints.
I created a DB table with following fields
UserID(PK), TimeStamp, Version, IP, Port
I need to insert these info from this .log file and the log file has
lines like following with some junk garbase like "attempt using client
software " I need to get
Antoon Pardon wrote:
>> Other than in PHP, Python has clear rules when an object of a builtin type
>> is considered false (i.e. when it's empty). So why not take advantage of
>> this?
>
> Because it doesn't always do what I want.
>
> I once had a producer consumer code. When the client asked whe
Bruno Desthuilliers wrote in news:[EMAIL PROTECTED]
in comp.lang.python:
> John Salerno wrote:
>> Marc 'BlackJack' Rintsch wrote:
>>
>>> Can you flesh out your use case a little bit and tell why you can't
>>> solve the problem with inheritance or a meta class?
>>
>>
>> From my experience with
I've been a sysadmin for about 13 years, but I'm realizing that my
favorite part of being a sysadmin are those moments where there's a reason
to write some code - preferably in python.
What might one do to make the transition from sysadmin to python
programmer, aside from the basics like coming u
Iain King wrote in news:1153323649.171612.74510
@s13g2000cwa.googlegroups.com in comp.lang.python:
>
> [EMAIL PROTECTED] wrote:
>> [...] I need to reference (link) each object to the objects
>> upstream and downstream of it, i.e.
>>
>> supply = supply()
>> compressor = compressor(downs
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> > *WRONG*. The object exists in and of itself. There may be one *or more*
> > references to it, via pointers, scattered about in memory; they are
> > *NOT* components of the object. A reference count is maintained inside
> > the object and manipula
Paul Boddie wrote:
> John Machin wrote:
> > On 19/07/2006 1:05 AM, Dan Bishop wrote:
> > >
> > > xrange already has __contains__.
> >
> > As pointed out previously, xrange is a function and one would not expect
> > it to have a __contains__ method.
>
> Well, you pointed out that range is a function
Yves Lange wrote:
> Hello,
> i'm searching a method to take a snapshot and save it in a jpg, bmp or
> gif file. I tried with win32api and win32con but it save the snapshot to
> the clipboard, so i tried to redirect this in a file but i have some
> problems while getting the IMAGE stocked in the
mystilleef wrote:
> Bruno Desthuilliers wrote:
>
>>mystilleef wrote:
>>
(snip)
>For example, a third party randomly changing
>is_active, (which Python lets you do freely and easily)
Unless you make it a read-only property.
>>>
>>>So you see the purpose of accessors then?
>>
Sorry, found the bug somewhere else. You're right. Python is working OK.
--
http://mail.python.org/mailman/listinfo/python-list
[Jason]
> Nothing like being forced to write getters and setters in C++/Java
> before you feel like shooting your source code. Please don't bring
> this code-rage into Python.
"Code generation" springs into my mind. IMO, if the code needs to be
generated, the language is not sufficiently advance
[ZeD]
> you mean sed :)
> sed 's/oldName/newName/g' oldFile > newFile
I used to be a Perl programmer :-)
perl -i.bak -pe 's/oldName/newName/g' *
As said, this is risky as oldName can be used in other contexts.
--
Tobias Brox, 69°42'N, 18°57'E
--
http://mail.python.org/mailman/listinfo/pyth
Hello,
i'm searching a method to take a snapshot and save it in a jpg, bmp or
gif file. I tried with win32api and win32con but it save the snapshot to
the clipboard, so i tried to redirect this in a file but i have some
problems while getting the IMAGE stocked in the clipboard and save it to
a
Bruno Desthuilliers wrote:
>
> Nope, it's about trying to make sure that anyone googling for a similar
> problem will notice the canonical solution somehow.
>
Hey, I challenge you to cook up a plausible query even loosely fitting your
"googling for a similar problem" that would return my answe
mystilleef wrote:
> Bruno Desthuilliers wrote:
>
>>mystilleef wrote:
(snip)
>
>Of course using setters for the sake of just using them is pointless.
Indeed.
>The reason to use them is if pre-conditions or post-conditions need to
>be met. Or to control access
Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
> Ah, you mean like in JAVA
Java is not an acronym. That is: it's "Java", not "JAVA".
> where the compiler prevents you from accessing
> private variables, but the runtime allows access to these very variables
> via reflection?
Java does not allow ac
cdecarlo wrote:
> Hello,
>
> I've often found that I am writing little scripts at the interpretor to
> read a text file, perform some conversion, and then write the converted
> data back out to a file. I normally accomplish the above task by
>
> Any suggestions,
>
> Colin
You should check out
Bruno Desthuilliers wrote:
> John Salerno wrote:
>> Marc 'BlackJack' Rintsch wrote:
>>
>>> Can you flesh out your use case a little bit and tell why you can't solve
>>> the problem with inheritance or a meta class?
>>
>> From my experience with C#, the only real use for partial classes is
>> when y
> Even if you need to do something during attachment of components it is
> more Pythonic to use properties. So you will write a method in your
> class name something like _set_up(self,upstream_obj) an _get_up(self).
> And then at the end of your class put up=property(_get_up, _set_up).
> You can
Scott Simpson wrote:
> I have a loop
>
> for line in f:
> ...
>
> and if the line is over about 10,000 characters it lops it off. How do I
> get around this?
Hmmm. Works for me on Windows.
Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)]
on win32
Type "help", "copyright
Bruno,
Thanks. An issue is that I need to be able to link multiple objects to
a single object etc.
Say for example using the previous wording, I might have compressor -
multiple combustors - turbine
this complicates things slightly.
my current thought is to do a two stage initialisation
1. crea
Your can of course initialize the components first:
compr=Compressor(...),
comb=Combuster(...),
sup=Supply(...) ,
tur=Turbine(...).
Then do:
compr.up, compr.down =sup, comb
comb.up, comb.down =compr, tur
Even if you need to do something during attachment of components it is
more Pythonic to
"Antoon Pardon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>> Try some personal introspection. When you act as a Python interpreter,
>> what do you do?
>
> I do the evaluation of the target in the __setitem__ method
> (or the STORE_SUBSCR opcode).
I meant mentally, in your mind
1 - 100 of 247 matches
Mail list logo