rmac a écrit :
Ah! Arghh!!! You are so correct on the usage of the ':'
Python syntax is a little different from what I am used to.
I don't know what you're used to, but chances are that more than the
syntax differs !-)
--
http://mail.python.org/mailman/listinfo/python-list
rmac a écrit :
the following code attempts to extract a symbol name from a string:
extensionStart = int(filename.rfind('.'))
rfind returns an int, so passing it to the int type constructor is useless.
filenameStart = int(filename.rfind('/'))
idem
#print 'Extension Start - ' +
Ah! Arghh!!! You are so correct on the usage of the ':'
Python syntax is a little different from what I am used to.
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
> currentSymbol=filename[int(filenameStart),int(extensionStart)]
Should be
currentSymbol=filename[int(filenameStart):int(extensionStart)]
(change , to :)
You don't need to convert to int all the time, rfind will return an
integer.
Also you can use os.path for this
from os.path import
rmac wrote:
the following code attempts to extract a symbol name from a string:
extensionStart = int(filename.rfind('.'))
filenameStart = int(filename.rfind('/'))
#print 'Extension Start - ' + str(extensionStart)
#print 'FileName Start - ' + str(filenameStart)
currentSymbol=f
Bruno Desthuilliers a écrit :
(snip)
> class Foo(object):
> bar = {'baz':'bing'}
> def __init__(self):
> self.bar = self.bar
Hem... Should re-read before posting :(
It's of course:
def __init__(self):
self.bar = self.bar.copy()
--
http://mail.python.org/mailman/listinfo/pyt
On Dec 1, 11:31 pm, "Matt Barnicle" <[EMAIL PROTECTED]> wrote:
> >> On Dec 1, 4:47 pm, Matt Barnicle <[EMAIL PROTECTED]> wrote:
> > aye yaye aye... thanks for the pointers in the right direction.. i
> > fiddled around with the code for a while and now i've reduced it to the
> > *real* issue... i
Matt Barnicle a écrit :
>>>On Dec 1, 4:47 pm, Matt Barnicle <[EMAIL PROTECTED]> wrote:
>>
>>aye yaye aye... thanks for the pointers in the right direction.. i
>>fiddled around with the code for a while and now i've reduced it to the
>>*real* issue... i have a class dict variable that apparently
"Matt Barnicle" <[EMAIL PROTECTED]> writes:
>> i have a class dict variable that apparently holds its value across
>> instantiations of new objects..
[...]
> ok, i see... python has a concept i'm not accustomed to
I don't doubt that Python managed to confuse you here, but in this
case there is n
>> On Dec 1, 4:47 pm, Matt Barnicle <[EMAIL PROTECTED]> wrote:
> aye yaye aye... thanks for the pointers in the right direction.. i
> fiddled around with the code for a while and now i've reduced it to the
> *real* issue... i have a class dict variable that apparently holds its
> value across in
>> On Dec 1, 4:47 pm, Matt Barnicle <[EMAIL PROTECTED]> wrote:
> aye yaye aye... thanks for the pointers in the right direction.. i
> fiddled around with the code for a while and now i've reduced it to the
> *real* issue... i have a class dict variable that apparently holds its
> value across in
Matt Barnicle <[EMAIL PROTECTED]> wrote:
>hi everyone.. i've been chugging along learning python for a few months
>now and getting answers to all needed questions on my own, but this one
>i can't figure out nor can i find information on the internet about it,
>possibly because i don't understa
> On Dec 1, 4:47 pm, Matt Barnicle <[EMAIL PROTECTED]> wrote:
>> hi everyone.. i've been chugging along learning python for a few months
>> now and getting answers to all needed questions on my own, but this one
>> i can't figure out nor can i find information on the internet about it,
>> possibly
> On Dec 1, 4:47 pm, Matt Barnicle <[EMAIL PROTECTED]> wrote:
>> hi everyone.. i've been chugging along learning python for a few months
>> now and getting answers to all needed questions on my own, but this one
>> i can't figure out nor can i find information on the internet about it,
>> possibly
On Dec 1, 4:47 pm, Matt Barnicle <[EMAIL PROTECTED]> wrote:
> hi everyone.. i've been chugging along learning python for a few months
> now and getting answers to all needed questions on my own, but this one
> i can't figure out nor can i find information on the internet about it,
> possibly becau
[EMAIL PROTECTED] wrote:
> Is it possible to combine or bundle separate .exe files into the
> compiled python .exe when using py2exe? If possible, how would that be
> described within setup.py . and how/where would I specify such .exe
> should be ran first in the pre-compiled scripts? My goal i
On Sunday 26 February 2006 22:44, [EMAIL PROTECTED] wrote:
> I am new to python, can you please tell me how can I convert my python
> script into an executable on linux?
> i.e. instead of typing 'python myscript.py abc', I just need to do
> 'myscript.py abc'?
Use the shebang syntax. Use this as a
[EMAIL PROTECTED] schrieb:
> I am new to python, can you please tell me how can I convert my python
> script into an executable on linux?
> i.e. instead of typing 'python myscript.py abc', I just need to do
> 'myscript.py abc'?
> and how can I get the input argument from my script , in my example,
18 matches
Mail list logo