On Fri, 2007-09-07 at 01:30 -0500, Sergio Correia wrote:
> Hi, I'm kinda new to Python (that means, I'm a total noob here), but
> have one doubt which is more about consistency that anything else.
>
> Why if PEP 8 says that "Almost without exception, class names use the
> CapWords convention", doe
TheFlyingDutchman wrote:
>> Else, you could as well write your own testing function:
>>
>> def str_starts_with(astring, *prefixes):
>>startswith = astring.startswith
>>for prefix in prefixes:
>> if startswith(prefix):
>>return true
>>return false
>>
>
> What is the reason
Hi, I'm kinda new to Python (that means, I'm a total noob here), but
have one doubt which is more about consistency that anything else.
Why if PEP 8 says that "Almost without exception, class names use the
CapWords convention", does the most basic class, object, is lowercase?
I found a thread abo
On Thu, 06 Sep 2007 16:48:31 -0700, Zentrader wrote:
> On Sep 6, 12:47 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>> On Wed, 05 Sep 2007 22:54:55 -0700, TheFlyingDutchman wrote:
>> > To do a "*string" wildcard filter use the endswith() function instead
>> > of startswith() and to do a
> Else, you could as well write your own testing function:
>
> def str_starts_with(astring, *prefixes):
>startswith = astring.startswith
>for prefix in prefixes:
> if startswith(prefix):
>return true
>return false
>
What is the reason for
startswith = astring.startswith
On Sep 6, 7:44 am, "bambam" <[EMAIL PROTECTED]> wrote:
> First, thank you.
>
> All of the suggestions match what we want to do much better
> than what we are doing. We have a script, written in python,
> which is doing testing. But the python script doesn't look anything
> like the test script, bec
In message <[EMAIL PROTECTED]>, bambam wrote:
> The devices are in a list, and are removed by using pop(i). This
> messes up the loop iteration, so it is actually done by setting a
> flag on each device in the exception handler, with ANOTHER
> loop after each write/read/calculate sequence.
Why no
BartlebyScrivener wrote:
> On Sep 6, 5:36 pm, André <[EMAIL PROTECTED]> wrote:
>
>> Easy to read, easy to write, good libraries and, I have found, an
>> extremely helpful community.
>>
>> Hobbyists (like me) can work on projects written in Python on and off
>> (sometimes for weeks if not months wi
On Sep 6, 12:56 pm, Paul Boddie <[EMAIL PROTECTED]> wrote:
> I think there's been a widespread "kitchen sink" mentality around the
> Python language for some time, which is where the multimethods
> proposal, amongst others, fits in here.
Maybe that's one of two fixed points in the evolution of a
On Fri, 07 Sep 2007 12:03:26 +1000, bambam wrote:
> Hi Steven.
>
> Looking at your code, why are you naming the value __all__? It looks
> like a built-in variable?
When you say:
from module import *
Python looks in the module for a list of names called "__all__", and
imports only the names in
* Eric Abrahamsen <[EMAIL PROTECTED]> [2007-09-06 11:18:29]:
> It's in Chinese, so ASCII is no go. If anyone's interested in
> answering his question (he's trying to download a linked file using
> the post method from urllib tools, not something I know about) I can
Python doc explains urlli
En Fri, 07 Sep 2007 00:02:12 -0300, Ben Warren <[EMAIL PROTECTED]>
escribi�:
> Hello,
>
> Let's say I have a function with a variable number of arguments (please
> ignore syntax errors):
>
> def myfunc(a,b,c,d,...):
>
> and I have a tuple whose contents I want to pass to the function. The
>
Basilisk96 wrote:
> I remember seeing a more elaborate puzzle that involved coding,
> cryptography knowledge, etc. to get through it. But what was the link,
> I forget now...
There's this one http://www.inwardhellix.net/
I haven't played it yet so I can't vouch for its quality. (am playing
it n
On Sep 6, 11:02 pm, Ben Warren <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Let's say I have a function with a variable number of arguments (please
> ignore syntax errors):
>
> def myfunc(a,b,c,d,...):
>
> and I have a tuple whose contents I want to pass to the function. The number
> of elements in t
En Thu, 06 Sep 2007 23:34:10 -0300, Grant Edwards <[EMAIL PROTECTED]>
escribi�:
> On 2007-09-06, Torsten Bronger <[EMAIL PROTECTED]> wrote:
>> Hallöchen!
>>
>> Tom Brown writes:
>>
>>> [...] Python has been by far the easiest to develop in. Some
>>> people might say it is not "real programming"
Hello,
Let's say I have a function with a variable number of arguments (please ignore
syntax errors):
def myfunc(a,b,c,d,...):
and I have a tuple whose contents I want to pass to the function. The number
of elements in the tuple will not always be the same.
T = A,B,C,D,...
Is there a way th
On Sep 6, 5:36 pm, André <[EMAIL PROTECTED]> wrote:
> Easy to read, easy to write, good libraries and, I have found, an
> extremely helpful community.
>
> Hobbyists (like me) can work on projects written in Python on and off
> (sometimes for weeks if not months without programming) and be able to
Torsten Bronger wrote:
Hallöchen!
Tom Brown writes:
[...] Python has been by far the easiest to develop in. Some
people might say it is not "real programming" because it is so
easy.
I can't believe this. Have you really heard such a statement?
Tschö,
Torsten.
The catch-phrase s
In message <[EMAIL PROTECTED]>, Chris Mellon
wrote:
> On 9/5/07, Steve Holden <[EMAIL PROTECTED]> wrote:
>> Doran, Harold wrote:
>
>> >
>> > Is there a way to check if the first element of y is null?
>> >
>>
>> len(y[0]) == 0
>>
>> would be the obvious way, assuming "null" means "the null string"
On Sep 5, 5:17 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> On Sep 5, 1:28 pm, Paddy <[EMAIL PROTECTED]> wrote:
>
> > On Sep 5, 5:13 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> > wrote:
>
> > > I have a text source file of about 20.000 lines.>From this file, I like
> > > to write the fir
En Thu, 06 Sep 2007 22:57:21 -0300, Basilisk96 <[EMAIL PROTECTED]>
escribi�:
> I got to 14 :)
>
> It's rather silly.
>
> I remember seeing a more elaborate puzzle that involved coding,
> cryptography knowledge, etc. to get through it. But what was the link,
> I forget now...
Me too, and I can't
On 2007-09-06, Torsten Bronger <[EMAIL PROTECTED]> wrote:
> Hallöchen!
>
> Tom Brown writes:
>
>> [...] Python has been by far the easiest to develop in. Some
>> people might say it is not "real programming" because it is so
>> easy.
>
> I can't believe this. Have you really heard such a statemen
Torsten Bronger wrote:
> Hallöchen!
>
> Tom Brown writes:
>
>> [...] Python has been by far the easiest to develop in. Some
>> people might say it is not "real programming" because it is so
>> easy.
>
> I can't believe this. Have you really heard such a statement?
>
> Tschö,
> Torsten.
>
Lo
On 2007-09-06, André <[EMAIL PROTECTED]> wrote:
> On Sep 6, 7:29 pm, windandwaves <[EMAIL PROTECTED]> wrote:
>> On Sep 7, 9:50 am, James Stroud <[EMAIL PROTECTED]> wrote:
>>
>> > Seewww.python.org. Trust us all when we say that its the best.
>>
>> I get that feeling - yes. Question is:
>>
>> 1. wh
On 2007-09-06, windandwaves <[EMAIL PROTECTED]> wrote:
> On Sep 7, 9:50 am, James Stroud <[EMAIL PROTECTED]> wrote:
>> Seewww.python.org. Trust us all when we say that its the best.
>>
>
> I get that feeling - yes. Question is:
>
> 1. what is it good for?
Writing programs.
> 2. why is it so good
Woody!
:))
--
http://mail.python.org/mailman/listinfo/python-list
Hi Steven.
Looking at your code, why are you naming the value
__all__? It looks like a built-in variable?
Unless there is an automatic way to correctly get the
function list, I will probably be better off giving the lines
sequence numbers, and generating the function list from
that.
Steve.
"Ste
On behalf of the editorial board of The Python Papers (ISSN 1834-3147),
we are pleased to announce the release of our latest edition, Volume 2
Issue 3.
This is an important milestone for all of us as the next issue will mark
our first year in "press".
Volume 2 Issue 3 can be found at
http://a
I got to 14 :)
It's rather silly.
I remember seeing a more elaborate puzzle that involved coding,
cryptography knowledge, etc. to get through it. But what was the link,
I forget now...
--
http://mail.python.org/mailman/listinfo/python-list
En Thu, 06 Sep 2007 22:19:56 -0300, TheFlyingDutchman <[EMAIL PROTECTED]>
escribi�:
> The Perl community has an expression "There is more than one way to do
> it". As in, Perl is good because you have multiple choices (whether
> it's a function/module/class/operator) of how to implement a
> part
windandwaves wrote:
> Can someone tell me why I should learn python? I am a webdeveloper,
> but I often see Python mentioned and I am curious to find out what I
> am missing out on.
>
> Thank you
>
> Nicolaas
>
The last edition of The Python Papers (volume 2 issue 2,
http://archive.pythonpape
On Sep 6, 5:53 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Thu, 06 Sep 2007 20:48:31 -0300, Zentrader <[EMAIL PROTECTED]>
> escribi?:
>
> > On Sep 6, 12:47 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>
> >> Maybe better the ``in`` operator for the '*string*' type. `str.find
En Thu, 06 Sep 2007 20:48:31 -0300, Zentrader <[EMAIL PROTECTED]>
escribi�:
> On Sep 6, 12:47 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>>
>> Maybe better the ``in`` operator for the '*string*' type. `str.find()`
>> will go away in the future.
>
> string.find serves a useful purpos
On Sep 6, 4:01 pm, windandwaves <[EMAIL PROTECTED]> wrote:
> On Sep 7, 10:44 am, Torsten Bronger <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > Hallöchen!
>
> > Tom Brown writes:
> > > [...] Python has been by far the easiest to develop in. Some
> > > people might say it is not "real programming" because
John Machin wrote:
> On Sep 5, 10:26 pm, planetmatt <[EMAIL PROTECTED]> wrote:
>> On 5 Sep, 12:34, John Machin <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>>> On Sep 5, 8:58 pm, planetmatt <[EMAIL PROTECTED]> wrote:
I am a Python beginner. I am trying to loop through a CSV file which
I can do.
Shawn Milochik wrote:
> On 9/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> I have a text source file of about 20.000 lines.
>> >From this file, I like to write the first 5 lines to a new file. Close
>> that file, grab the next 5 lines write these to a new file... grabbing
>> 5 lines and cre
En Thu, 06 Sep 2007 15:47:02 -0300, rave247 rave247 <[EMAIL PROTECTED]>
escribi�:
> If I could use os.getcwd() or save the value to some variable before
> calling os.chdir() I would do it, believe me. However I can't because it
> is the part of code where I can't do any changes.
>
> Also I d
Please don't top-post. Instead, trim the parts you're not replying to
(preserving the attribution line so we can see who wrote what), and
put your reply beneath those, so your message reads in normal
chronological order.
rave247 rave247 <[EMAIL PROTECTED]> writes:
> If I could use os.getcwd() or
On Sep 6, 12:47 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Wed, 05 Sep 2007 22:54:55 -0700, TheFlyingDutchman wrote:
> > To do a "*string" wildcard filter use the endswith() function instead
> > of startswith() and to do a *string* type wildcard filter use
> > the find() function
On Sep 6, 7:56 am, [EMAIL PROTECTED] wrote:
> December 31, 2006January 13, 2007 # doesn't earn
> January 14, 2007January 27, 2007 # does earn
> January 28, 2007February 10, 2007 # doesn't
> February 11, 2007 February 24, 2007 # does
Am I over simplifying if I say that sin
On Sep 6, 1:44 pm, Carsten Haese <[EMAIL PROTECTED]> wrote:
> On Thu, 2007-09-06 at 11:24 -0700, Ian Clark wrote:
> > Carsten Haese wrote:
> > > def d6(count):
> > > return sum(random.randint(1, 6) for die in range(count))
>
> > My stab at it:
>
> > >>> def roll(times=1, sides=6):
> >
> import zipfile
> class walkZip(zipfile):
> pass
>
> if __name__ == "__main__":
> print "Hello World"
`zipfile' is the name of the module, not a class. What you probably
want is this:
[code]
import zipfile
class WalkZip(zipfile.ZipFile):
pass
if __name__ == "__main__":
print
On Sep 6, 10:29 am, David Barr <[EMAIL PROTECTED]> wrote:
> yields no results.
Since every response so far has answered everything __Except The
Question You Asked__, your code runs fine on my Linux machine and
prints 15. The error may be before this bit of code so it isn't
getting called. Add so
Larry Bates wrote:
> import zipfile
> class walkZip(zipfile):
> pass
>
>
> if __name__ == "__main__":
> print "Hello World"
>
> Traceback (most recent call last):
> File "", line 192, in run_nodebug
> File "", line 2, in
> TypeError: Error when calling the metaclass bases
> modu
On Thursday 06 September 2007 16:15, Larry Bates wrote:
> I'm trying to learn about subclassing new style classes and the first
> project I went to do needs to subclass zipfile to add some methods.
>
>
> Why does this:
>
> import zipfile
> class walkZip(zipfile):
> pass
>
>
> if __name__ == "_
On Thursday 06 September 2007 16:01, windandwaves wrote:
> Hmmm, thank you all for your replies. I will do some research on the
> net (i did some already, but because I am really not much of a
> programmer, it is often too detailed for me). I have limited time,
> but it does sound like something
I'm trying to learn about subclassing new style classes and the first project I
went to do needs to subclass zipfile to add some methods.
Why does this:
import zipfile
class walkZip(zipfile):
pass
if __name__ == "__main__":
print "Hello World"
Traceback (most recent call last):
On Sep 5, 10:47 pm, Harry George <[EMAIL PROTECTED]> wrote:
> Jurian Botha <[EMAIL PROTECTED]> writes:
> > Sorry if this is a real dumb question, but I'm totally stumped.
>
> > I'm trying to connect to a https url in order to do some xml-rpc method
> > calls, but I'm getting the following error:
>
On Sep 7, 10:44 am, Torsten Bronger <[EMAIL PROTECTED]>
wrote:
> Hallöchen!
>
> Tom Brown writes:
> > [...] Python has been by far the easiest to develop in. Some
> > people might say it is not "real programming" because it is so
> > easy.
>
> I can't believe this. Have you really heard such a st
On Thursday 06 September 2007 15:44, Torsten Bronger wrote:
> Hallöchen!
>
> Tom Brown writes:
> > [...] Python has been by far the easiest to develop in. Some
> > people might say it is not "real programming" because it is so
> > easy.
>
> I can't believe this. Have you really heard such a state
Hallöchen!
Tom Brown writes:
> [...] Python has been by far the easiest to develop in. Some
> people might say it is not "real programming" because it is so
> easy.
I can't believe this. Have you really heard such a statement?
Tschö,
Torsten.
--
Torsten Bronger, aquisgrana, europa vetus
Hallöchen!
windandwaves writes:
> On Sep 7, 9:50 am, James Stroud <[EMAIL PROTECTED]> wrote:
>> Seewww.python.org. Trust us all when we say that its the best.
>>
>
> I get that feeling - yes. Question is:
>
> 1. what is it good for?
> 2. why is it so good?
Your questions are very general. I th
On Sep 6, 9:12 am, "exhuma.twn" <[EMAIL PROTECTED]> wrote:
> I defined a simple "update" method in the model which I call on
> certain events to fetch the new data in the DB. I tried to "emit" the
> "dataChanged()" signal of the Model without success. I don't know
> where I should get the two requi
On Sep 6, 7:29 pm, windandwaves <[EMAIL PROTECTED]> wrote:
> On Sep 7, 9:50 am, James Stroud <[EMAIL PROTECTED]> wrote:
>
> > Seewww.python.org. Trust us all when we say that its the best.
>
> I get that feeling - yes. Question is:
>
> 1. what is it good for?
Pretty much any programming task, exc
On Thursday 06 September 2007 15:29, windandwaves wrote:
> On Sep 7, 9:50 am, James Stroud <[EMAIL PROTECTED]> wrote:
> > Seewww.python.org. Trust us all when we say that its the best.
>
> I get that feeling - yes. Question is:
>
> 1. what is it good for?
> 2. why is it so good?
>
> I would love t
On Thursday 06 September 2007 14:32, windandwaves wrote:
> Can someone tell me why I should learn python? I am a webdeveloper,
> but I often see Python mentioned and I am curious to find out what I
> am missing out on.
Ease of develpment. I write everything I can in python. If I can't do it in
p
On Sep 7, 9:50 am, James Stroud <[EMAIL PROTECTED]> wrote:
> Seewww.python.org. Trust us all when we say that its the best.
>
I get that feeling - yes. Question is:
1. what is it good for?
2. why is it so good?
I would love to hear some opinions.
Cheers
Nicolaas
--
http://mail.python.org/ma
On Sep 6, 2:32 pm, windandwaves <[EMAIL PROTECTED]> wrote:
> Can someone tell me why I should learn python? I am a webdeveloper,
> but I often see Python mentioned and I am curious to find out what I
> am missing out on.
The reason I use Python is because I get more done quicker with fewer
bugs.
See www.python.org. Trust us all when we say that its the best.
windandwaves wrote:
> Can someone tell me why I should learn python? I am a webdeveloper,
> but I often see Python mentioned and I am curious to find out what I
> am missing out on.
>
> Thank you
>
> Nicolaas
>
--
James Stroud
Can someone tell me why I should learn python? I am a webdeveloper,
but I often see Python mentioned and I am curious to find out what I
am missing out on.
Thank you
Nicolaas
--
http://mail.python.org/mailman/listinfo/python-list
Gerardo Herzig wrote:
> Steve Holden wrote:
[...]
>>>
>> Have you tried using email.utils.getaddresses()?
>>
>> regards
>> Steve
>>
>>
> No, i was not. And it works just perfect! One day i will make a hard
> question!! I wonder why this getaddresess() function is not a method
> into the Header
Steve Holden wrote:
>Gerardo Herzig wrote:
>
>
>>Hi all. Im trying to develop yet another email filter. Just for fun for
>>now. Im having a little trouble parsing long 'To' and 'Cc' headers.
>>Sometimes p.e. the 'To' header comes like
>>
>>'[EMAIL PROTECTED], [EMAIL PROTECTED]'
>>others comes
On Sep 6, 8:43 am, Gary Robinson <[EMAIL PROTECTED]> wrote:
>
> I welcome feedback of any type.
>
This all seems a bit too complicated. Are you sure you want to do
this? Maybe you need to step back and rethink your problem.
Your example can be rewritten a number of different ways that are
easier
Veronika Lindstrand Kant wrote:
> Hi!
> I just wonder if there are any plans for building any support using
> NIVIDAS CUDO plattform into python?
Not into Python itself, but we are working on interfacing with NVIDIA's CUDA,
yes (presuming you actually meant "NVIDIA's CUDA" rather than "NIVIDAS CU
Gabriel Genellina wrote:
> En Wed, 05 Sep 2007 06:45:29 -0300, Grzegorz Słodkowicz <[EMAIL PROTECTED]>
> escribi�:
>
>
>> I believe vectors can only be added if they have the same point of
>> application. The result is then applied to the same point.
>>
>
> You are talking about "forces",
On Sep 6, 11:18 am, jelle <[EMAIL PROTECTED]> wrote:
> Ai, calling super(Abstract) is just getting object, sure...
>
> However, I'm still curious to know if there's a good idiom for
> repeating the argument in __init__ for the super(Concrete,
> self).__init__ ?
>
If you don't know what the argumen
On Sep 6, 1:25 pm, Gerardo Herzig <[EMAIL PROTECTED]> wrote:
> the email.* package dont seems to parse that kind of headers
> `correctly'. What i want is to get a list with all the email address in
> the `To' header.
>
> Someone know if there is a more sofisticated parser for doing this?
>
If you'
Gerardo Herzig wrote:
> Hi all. Im trying to develop yet another email filter. Just for fun for
> now. Im having a little trouble parsing long 'To' and 'Cc' headers.
> Sometimes p.e. the 'To' header comes like
>
> '[EMAIL PROTECTED], [EMAIL PROTECTED]'
> others comes like
> '"My self" <[EMAIL PR
Hi!
I just wonder if there are any plans for building any support using
NIVIDAS CUDO plattform into python?
For example when implementing Monte Carlo simulation performance always
is an issue so extended numpy/numeric or a math library using the CUSO
plattform could be a "cheap" grid approach.
Hello,
I am looking for some python library that would help me to find
similarities between two modules of Python code. I am already playing
with the levensthein distance but I am looking for some tool that
would play with the tree code with stronger tests.
Any hint ? (or even a recipe)
regards
On Sep 6, 2:39 pm, Tim Golden <[EMAIL PROTECTED]> wrote:
>
> > Anyway, your method is probably clearer to read whereas mine
>
> > doesn't require anything to be imported.
>
> I think I've been a SQL & Python programmer for so long that
> I tend to do anything -- and sometimes too much -- to avoid
En Thu, 06 Sep 2007 14:41:42 -0300, Samuel <[EMAIL PROTECTED]> escribi�:
> On Sep 6, 6:44 pm, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
>> On 6 sep, 13:13, Samuel <[EMAIL PROTECTED]> wrote:
>>
>> That's fine, and a good requirement. Place start2.py inside the
>> container directory, and your pac
On Sep 5, 1:37 pm, James Stroud <[EMAIL PROTECTED]> wrote:
> Karthik Gurusamy wrote:
> > On Sep 5, 11:17 am, James Stroud <[EMAIL PROTECTED]> wrote:
>
> >> for i in xrange(number_of_reads):
> >>for dev in devs:
> >> try:
> >>_reader = getattr(dev, 'read%d' % i)
> >>_reader(
Hi all. Im trying to develop yet another email filter. Just for fun for
now. Im having a little trouble parsing long 'To' and 'Cc' headers.
Sometimes p.e. the 'To' header comes like
'[EMAIL PROTECTED], [EMAIL PROTECTED]'
others comes like
'"My self" <[EMAIL PROTECTED]>, "My brother" <[EMAIL PROT
[EMAIL PROTECTED] wrote:
> On Sep 6, 12:41 pm, Tim Golden <[EMAIL PROTECTED]> wrote:
>>> Thanks! I'll try it both ways and see if there's any appreciable
>>> difference in speed, although since it will be packaged into an
>>> executable, that may not be an issue anyway.
>>> Mike
>> I honestly doubt
On Sep 6, 10:55 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> On Sep 6, 6:26 pm, rh0dium <[EMAIL PROTECTED]> wrote:
>
> > Hi all,
>
> > I have the following piece of code and I wanted to set the default
> > attributes based on a dictionary. What I am looking for is a way to
> > take PIPODEFAULT
Grant Edwards wrote:
> On 2007-09-06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>> I'm a new user. What library should I use so that I can launch
>> program in linux using python? Thank you in advance.
>>
>
> subprocess
>
Hmm, there are some others. Here is a list:
os.system
os.p
Yes, I think you are right, without hacking into the parent process it will not
work, and this is bad way. I hope I find the better way. Thanks for your
comments
> Původní zpráva
> Od: Steve Holden <[EMAIL PROTECTED]>
> Předmět: Re: Getting original working directory
>
Scott David Daniels wrote:
> David Barr wrote:
>> I am brand new to Python (this is my second day), and the only
>> experience I have with programming was with VBA. Anyway, I'm posting
>> this to see if anyone would be kind enough to help me with this (I
>> suspect, very easy to solve) query.
>
rave247 rave247 wrote:
> If I could use os.getcwd() or save the value to some variable before calling
> os.chdir()
> I would do it, believe me. However I can't because it is the part of
code where I
> can't do any changes.
>
> Also I do not agree that such thing is not possible because after p
Tobiah wrote:
> My adblock extension must be doing a great job.
> I don't see any ads. The puzzle is fun really,
> but I'm stuck right now at 'eeiigg'.
eight --> eeiigg
nine --> nniinn
Kinda silly, but it works
--
http://mail.python.org/mailman/listinfo/python-list
rave247 rave247 wrote:
> "..the *original* directory location *after* os.chdir() is
> performed.." os.getcwd() is not helping much as it returns the location
> that was set up in os.chdir() call
>
That requirement is just to absurd to be taken at face value. Are you
saying you *CAN'T*
On 9/6/07, rave247 rave247 <[EMAIL PROTECTED]> wrote:
>
> If I could use os.getcwd() or save the value to some variable before
> calling os.chdir() I would do it, believe me. However I can't because it
> is the part of code where I can't do any changes.
Why is it not possible. If nothing else cre
Carsten Haese wrote:
> On Thu, 2007-09-06 at 11:24 -0700, Ian Clark wrote:
>> Carsten Haese wrote:
>>> def d6(count):
>>> return sum(random.randint(1, 6) for die in range(count))
>>>
>> My stab at it:
>>
>> >>> def roll(times=1, sides=6):
>> ... return random.randint(times, times
My adblock extension must be doing a great job.
I don't see any ads. The puzzle is fun really,
but I'm stuck right now at 'eeiigg'.
Renu wrote:
> Hi,
>
> Just click on this link n use ur common sence to navigate.
>
> It has 23 pages one after the other, starting from this first
>
> Page.
> T
[EMAIL PROTECTED] wrote:
> On Sep 6, 10:26 am, rh0dium <[EMAIL PROTECTED]> wrote:
>> Hi all,
>>
>> I have the following piece of code and I wanted to set the default
>> attributes based on a dictionary. What I am looking for is a way to
>> take PIPODEFAULTS and assign each one as an attribute for t
> One of the best portable ones that I've seen used is this:
>
> os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]),'.'))
This is not working. Please look at this code:
import os
import sys
x = os.getcwd()
os.chdir("\whatever")
y = #here I don't know. This code is not working:
os.pat
On 2007-09-06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I'm a new user. What library should I use so that I can launch
> program in linux using python? Thank you in advance.
subprocess
--
Grant Edwards grante Yow! Hello, GORRY-O!!
If I could use os.getcwd() or save the value to some variable before calling
os.chdir() I would do it, believe me. However I can't because it is the part of
code where I can't do any changes.
Also I do not agree that such thing is not possible because after python script
finishes its work, it
On 6 Eylül, 19:19, Steven Bethard <[EMAIL PROTECTED]> wrote:
> Sönmez Kartal wrote:
> > I was using the XMLBuilder(xmlbuilder.py). I'm writing XML files as
> > "f.write(str(xml))". At execution of that line, it gives error with
> > description, configure your default encoding...
>
> [and later]
>
>
On Thu, 2007-09-06 at 11:24 -0700, Ian Clark wrote:
> Carsten Haese wrote:
> > def d6(count):
> > return sum(random.randint(1, 6) for die in range(count))
> >
>
> My stab at it:
>
> >>> def roll(times=1, sides=6):
> ... return random.randint(times, times*sides)
That produces
On 9/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi there,
>
> I'm a new user. What library should I use so that I can launch program
> in linux using python? Thank you in advance.
os.system or the commands library.
--
> http://mail.python.org/mailman/listinfo/python-list
>
--
http:/
Hi there,
I'm a new user. What library should I use so that I can launch program
in linux using python? Thank you in advance.
--
http://mail.python.org/mailman/listinfo/python-list
rave247 rave247 wrote:
> "..the *original* directory location *after* os.chdir() is
> performed.." os.getcwd() is not helping much as it returns the location
> that was set up in os.chdir() call
>
> Thanks
Your question is akin to having a name X that is bound to some value,
setting it
Carsten Haese wrote:
> On Thu, 2007-09-06 at 11:00 -0700, Scott David Daniels wrote:
>> def d6(count):
>> result = 0
>> for die in range(count):
>> result += random.randint(1, 6)
>> return result
>
> This, of course, can be further improved into:
>
> def d6(count):
> r
Ai, calling super(Abstract) is just getting object, sure...
However, I'm still curious to know if there's a good idiom for
repeating the argument in __init__ for the super(Concrete,
self).__init__ ?
Thanks,
-jelle
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 6, 10:19 am, rave247 rave247 <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I' am unable to solve this problem. I've got python program, it is installed
> in standard location. I run this program from some location X (note that I
> just type relative "myscript", leaving operating system to look up s
On Thu, 2007-09-06 at 11:00 -0700, Scott David Daniels wrote:
> def d6(count):
> result = 0
> for die in range(count):
> result += random.randint(1, 6)
> return result
This, of course, can be further improved into:
def d6(count):
return sum(random.randint(1, 6) for die
On Sep 6, 12:41 pm, Tim Golden <[EMAIL PROTECTED]> wrote:
> > Thanks! I'll try it both ways and see if there's any appreciable
> > difference in speed, although since it will be packaged into an
> > executable, that may not be an issue anyway.
>
> > Mike
>
> I honestly doubt there's any advantage t
"..the *original* directory location *after* os.chdir() is performed.."
os.getcwd() is not helping much as it returns the location that was set up in
os.chdir() call
Thanks
> Původní zpráva
> Od: Gabriel Genellina <[EMAIL PROTECTED]>
> Předmět: Re: Getting ori
1 - 100 of 178 matches
Mail list logo