else:
print 'end'
return 1
if __name__ == '__main__':
n = int(raw_input("enter number: "))
f(n)
The line (if __name__...) means that if the interpreter is running your
module the way you mean here, then it should
[EMAIL PROTECTED] wrote:
> On May 22, 11:19 am, Efrat Regev:
>> I want to iterate over all
>> such vectors under the constraint that the granularity of
>> each component is at most some delta.
>
> You can think of this like your sum is an integer>=1 and the single
def __iter__(self):
...
def next(self):
...
The problem is, what's a fast implementation? I tried something simple,
and it is slow. If anyone can think of something clever, I'd
love to hear it.
Diez B. Roggisch wrote:
> Efrat Regev schrieb:
>> [EMAIL PROTECTED] wrote:
>>> On May 1, 2:23 pm, Efrat Regev <[EMAIL PROTECTED]> wrote:
>>>
>>>> So my question is if there's a way to "grab" the output as it's being
>>>
[EMAIL PROTECTED] wrote:
> On May 1, 2:23 pm, Efrat Regev <[EMAIL PROTECTED]> wrote:
>
>> So my question is if there's a way to "grab" the output as it's being
>> generated. It doesn't matter if the solution is blocking (as opposed to
>>
Hello,
Suppose I want to run from within a Python GUI app some long-output
shell call. For example, from within Python I might want to call
g++ foo.cpp
I already know there are many ways to do this, e.g.,
commands.getstatusoutput('g++ foo.cpp') to name one.
The problem is that thi
006-July/392716.html
Any help is appreciated.
Thanks and Bye,
Efrat
--
http://mail.python.org/mailman/listinfo/python-list
After searching around, it seems that os.system(..) should be avoided
if there's an alternative. Is there one in this case?
Many Thanks!
Efrat
--
http://mail.python.org/mailman/listinfo/python-list
efrat wrote:
> Hello,
>
> I'm planning to use Python in order to teach a DSA (data structures
> and algorithms) course ...
Hello,
Many thanks, repliers, for the informative and useful answers.
Bye,
Efrat
--
http://mail.python.org/mailman/listinfo/python-list
e
visitor pattern seems impossible.
Python is such a cool language - I'm really hoping the students will
enjoy it as much as I do. Once again, many thanks for helping out with this.
Thanks,
Efrat
--
http://mail.python.org/mailman/listinfo/python-list
e
visitor pattern seems impossible.
Python is such a cool language - I'm really hoping the students will
enjoy it as much as I do. Once again, many thanks for helping out with this.
Thanks,
Efrat
--
http://mail.python.org/mailman/listinfo/python-list
ython help(), I
searched for moudles cpu, but non were found.
(Please note: I'm interested in hardware stuff, like how much memory the
machine has; not how much free memory is available.)
Many Thanks,
Efrat
--
http://mail.python.org/mailman/listinfo/python-list
Carsten Haese wrote:
> On Tue, 2006-01-10 at 09:42, Efrat Regev wrote:
>
>> Hello,
>>
>> On FC4, I've generated an .so file from C++ which I want to use from
>>python. It works when I copy it into /usr/lib/python2.4/site-packages.
>>(I.e., say I have
ossible that
this question belongs in a different forum, and if so, I'd appreciate if
you'd tell me where.
Thanks,
Efrat
--
http://mail.python.org/mailman/listinfo/python-list
Damien Wyart wrote:
> * Efrat Regev <[EMAIL PROTECTED]> in comp.lang.python:
>
>>Suppose I have some non-numerical Foo and would like to create a list
>>of 20 Foo-s. Is there a one-step method (not a loop) of doing so?
>
>
> Maybe :
>
> [ Foo ] * 20
>
docs, FAQs and help, but couldn't find
anything (the closest is range, but it seems it's only for numerics) - I
very much appreciate your time in answering. Also, please excuse me if I
used some wrong terminology.
Thanks,
Efrat
--
http://mail.python.org/mailman/listinfo/python-list
word for doing this, therefore.
Suppose I place the password inside a python script, and give this
script only +x permission for others. Is this adequate as far as security?
Thanks in advance for answering these questions.
Efrat
--
http://mail.python.org/mailman/listinfo/python-list
hanks in advance for all answers. I should point out that I'm not an
expert in python or linux (in the combination, alas, even less).
Thanks,
Efrat
--
http://mail.python.org/mailman/listinfo/python-list
"Efrat Regev" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
> ...
Many thanks for the useful replies!!
--
http://mail.python.org/mailman/listinfo/python-list
, border = None, cellspacing =
None, cellpaddding = None, *attributes)
So, what does *attribute stand for (being a C++ programmer, it looks
like a pointer, probably not the case). Is it like the C++ ellipsis? If so,
how can
I use it?
Thanks,
Efrat
--
http://mail.python.org/mailman/listinfo/python-list
"Kartic" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Efrat Regev wrote:
> > Hello,
> >
> > I was wondering whether there are any Python >
Erfat...yes...batteries included!
>
> http://docs.python.org/lib/internet.html
>
>
Hello,
I was wondering whether there are any Python modules for various
Internet protocols, e.g., is there something similar to
import ftp
client = ftpopen(...)
and so on.
Thanks,
Efrat
--
http://mail.python.org/mailman/listinfo/python-list
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all,
>
> My PC finally went belly up last week and I'm looking forward to
> playing with my new Mac. However, I play a bit of online poker, and
> there is no Mac client for my poker room.
>
> Ideally, instead of running Virtual PC, I'
module. That's great, but I was hoping there's a more portable way
to do so. Is there a more portable API call to make files read only?
Many Thanks,
Efrat
--
http://mail.python.org/mailman/listinfo/python-list
"Efrat Regev" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
>
> I'd like to ask a question concerning a python script in a makefile.
> ...
Many thanks for the very useful (and very quick) answers!
Efrat
--
http://mail.p
e python script to return a value to make, so that if it
decides that there are convention violations make will fail?
2. How can I pass information from the makefile to the python script, e.g.,
the base directory to check?
Thanks,
Efrat
--
http://mail.python.org/mailman/listinfo/python-list
26 matches
Mail list logo