On Sun, 3 Aug 2008, CNiall wrote:
> >>> 0.2
> 0.20001
> >>> 0.33
> 0.33002
>
> As you can see, the last two decimals are very slightly inaccurate.
> However, it appears that when n in 1/n is a power of two, the decimal
> does not get 'thrown off'. How might I make Pyth
For a while now I've had trouble with end_fill(). Sometimes I can use
it to fill a figure such as a square, triangle or rectangle, but
sometimes not.
Here's a barebones script using end_fill(). As you can see, it draws a
square twice, but fails to fill it. Pleas show me how to use it
correctly in
"Alan Gauld" <[EMAIL PROTECTED]> wrote
index = float(the_line[-1])
dif_index = index - start_index
iindex[field] = dif_index
Here index is assigned to a floating point number.
Then it is indexed. Floats don't have indexes...
Just noticed the indexed vari
"Bryan Fodness" <[EMAIL PROTECTED]> wrote
i am filling a dictionary with a dictionary and my values for
isegment[field] are identical. i can't see where i am overwriting
the
previous field values.
Show us the full error text do not just summarize.
i would like to have something like, {1:
I have tried but I recived error. Look attached files: FormManagementCode (my
code) and FormManagement_Note (headers information). There must be some
additional trick to fully master form management ..
Fake account is now active.
URL: https://investor.firstrade.com/firstrade/login.do
On screen:
oops i forgot to count lines,
MainDictionary = {}
N = 0
M = 0
for line in open('data_file', 'r'):
if line:
if M < 3:
N += 1
M += 1
a, b = line.split(" = ") # "=" is in between spaces whish gives
you only two variables.
if a == 'Field':
maybe this can help
MainDictionary = {}
N = 0
for line in open('data_file', 'r'):
if line:
N += 1
a, b = line.split(" = ") # "=" is in between spaces whish gives you
only two variables.
if a == 'Field':
MainDictionary[N] == {}
elif a == 'Index':
i am filling a dictionary with a dictionary and my values for
isegment[field] are identical. i can't see where i am overwriting the
previous field values.
my data looks like
Field = aa1
Index = 0.0
Value = 0.0
...
...
Field = aa2
Index = 0.01
Value = 0.5
...
i would like to have something lik
On Tue, Aug 5, 2008 at 7:01 AM, Jim Morcombe <[EMAIL PROTECTED]> wrote:
> Could someone please give me some help using the "re" module.
> If I have:
> text = "Bill Smith is nice"
> how do I get rid of "Smith" and just have
> "Bill is nice"
>
> I tried
> s2 = re.sub('Smith', '', text)
> but it comp
here is what my interpreter gives :
>>>
>>>
>>> text = "Bill Smith is nice"
>>> print text
Bill Smith is nice
>>> re.sub('Smith', '', text)
'Bill is nice'
>>> text = "Jim likes a girl (Susan)"
>>> print text
Jim likes a girl (Susan)
>>>
KeyboardInterrupt
>>> re.sub('(Susan)', '', text)
'Jim likes
On Tue, Aug 5, 2008 at 7:01 AM, Jim Morcombe <[EMAIL PROTECTED]> wrote:
> Could someone please give me some help using the "re" module.
>
> This works:
>
> import re
>
> text = "Jim is a good guy"
>
> s2 = re.sub('Jim', 'Fred', text)
> print s2
>
> and I get "Fred i
Could someone please give me some help using the "re" module.
This works:
import re
text = "Jim is a good guy"
s2 = re.sub('Jim', 'Fred', text)
print s2
and I get "Fred is a good guy"
-
If I have:
text = "Bill Smith is nice"
how
[EMAIL PROTECTED] ~]# python
Python 2.5.1 (r251:54863, Nov 23 2007, 16:16:53)
[GCC 4.1.1 20070105 (Red Hat 4.1.1-51)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import re
>>>
>>> a = 'this is a simple 3xampl3 of 2 or 3 numb3rs' # some text
>>> b = re.su
Dinesh B Vadhia wrote:
I want to remove whole numbers from text but retain numbers attached to
words. All whole numbers to be removed have a leading and trailing space.
For example, in "the cow jumped-20 feet high30er than the lazy 20 timing
fox who couldn't keep up the 865 meter race." remov
[..]
> share
> their thoughts on these
> matters,
I've been using TurboGears for a long time now. The documentation is a
little patchy (reads more like a bunch of recipes) but the components
which form the framework are all separate projects - each individually
capable of standing on it's own le
Alan Gauld ha scritto:
---
voglio chiderti solo 1 cosa ... ma secondo te qualle e il miglior
programma X programmare???
grazie ...
da Cristian
-
Literally:
---
"I want to ask you only one thing... what's in your opinion the best
program to p
16 matches
Mail list logo