On 08/16/2010 10:50 PM, AK wrote:
> I stay away from ugly cramped one-liners; I mostly run over 79 when I
> have a few `and` and `or` clauses or long strings. I've also noticed
> something interesting: going from 79 to 99 affects a relatively large
> number of lines, but going over 99 (i.e. 99 to 1
On 08/16/2010 08:59 PM, AK wrote:
> But.. why horizontal scrolling, isn't autowrap much better than that?
Wouldn't it really make a visual mess of Python code if lines wrapped?
Maybe if they wrapped smartly.
In general, the only time I find my lines longer than 75 characters are
strings or somet
On Tue, Aug 17, 2010 at 2:50 PM, AK wrote:
> By the way, the reason I asked is that we're working on a python
> tutorial and I realized that even though I'm used to 99, I wasn't sure
> if it's ok to teach that to new users or not..
In my opinion it would be "okay" to teach. However:
Bare in mind
On 08/17/2010 12:26 AM, James Mills wrote:
On Tue, Aug 17, 2010 at 2:12 PM, AK wrote:
There's no doubt that there are pro's and con's, but to be fair, it's
not like code becomes unreadable over 79 chars - the difference is that
when your terminal is 80 chars, it's less convenient for you to rea
On Aug 16, 9:07 pm, Jah_Alarm wrote:
I have some elements on the screen (Labels, most
> importantly) which content has to be updated every iteration of the
> algorithm
The variable type is IntVar()
You would use int_var_name.set(some_number)
--
http://mail.python.org/mailman/listinfo/python-lis
On Aug 16, 11:04 am, Baba wrote:
> Hi Chas, Roald,
>
> These are all complicated formula that i believe are not expected at
> this level. If you look at the source (see my first submission) you
> will see that this exercise is only the second in a series called
> "Introduction to Programming". The
On Tue, Aug 17, 2010 at 2:12 PM, AK wrote:
> There's no doubt that there are pro's and con's, but to be fair, it's
> not like code becomes unreadable over 79 chars - the difference is that
> when your terminal is 80 chars, it's less convenient for you to read
> code that's wider and when your term
Greetings,
I want a debugging function with the effect of the function below (in a
seperate module):
def dump(expr):
print expr, '=', eval(expr)
foo = 33
dump('foo')
Of course this fails when called from another module because eval does not
know the globals or locals of the caller. Is the
On Mon, 16 Aug 2010 22:56:20 -0500, Robert Kern wrote:
> On 8/16/10 9:29 PM, Roy Smith wrote:
>> In article,
>> Lawrence D'Oliveiro wrote:
>>
>>> In message, Roy Smith wrote:
>>>
5) real intensity[160.0 : 30.0 : 0.01]
>>>
>>> How many elements in that array?
>>>
>>> a) 2999
>>> b) 3000
>>>
On 08/16/2010 11:51 PM, Steven D'Aprano wrote:
On Mon, 16 Aug 2010 22:35:49 -0400, AK wrote:
As monitors are getting bigger, is there a general change in opinion on
the 79 chars limit in source files? I've experimented with 98 characters
per line and I find it quite a bit more comfortable to wo
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 updated every iteration of the
algorithm run, e.g. "Iteration =" [i] for i in range(n), n=100. I'm
using the updat
On 8/16/10 10:07 PM, Aram Ter-Sarkissov wrote:
hi, this is probably a very silly question, but I can't get my hear
around it unfortunately(
I have an array (say, mat=rand(3,5)) from which I 'pull out' a row
(say, s1=mat[1,]). The problem is, the shape of this row s1 is not
[1,5], as I would expe
On 8/16/10 9:29 PM, Roy Smith wrote:
In article,
Lawrence D'Oliveiro wrote:
In message, Roy Smith wrote:
5) real intensity[160.0 : 30.0 : 0.01]
How many elements in that array?
a) 2999
b) 3000
c) neither of the above
c) neither of the above. More specifically, 13,001 (if I counted
co
On Mon, 16 Aug 2010 22:35:49 -0400, AK wrote:
> As monitors are getting bigger, is there a general change in opinion on
> the 79 chars limit in source files? I've experimented with 98 characters
> per line and I find it quite a bit more comfortable to work with that
> length, even though sometimes
On Mon, Aug 16, 2010 at 11:33 PM, kreglet wrote:
> Hello,
>
> I started learning python last year. All of this time i have used the
> terminal and gedit to create, modify, and test my applications and modules.
> For some reason I can not do this any more.
> I'll try to do my best to explain whats
Hello,
I started learning python last year. All of this time i have used the
terminal and gedit to create, modify, and test my applications and modules.
For some reason I can not do this any more.
I'll try to do my best to explain whats happening.
I have a script modtest.py which has a function t
hi, this is probably a very silly question, but I can't get my hear
around it unfortunately(
I have an array (say, mat=rand(3,5)) from which I 'pull out' a row
(say, s1=mat[1,]). The problem is, the shape of this row s1 is not
[1,5], as I would expect, but rather [5,], which means that I can't,
fo
On Tue, Aug 17, 2010 at 12:50 PM, Roy Smith wrote:
> I disagree with James. I have no problem with going wider than 80, if
> it improves readability by not forcing you to fold lines in unnatural
> places.
>
> There's more important things to worry about.
Roy, under normal circumstances I would a
On 08/16/2010 10:42 PM, James Mills wrote:
On Tue, Aug 17, 2010 at 12:35 PM, AK wrote:
As monitors are getting bigger, is there a general change in opinion on
the 79 chars limit in source files? I've experimented with 98 characters
per line and I find it quite a bit more comfortable to work wit
In article ,
James Mills wrote:
> On Tue, Aug 17, 2010 at 12:35 PM, AK wrote:
> > As monitors are getting bigger, is there a general change in opinion on
> > the 79 chars limit in source files? I've experimented with 98 characters
> > per line and I find it quite a bit more comfortable to work
On Tue, Aug 17, 2010 at 12:35 PM, AK wrote:
> As monitors are getting bigger, is there a general change in opinion on
> the 79 chars limit in source files? I've experimented with 98 characters
> per line and I find it quite a bit more comfortable to work with that
> length, even though sometimes I
As monitors are getting bigger, is there a general change in opinion on
the 79 chars limit in source files? I've experimented with 98 characters
per line and I find it quite a bit more comfortable to work with that
length, even though sometimes I have to edit files in 80 width
terminals, it's stil
In article ,
Lawrence D'Oliveiro wrote:
> In message , Roy Smith wrote:
>
> > 5) real intensity[160.0 : 30.0 : 0.01]
>
> How many elements in that array?
>
> a) 2999
> b) 3000
> c) neither of the above
c) neither of the above. More specifically, 13,001 (if I counted
correctly).
--
http://
In message , Roy Smith wrote:
> 5) real intensity[160.0 : 30.0 : 0.01]
How many elements in that array?
a) 2999
b) 3000
c) neither of the above
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 17, 2:57 am, Jeff Hobbs wrote:
> On Aug 16, 7:30 am, ChrisChia wrote:
>
> > I have this:
> > image1 = ImageTk.PhotoImage(file = "c:\\f1.jpg")
> > image2 = ImageTk.PhotoImage(file = "c:\\f2.jpg")
>
> > imagelist.append(image1)
> > imagelist.append(image2)
>
> > self.label = tk.Label(image
[Paddy]
> Lets say you have two *sets* of integers representing two near-copies
> of some system, then a measure of their difference could be calculated
> as:
>
> len(X.symmetric_difference(Y)) / (len(X) + len(Y)) * 100 %
>
> If the two collections of integers are allowed duplicates then you
> need
Hello Comp.Lang,Python,
1) How do I parse Basic Posix RE's in Python (i need it because of
some old scripts and a specific OS developed in Seattle)
2) How can I split a string into sections that MATCH a regex (rather
then splitting by seperator). Tokenizer-style but ignoring every place
from wh
On Aug 16, 5:37 pm, Jah_Alarm wrote:
> hi,
>
> I need to generate a binary array with a specified average proportion
> of 1s (e.g. [1 0 0 0
>
> 0 1 0 0] has this proportion = 25%). In Matlab I run something like
> random(m,n)
> between 0 and 1. I'm trying to use random.randint(0,2,size=[m,n]), but
On Aug 17, 3:53 am, Mark Dickinson wrote:
> On Aug 16, 8:36 pm, Mark Dickinson wrote:
>
>
>
>
>
> > On Aug 16, 8:08 pm, Jacky wrote:
> > > My concern is that struct may need to parse the format string,
> > > construct the list, and de-reference index=0 for this generated list
> > > to get the in
In article ,
Martin Gregorie wrote:
> Say you have intensity data captured from an X-ray goniometer from 160
> degrees to 30 degrees at 0.01 degree resolution. Which is most evil of
> the following?
>
> 1) real intensity[16000:3000]
>for i from lwb intensity to upb intensity
> plot(
On Aug 17, 3:38 am, Thomas Jollans wrote:
> On Monday 16 August 2010, it occurred to Jacky to exclaim:
>
>
>
>
>
> > Hi Thomas,
>
> > Thanks for your comments! Please check mine inline.
>
> > On Aug 17, 1:50 am, Thomas Jollans wrote:
> > > On Monday 16 August 2010, it occurred to Jacky to exclai
Hi Mark,
Thanks for your reply. Agree and I'll use your suggestions. Thanks!
-Jacky
On Aug 17, 3:36 am, Mark Dickinson wrote:
> On Aug 16, 8:08 pm, Jacky wrote:
>
> > Hi Thomas,
>
> > Thanks for your comments! Please check mine inline.
>
> > On Aug 17, 1:50 am, Thomas Jollans wrote:
>
> >
On Aug 16, 2010, at 20:37 , Jah_Alarm wrote:
hi,
I need to generate a binary array with a specified average proportion
of 1s (e.g. [1 0 0 0
0 1 0 0] has this proportion = 25%). In Matlab I run something like
random(m,n)
if you're coming from matlab, then you should use the numpy package
(an
hi,
I need to generate a binary array with a specified average proportion
of 1s (e.g. [1 0 0 0
0 1 0 0] has this proportion = 25%). In Matlab I run something like
random(m,n)http://mail.python.org/mailman/listinfo/python-list
On Mon, 16 Aug 2010 19:27:32 +0200, Alex van der Spek wrote:
> Here is an excerpt. It works because the end condition is a fixed number
> (ln==10255), the approximate number of data lines in a file. If I
> replace that condition by EOFError, the program does not do the intended
> work. It appears
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 the following issue: I wrote a function that uses
> > a for loop that changes a value of a certain variable each itera
Hey everyone, I'm trying to be able to run my app, which uses pygtk,
under windows, but unfortunately I'm having big problems with it. The main
purpose of this is to later on make an .exe file but i havent even been able
to run the app at least.
I've followed every single step from this faq
In message
<5fa7b287-0199-4349-ae0d-c34c8461c...@5g2000yqz.googlegroups.com>, Standish
P wrote:
> We envisage an exogenous stack which has malloc() associated
> with a push and free() associated with a pop.
Since when are malloc(3) and free(3) exogenous?
--
http://mail.python.org/mailman/listin
On Mon, 16 Aug 2010 20:40:52 +0200, Frederic Rentsch wrote:
> How about
>
[obj for obj in dataList if obj.number == 100]
>
> That should create a list of all objects whose .number is 100. No need
> to cycle through a loop.
What do you think the list comprehension does, if not cycle throug
On Sun, Aug 15, 2010 at 11:24:25PM +, Steven D'Aprano wrote:
> On Sun, 15 Aug 2010 23:21:51 +0200, fons wrote:
>
> > The documentation on execfile() and locals() makes it clear that code
> > executed from execfile() can not modify local variables in the function
> > from wich execfile() was c
On Mon, 16 Aug 2010 05:46:17 -0700, Alex Willmer wrote:
> On Aug 16, 12:23 pm, Steven D'Aprano cybersource.com.au> wrote:
>> On Sun, 15 Aug 2010 17:36:07 -0700, Alex Willmer wrote:
>> > On Aug 16, 1:07 am, Steven D'Aprano > > cybersource.com.au> wrote:
>> >> You're passing re.IGNORECASE (which ha
On Aug 8, 8:15 pm, Steven D'Aprano wrote:
> On Sun, 08 Aug 2010 17:43:03 -0700, rantingrick wrote:
> > Ruby has what they
> > call a "Here Doc". Besides picking the most boneheaded name for such an
> > object
>
> It's standard terminology that has been around for a long time in many
> different l
On Mon, 16 Aug 2010 08:17:20 -0700, Steve Ferg wrote:
> In this little script:
>
>
> import pdb
> pdb.set_trace()
> def main():
> xm = 123
> print("Hello,world!")
> main()
>
>
> When I run this, I use pdb to step through it until I reach the point in
> main() where the xm varia
On Aug 9, 8:19 am, Mike Kent wrote:
> On Aug 8, 8:43 pm, rantingrick wrote:
> Xah, this is really you, isn't it. Come on, confess.
*MOI*, How could *I* be xah. I really don't like Ruby however he
gushes over it all the time. And he does not like Python that much
either. We are total opposites,
On Mon, 16 Aug 2010 08:17:20 -0700, Steve Ferg wrote:
> In this little script:
>
>
> import pdb
> pdb.set_trace()
> def main():
> xm = 123
> print("Hello,world!")
> main()
>
>
> When I run this, I use pdb to step through it until I reach the point in
> main() where the xm varia
On 8/16/2010 4:18 PM, Baba wrote:
packages=[2,103,105]
min_size=min(packages[0],packages[1],packages[2])
or:
min_size = min(packages)
-John
--
http://mail.python.org/mailman/listinfo/python-list
well i still believe that the key is the smallest sized pack and
there's no need to go into higher mathematics to solve this problem.
I think below code works within the limits of the exercise which
states to look at a maximum range of 200 in order not to search
forever.
packages=[2,103,105]
min_s
Baba writes:
> Hi Mel,
>
> indeed i thought of generalising the theorem as follows:
> If it is possible to buy n, n+1,~, n+(x-1) sets of McNuggets, for some
> x, then it is possible to buy any number of McNuggets >= x, given that
> McNuggets come in x, y and z packs.
>
> so with diophantine_nugge
On Aug 16, 8:36 pm, Mark Dickinson wrote:
> On Aug 16, 8:08 pm, Jacky wrote:
> > My concern is that struct may need to parse the format string,
> > construct the list, and de-reference index=0 for this generated list
> > to get the int out.
>
> > There should be some way more efficient?
>
> Well,
Baba wrote:
[ ... ]
> Now, i believe that the number of consecutive passes required to make
> this work is equal to the smallest number of pack sizes. So if we have
> packs of (9,12,21) the number of passes needed would be 9 and the
> theorem would read
>
> "If it is possible to buy n,n+1,n+2,...n
On Aug 16, 8:08 pm, Jacky wrote:
> Hi Thomas,
>
> Thanks for your comments! Please check mine inline.
>
> On Aug 17, 1:50 am, Thomas Jollans wrote:
>
> > On Monday 16 August 2010, it occurred to Jacky to exclaim:
>
> > > Hi there,
>
> > > Recently I'm facing a problem to convert 4 bytes on an by
On Monday 16 August 2010, it occurred to Jacky to exclaim:
> Hi Thomas,
>
> Thanks for your comments! Please check mine inline.
>
> On Aug 17, 1:50 am, Thomas Jollans wrote:
> > On Monday 16 August 2010, it occurred to Jacky to exclaim:
> > > Hi there,
> > >
> > > Recently I'm facing a problem
Hi Thomas,
Thanks for your comments! Please check mine inline.
On Aug 17, 1:50 am, Thomas Jollans wrote:
> On Monday 16 August 2010, it occurred to Jacky to exclaim:
>
> > Hi there,
>
> > Recently I'm facing a problem to convert 4 bytes on an bytearray into
> > an 32-bit integer. So far as I c
On Sun, 2010-08-15 at 15:14 +0200, Peter Otten wrote:
> ChrisChia wrote:
>
> > dataList = [a, b, c, ...]
> > where a, b, c are objects of a Class X.
> > In Class X, it contains self.name and self.number
> >
> > If i wish to test whether a number (let's say 100) appears in one of
> > the object, a
On 8/16/2010 12:44 PM, Alex van der Spek wrote:
Anybody catches any other ways to improve my program (attached), you are
most welcome.
1. You don't need to separate out special characters (TABs, NEWLINEs,
etc.) in a string. So:
bt='-999.25'+'\t''-999.25'+'\t''-999.25'+'\t''-999.25'+'\t'+'
Alban Nona wrote:
Hello,
Im stuck with this problem:
I would like to os.stat st_mtime to copy only the files that have
different modification date.
so I found something on internet using this kind of line:
if os.stat(dest).st_mtime - os.stat(src).st_mtime > 1:
shutil.copy2 (src, dst)
On Aug 16, 10:27 am, Mark Lawrence wrote:
> On 16/08/2010 17:47, fuglyducky wrote:
>
>
>
> > I am trying to call a function with a couple additional parameters.
> > Unfortunately, for whatever reason I am unable to get this to work. I
> > am assuming that line is not passing correctly but I don't
On Aug 16, 12:38 am, "Alf P. Steinbach /Usenet" wrote:
> * Standish P, on 16.08.2010 09:20:
>
> > [garble garble]
>
> Nonsense article "We look for an exogenous stack" cross-posted to
>
> [comp.lang.c],
> [comp.lang.c++],
> [comp.theory],
> [comp.lang.python],
> [comp.lang.forth].
>
On 8/15/10 10:33 PM, Standish P wrote:
...
I don't understand a lot of your post (and it's clear that I'm not
alone). I don't know whether it's a (human) language problem or simply
an issue of your having read too many books and not having enough
practical experience, but at least I can try t
Hi Chas, Roald,
These are all complicated formula that i believe are not expected at
this level. If you look at the source (see my first submission) you
will see that this exercise is only the second in a series called
"Introduction to Programming". Therefore i am convinced that there is
a much si
On 8/16/2010 9:40 AM, Vikas Mahajan wrote:
Hello to all
I am new to python.
Hi, welcome to Python.
Hint 1: 'Variable' is a rather loose term with many meanings. Better to
think in terms of 'name' ('identifier'), which is specifically defined,
and 'object'.
I am facing problem to use varia
On Mon, Aug 16, 2010 at 12:43 PM, Roald de Vries wrote:
>>> I'm pretty sure that if there's no common divisor for all three (or more)
>>> packages (except one), there is a largest unpurchasable quantity. That
>>> is: ∀
>>> i>1: ¬(i|a) ∨ ¬(i|b) ∨ ¬(i|c), where ¬(x|y) means "x is no divider of y"
>>
On Monday 16 August 2010, it occurred to Jacky to exclaim:
> Hi there,
>
> Recently I'm facing a problem to convert 4 bytes on an bytearray into
> an 32-bit integer. So far as I can see, there're 3 ways:
> a) using struct module,
Yes, that's what it's for, and that's what you should be using.
Hello,
Im stuck with this problem:
I would like to os.stat st_mtime to copy only the files that have different
modification date.
so I found something on internet using this kind of line:
if os.stat(dest).st_mtime - os.stat(src).st_mtime > 1:
shutil.copy2 (src, dst)
So I adapted it to my scri
On Aug 16, 1:23 am, Roald de Vries wrote:
> On Aug 15, 2010, at 11:51 PM, Ian Kelly wrote:
>
>
>
> > On Sun, Aug 15, 2010 at 4:36 PM, Baba wrote:
> >> Hi Mel,
>
> >> indeed i thought of generalising the theorem as follows:
> >> If it is possible to buy n, n+1,…, n+(x-1) sets of McNuggets, for
>
Here is an excerpt. It works because the end condition is a fixed number
(ln==10255), the approximate number of data lines in a file. If I replace
that condition by EOFError, the program does not do the intended work. It
appears as if EOFError is always true in this case.
+
fuglyducky wrote:
I am trying to call a function with a couple additional parameters.
Unfortunately, for whatever reason I am unable to get this to work. I
am assuming that line is not passing correctly but I don't understand
why???
[snip]
The function's parameters are the wrong way round.
--
h
On 16/08/2010 17:47, fuglyducky wrote:
I am trying to call a function with a couple additional parameters.
Unfortunately, for whatever reason I am unable to get this to work. I
am assuming that line is not passing correctly but I don't understand
why???
I can't share all of the code because it h
On 14 Aug, 18:14, Raymond Hettinger wrote:
> On Aug 12, 1:20 pm, Paddy wrote:
>
> > I find myself needing to calculate the difference between two Counters
> > or multisets or bags.
>
> > I want those items that are unique to each bag.
>
> Tell us about your use cases. I'm curious how a program w
I found this question on
http://faq.pygtk.org/index.py?file=faq21.005.htp&req=show
but the answer did not help me.
For example I have a simple program below that I would like to
'compile' with py2exe (or anything else if it's simpler) to run in
windows as a single bundled executable file with no
On Mon, 16 Aug 2010 18:44:08 +0200
"Alex van der Spek" wrote:
> Perhaps the ones here who think I was trying to make you do my homework can
You keep replying to my message but as I pointed out in my previous
message, I'm not the one who thought that you posted a homework
question. I'm the one w
On Aug 16, 2010, at 11:40 AM, Jeff Hobbs wrote:
> On Aug 15, 4:41 pm, Chris Hare wrote:
>> I have some code that pulls a value from a database. In this case, it is
>> three space delimited words. When I display the value in a Tkinter.Entry
>> widget, the text has curly braces around it, even
Hi there,
Recently I'm facing a problem to convert 4 bytes on an bytearray into
an 32-bit integer. So far as I can see, there're 3 ways: a) using
struct module, b) using ctypes module, and c) manually manipulation.
Are there any other ways?
My sample is as following:
-
import struct
import
@All
Thanks a lot.
getattr and setattr functions solved my problem.
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 16 Aug 2010 18:26:46 +0200
"Alex van der Spek" wrote:
> Nope, no homework. This was a serious question from a serious but perhaps
> simple physicist who grew up with Algol, FORTRAN and Pascal, taught himself
> VB(A) and is looking for a replacement of VB and finding that in Python. You
On Aug 16, 7:30 am, ChrisChia wrote:
> I have this:
> image1 = ImageTk.PhotoImage(file = "c:\\f1.jpg")
> image2 = ImageTk.PhotoImage(file = "c:\\f2.jpg")
>
> imagelist.append(image1)
> imagelist.append(image2)
>
> self.label = tk.Label(image = imagelist[0])
>
> is there a way that i can create a
On 16/08/2010 17:29, Alex van der Spek wrote:
Using the fileinput module to process lists of files:
for line in fileinput.input(logs):
Unfortunately, EOFError does not seem to indicate the end-of-file
condition correctly when using fileinput.
How would you find the EOF file for all the files
I am trying to call a function with a couple additional parameters.
Unfortunately, for whatever reason I am unable to get this to work. I
am assuming that line is not passing correctly but I don't understand
why???
I can't share all of the code because it has IP in it but below are
the pertinent s
Perhaps the ones here who think I was trying to make you do my homework can
actually help me for real. Since I run my own company (not working for any
of the big ones) I can't afford official training in anything. So I teach
myself, help is always welcome and sought for. If that feels like doing
On Aug 16, 2010, at 5:04 PM, Ian Kelly wrote:
On Mon, Aug 16, 2010 at 4:23 AM, Roald de Vries
wrote:
I suspect that there exists a largest unpurchasable quantity iff at
least two of the pack quantities are relatively prime, but I have
made
no attempt to prove this.
That for sure is not co
On Aug 15, 4:41 pm, Chris Hare wrote:
> I have some code that pulls a value from a database. In this case, it is
> three space delimited words. When I display the value in a Tkinter.Entry
> widget, the text has curly braces around it, even when there are none in the
> surrounding the text in
Using the fileinput module to process lists of files:
for line in fileinput.input(logs):
Unfortunately, EOFError does not seem to indicate the end-of-file condition
correctly when using fileinput.
How would you find the EOF file for all the files in the file list 'logs'?
Thank you,
Alex va
Thanks much,
Nope, no homework. This was a serious question from a serious but perhaps
simple physicist who grew up with Algol, FORTRAN and Pascal, taught himself
VB(A) and is looking for a replacement of VB and finding that in Python. You
can guess my age now.
Most of my work I do in R nowa
Vikas Mahajan wrote:
On 16 August 2010 19:23, Nitin Pawar wrote:
you would need to define a class first with its attiributes and then you may
want to initiate the variables by calling the class initilializer
Actually I have to dynamically add attributes to a object. I am
writing pytho
On Mon, Aug 16, 2010 at 4:18 AM, Steven D'Aprano
wrote:
>
> On Sun, 15 Aug 2010 21:01:04 -0700, Carey Tilden wrote:
>
>> On Sun, Aug 15, 2010 at 6:43 PM, bvdp wrote:
>>
>>> Not to belabor the point .. but "func" is not a standard lib module.
>>> It's part of a much larger application ... and in t
on steven, peter and eliasf:
Well okay I'm new to the world of developing programs, if I encounter
problems I directly post a bug on the relevant page, that's maybe why
I was a bit frustrated :)
but what you three say is indeed true..
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 16, 6:53 pm, Jean-Michel Pichavant
wrote:
> Jean-Michel Pichavant wrote:
> > Kxepal wrote:
> >> Hi all!
> >> Sorry for dumb question if it is - I'd tried to google it before but
> >> have found nothing.
>
> >> Is there any way todumpcurrentloggingconfiguration for future
> >> loading it via
On Mon, Aug 16, 2010 at 11:04 AM, Ian Kelly wrote:
> On Mon, Aug 16, 2010 at 4:23 AM, Roald de Vries wrote:
>>> I suspect that there exists a largest unpurchasable quantity iff at
>>> least two of the pack quantities are relatively prime, but I have made
>>> no attempt to prove this.
>>
>> That f
On Aug 16, 8:40 pm, Vikas Mahajan wrote:
> Hello to all
>
> I am new to python. I am facing problem to use variables as object
> attributes. I have to use loop and dynamically add attributes to a
> object and for this purpose I have to use variables with object names.
>
> For example-:
> Let us sa
In article
<993d9560-564d-47f0-b2db-6f0c6404a...@g6g2000pro.googlegroups.com>,
Jah_Alarm wrote:
> hi,
>
> pls help me out with the following issue: I wrote a function that uses
> a for loop that changes a value of a certain variable each iteration.
> What I want is by clicking a button in GUI
On Aug 16, 3:14 pm, spinoza wrote:
>
> To build an explicit stack in this program would have been folly, for
> it would have been necessary to either preallocate the stack and thus
> legislate the maximum complexity of source code, or use a lot of
> memory management in the pre-existing runtim
In article
<414ff6dd-73ef-48df-bd2b-080a2c710...@h17g2000pri.googlegroups.com>,
ChrisChia wrote:
> I have this:
> image1 = ImageTk.PhotoImage(file = "c:\\f1.jpg")
> image2 = ImageTk.PhotoImage(file = "c:\\f2.jpg")
>
> imagelist.append(image1)
> imagelist.append(image2)
>
> self.label = tk.La
In this little script:
import pdb
pdb.set_trace()
def main():
xm = 123
print("Hello,world!")
main()
When I run this, I use pdb to step through it until I reach the point
in main() where the xm variable has been initialized, and then I try
to use pdb to reset the value of xm, and
On Mon, Aug 16, 2010 at 4:23 AM, Roald de Vries wrote:
>> I suspect that there exists a largest unpurchasable quantity iff at
>> least two of the pack quantities are relatively prime, but I have made
>> no attempt to prove this.
>
> That for sure is not correct; packs of 2, 4 and 7 do have a large
> is it possible to convert any and all algorithms to stack based ones and thus
> avoid memory leaks?
No, not really. If you keep the allocated things and free them in
reverse order on exit, then well yes, but practically, early free()
frees memory for reuse on low memory systems. In this sense n
Jean-Michel Pichavant wrote:
Kxepal wrote:
Hi all!
Sorry for dumb question if it is - I'd tried to google it before but
have found nothing.
Is there any way to dump current logging configuration for future
loading it via fileConfig/dictConfig?
I may be wrong but I don't think so.
JM
Please
I have this:
image1 = ImageTk.PhotoImage(file = "c:\\f1.jpg")
image2 = ImageTk.PhotoImage(file = "c:\\f2.jpg")
imagelist.append(image1)
imagelist.append(image2)
self.label = tk.Label(image = imagelist[0])
is there a way that i can create a method to switch the display the
image2 (imagelist 2nd
On Aug 16, 10:08 am, Vikas Mahajan wrote:
> On 16 August 2010 19:23, Nitin Pawar wrote:> you
> would need to define a class first with its attiributes and then you may
> > want to initiate the variables by calling the class initilializer
>
> Actually I have to dynamically add attributes to a obj
On Aug 16, 10:08 am, Vikas Mahajan wrote:
> On 16 August 2010 19:23, Nitin Pawar wrote:> you
> would need to define a class first with its attiributes and then you may
> > want to initiate the variables by calling the class initilializer
>
> Actually I have to dynamically add attributes to a obj
thanks,
Stef Mientki
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 151 matches
Mail list logo