e incorrect result -- then we
have a real bug. However, the chance of that is really really tiny.
Gary Herron
--
Gary Herron, PhD.
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
http://mail.python.org/mailman/listinfo/python-list
essentially ignored.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
1405
W Gary Sokolich
801 Kings Road
Newport Beach, CA 92663-5715
(949) 650-5379
http://web.archive.org/web/20080821231423/http://www.tbpe.state.tx.us/da/da022808.htm
TEXAS BOARD OF PROFESSIONAL ENGINEERS
February 28, 2008 Board Meeting Disciplinary Actions
W. Gary Sokolich , Newport Beach
On 10/13/2011 07:19 PM, Roy Smith wrote:
I've got to write some tests in python which simulate getting a page of
HTML from an http server, finding a link, clicking on it, and then
examining the HTML on the next page to make sure it has certain features.
I can use urllib to do the basic fetching,
;
Strings aren't mutable in Python; you can't assign to slices of them.
So you'll get a TypeError on the previous line.
Cheers,
Chris
Also, the statement
for i in nome:
does not loop through indices, but rather it loops through the actual
characters of the string.
Gary H
help, please put more time into the
quality of your question.As it is stated, we really don't know what
you want help with.
Gary Herron
PS: Sorry for previous mail !!
Thank you :)
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-441
1.53075794228e-15
is the (scientific notation) representation of .00153075794228. Is
that not close enough to zero for your purposes? (Or is it that you don't
understand the 'e-15' portion of the output?)
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institut
Steve,
> I am looking for the python2.7 function(s) to parse a string from a colon
> character ":"
>
> Sounds simple enough.
>
> For example, a string like "123456:789". I just need the "123456"
> substring.(left of the :)
How about:
newstr = str[:str.find(':')]
--
GC
smime.p7s
Descriptio
On 02/18/2013 11:42 AM, leonardo selmi wrote:
pls i need help:
i have copied the following from a book and tried to make it work:
import math
def area(radius):
return math.pi * radius**2
def circumference(radius):
return 2 * math.pi * radius
i saved the above program from python shell into a
On 02/18/2013 12:14 PM, leonardo wrote:
thanks guys and sorry for my incomplete datas, here is the error message:
Traceback (most recent call last):
File "", line 1, in
import circle
File "circle.py", line 1
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43)
^
Sy
973095679, 3.113889114931214,
3.05408169326, 2.360224809741029, 2.026697918525358,
1.322913986495805, 4.341848866805052, 0.970311202088483,
2.002058149505537, 0.07453277198439523, 1.9633241018322773,
4.22967258746455]
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
collection immediately after the loop finishes.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
line connecting (0,4) and (7,3) and so on.
Are you asking a MATH question, or a Python question.
This is, do you need the (linear) equation which performs the
evaluation, or help in producing a program to do the calculation?
Gary Herron
--
Dr. Gary Herron
Department of Computer Science
loops?
for p in sorted(segments.iterkeys()):
for k in sorted(class_count.iterkeys()):
for j in sorted(pixel_count.iterkeys()):
# This will be run with all possible combinations of p,k,
and t.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
et the information of a machine like "computer name",
>"mac address", "ip address" and "OS on that system".
>
>
The platform module can give lots of such info:
http://docs.python.org/lib/module-platform.html
Good Luck,
Gary Herron
>Thanks
... whatever ...
Several types would qualify as "numbers": IntType, FloatType, LongType,
and ComplexType,
and several as "strings": StringType and UnicodeType
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
gt;-
>
>I have around one year to await.
>
>
You don't appear to understand Open Source very well.
Python is the way it is because we, the community, *like* it that way.
It evolves in directions that we (all) decide it is to evolve. Guido is
our leader in this because we trust him and *choose* to follow his lead.
If you want something changed you don't wait and you don't whine, you
join the community with a reasoned argument for why your idea would make
it a better language in *our* eyes.
So how about it... What's your complaint, what's your solution, and why
should we listen?
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
them somewhat more
visible.)
Try this experiment: Print out a page of C++ code,
tape it to the wall,
and start walking backwards. You will still be
able to discern the
structure of the code *long* after you can no
longer identify the
curly-braces. (Provided you properly indented you
C++ code --
me, it makes
>sense, just like Python makes sense. Any time-line on implementing this?
>
>
Look at the date. That was an April Fools joke.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
ple as that is, I'd still recommend the cPickle module.
As always, this security warning applys: Evaluating arbitrary text
allows anyone, who can change that text, to take over complete control
of your program. So be carefully.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
erever Parameters is imported:
Parameters.xyzzy = 'whatever'
Parameters.startDirectory = os.getcwd() # Get working directory at startup
(Even if the import of Parameters in some file occurs before the
initialization code has a chance to run.)
Gary Herron
>in all of the files (namespaces) where it i
nd good luck with your studies.
Gary Herron
>thanks...
>Aysun
>
>
>
>
--
http://mail.python.org/mailman/listinfo/python-list
losing leading zeros
as well:
x = x.strip('0')
Gary Duzan
Motorola CHS
--
http://mail.python.org/mailman/listinfo/python-list
, not the 'a' variable itself. The rule is limited to the
rebinding of variables, not the modification of the objects to which
they refer.
Gary Duzan
Motorola CHS
--
http://mail.python.org/mailman/listinfo/python-list
Florian Daniel Otel wrote:
> Gary,
>
> First of all, many thanks for the reply. Do I understand it correctly
> that actually the rule has to be refined as pertaining to the (so
> called) "immutable" types (like e.g. integers, tuples/strings)
> whereas lists and dict
reading TIFFs and runs on multiple platforms, including Windows.
http://www.pythonware.com/products/pil/
Gary Duzan
Motorola CHS
--
http://mail.python.org/mailman/listinfo/python-list
thing for any function you wish
to apply across the list.So then its only a matter of giving it a
function that "and"s two arguments:
Either:
reduce(lambda a,b: a and b, logFlags)
or
def and2(a,b):
return a and b
reduce(and2, logFlags)
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
aw_records.pos_records"
> r_table = eval(tmp)
>
> works great thanks for the help!
>
Yes, it works, but this is not a good place to use eval. Now that we see
how you want to use it, we can find a *much* better way to do it.
If you want to lookup an attribute of an object, but the attribute name
is a string in a variable, then use getattr to do the lookup.
If in interpret your code correctly:
attrname = state + "_raw_records"
obj = getattr(h5file.root, attrname)
r_table = obj.pos_records
These, of course, could be combined into a single (but not necessarily
clearer) line.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
tly unmaintainable, and not noticeably more
efficient than code that is readable and maintainable.
Moreover, all the work of creating the outer list seems to be wasted
since that list is just thrown out.
This is worse than "overly clever". Loops are for looping, list
comprehensi
lso be in the dictionary -- I have no idea how you plan to specify
*which* local variable you want the name of.
Anyway, the dictionary is:
self.__dict__
and the list of variable names is the dictionary's keys:
self.__dict__.keys()
and one of the elements in that list will be the string:
named imp. It
allows you to import a file whose name is specified in a string -- that
should work for you.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
18)]
>>> print bar.data
[(-74.0014993, 1), (123.450999, 18)]
>>> bar.a_count()
[(-74.0014993, 1), (123.450999, 18)]
>>>
You effort to reduce your real code to a simple demonstration of the
problem is appreciated, but I don't think it worked in this case.
Want to try again?
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
= A() # create an instance
>>> a.__dict__ # It has no attributes
{}
>>> a.__dict__ = {'c':1, 'b':2} # Give it some
>>> a.b # Verify
2
>>> a.c
1
>>> a.__class__ # Examine its class
>>> class B:
... pass
...
>
tem executes any command given as a string (which you can build
however you want). Or you might use the newer "subprocess" module.
Gary Herron
> TIA.
>
>
--
http://mail.python.org/mailman/listinfo/python-list
Andre Poenitz wrote:
> Hi all.
>
> Is there a way to load a module given a full path to the module
> without extending sys.path first?
>
> Andre'
>
>
The standard module named "imp" can help you with this.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
ar4': '', 'var1': 'blah', 'var3': 'blahblahblah', 'var2':
'blahblah', '__builtins__': ,
'__file__': '/home/gherron/.startup.py', '__name__': '__main__',
'__doc__': None}
>>> for v,k in locals().items():
... if v.startswith('var'):
... print k
...
blah
blahblahblah
blahblah
>>>
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
sent a string and reinterpret those bits as an integer, then ...
perhaps you'd like to check out the struct module.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
or
that print. For example, here are several ways to convert an int to a
printable string with and without leading zeros:
>>> i = 123
>>> '%d' % i
'123'
>>> '%5d' % i
' 123'
>>> '%05d' % i
'00123'
Hope that helps,
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
ion of
finite digit arithmetic. Python makes the opposite assumption that we
are are adults here and can handle the full knowledge, slight
imprecision and all.
Dr. Gary Herron
> Python refuses to guess what you want, and gives you the information
> available.
>
>
--
http://mail.python.org/mailman/listinfo/python-list
dictionary in place rather
than returning a new dictionary.
>>> a={'a':1}
>>> b={'b':2}
>>> a.update(b)
>>> a
{'a': 1, 'b': 2}
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
ou tried coding a solution and failed, or are you just expecting
> people to code for free?
>
>
>
>
Right. This thread begins to look like someone with a homework
assignment asking for code rather than attempting to try programming it
up himself. I was happy to answer th
. global g
... g = 123
...
>>> x()
>>> g
123
>>>
Gary Herron
> ive tried simply adding the variables in:
>
> def function(atom, Xaa, Xab):
> Xaa = onefunction(atom)
> Xab = anotherfunction(atom)
>
> if i can give something
一首诗 wrote:
> Is there any simple way to solve this problem?
>
>
Yes, strings have a replace method:
>>> s = "abc def"
>>> s.replace(' ',' ')
'abc def'
Also various modules that are meant to deal with web and xml and s
Frederic Rentsch wrote:
> A few Cheese Shop upload problems have been solved with the help of this
> creative group. Thank you all!
>
> Version 2.2 beta should be phased out. It has a functional defect,
> missing matches with a very low statistical probability. Version 2.3 has
> this fixed.
>
>
and
# Also works because files are reopened for each use:
print [(i1.strip(),i2.strip(),i3.strip())
for i1 in open('word1.txt')
for i2 in open('word2.txt')
for i3 in open('word3.txt')]
Hope that's clear!
Gary Herron
&
[EMAIL PROTECTED] wrote:
>Gary Herron wrote:
>
>
>>List comprehension is a great shortcut, but when the shortcut starts
>>causing trouble, better to go with the old ways. You need to reopen each
>>file each time you want to iterate through it. You should be able to
]
> [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7,
> 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8]
>
> Thanks,
> Levi
Sure. Try:
[i+1 for i in range(8) for j in range(i+1)]
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
culate an answer today (or even this week).
I doubt that you really *want* all 3.4 million digits. So what is it you
really want? A scientific or engineering result as a floating point
number accurate to some reasonable number of digits? That integer value
modulo some other integer (as used in v
ws* its length at all times. len() is a
constant time lookup of an internal attribute.
Gary Herron
> The best I could come up with is sum(itertools.imap(lambda x: 1, g)) --
> but that does look a bit ugly ...
>
>
--
http://mail.python.org/mailman/listinfo/python-list
ithmetic between infinities and real
values. The production of, and arithmetic on, infinities is a choice
that any application may want allow or not.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
ue
>>> 100 is 100
True
This is highly implementation dependent. The current (C) implementation
of Python has a cache for small integers, so the attempt to compare
values with "is" works for some small integers, and fails for some large
integers, but curiously, not all insta
the Python-UNO bridge). This might (eventually) get you
what you want.
Here's a URL for it:
http://udk.openoffice.org/python/python-bridge.html
Good luck,
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
But what's the point? This does the same as a for loop but slower.
If you don't want any kind of a loop (again, What's the point?) you
could write something recursive:
def proc(i, ...):
# ... do something with i
if i < whatever:
proc(i+1, ...)
But this wo
Sheldon wrote:
> Hi Gary,
>
> I am really trying to cut the time down as I have 600+ arrays with
> dimensions (1215,1215) to compare and I do a lot more things with the
> arrays. If I understand you correctly, there is no way around a for
> loop?
>
Well no. I gave you tw
nd leaving
the students with both theoretical and practical foundations on
which to build.
Gary Duzan
Motorola CHS
p.s. Then sock them with ML or Haskell to weed out the weak ones. ;-)
Then if they survive Occam, throw Java at them, so they'll
any uses of the name from enclosing scopes.)
If that last makes sense, good. If not, then just follow this rule:
Choose your variable names to be different than any builtin names -- or
at least different than any of the builtin names you intend to use.
Gary Herron
> high=[]
> lo
waiting to be read, and select always inform you of that fact by
returning stdin in the rr list.
If you want select to start blocking again, you must read all bytes from
stdin whenever select says there are bytes to be read.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
advance for any input anyone can give.
Gary
--
Gary Robinson
VP/Innovation
Emergent Music, LLC
[EMAIL PROTECTED]
207-942-3463
Company: http://www.goombah.com
Blog:http://www.garyrobinson.net
--
http://mail.python.org/mailman/listinfo/python-list
;missing fields"?
What's a "shape file"?
On what object to you wish to check "attribute values"?
I'm not sure I can help even if I have those answers, but I'm sure I
can't help if I don't.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
Lisp and another in Python. I know *nothing*
about either one.
http://packages.debian.org/unstable/devel/cl-rsm-genetic-alg.html
http://home.gna.org/oomadness/en/genetic/
Enjoy,
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
I want to define a class-level attribute that will be shared by all
subclasses. That is, I want this class, every subclass of this class, every
instance of this class and every instance of every subclass to be able to
read and write to the _same_ slot/variable. But I can't figure out how to
d
"Peter Otten" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Gary Stephenson wrote:
>
>> I want to define a class-level attribute that will be shared by all
>> subclasses. That is, I want this class, every subclass of this class,
>> every i
imitive
functionality back with the dinosaurs (C and its relatives) when we
moved into the world of tje modern sophisticated programming language
Python. Tell us why you are contemplating such a thing, and someone
here will help you implement it the "Pythonic" way.
Gary Herro
>
> Thanks,
> Ken
>
I don't believe that information is out-of-date. I use the python-bridge
with the OpenOffice version 2.0.3 quite successfully. In my case I open
a spread sheet and search around for and extract various values. It
works just fine for me.
Gary Herron
--
http:
ever create a
copy of the object. If you *do* want to create an object, you may
consider using the copy module:
http://docs.python.org/lib/module-copy.html
(But I must point out, that in 12 years of programming Python, I've
hardly ever used that module.)
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
someone into changing it, but if we've gone
this long without caring to fix it, then I'd not hold out much hope for
that. Python and the whole open source movement is a volunteer effort by
people who care enough to contribute. Your contributions would be
welcome, but your compla
n.
There's a system exception EINTR which is 5 -- but that's 5, not -5.
Any help on this would be most appreciated.
--
Gary Robinson
CTO
Emergent Music, LLC
[EMAIL PROTECTED]
207-942-3463
Company: http://www.goombah.com
Blog:http://www.garyrobinson.net
--
http://mail.python.org/mailman/listinfo/python-list
that function with
your parameters. This is done directly in Python and ctypes without the
need for building any extension module.
Gary Herron
> Thank you.
>
>
--
http://mail.python.org/mailman/listinfo/python-list
refer to it.
Here's some working code which manipulates a reference to a function
then calls it:
>>> def fn():
... print "Hello world!"
...
>>> x = fn
>>> y = [fn,fn]
>>> z = {1:fn, 2:fn}
>>>
>>> x()
Hello world!
>>> y[0]()
Hello world!
>>> y[1]()
Hello world!
>>> z[1]()
Hello world!
>>> z[2]()
Hello world!
>>>
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
Russell wrote:
>I want my code to be Python 3000 compliant, and hear
>that lambda is being eliminated. The problem is that I
>want to partially bind an existing function with a value
>"foo" that isn't known until run-time:
>
> someobject.newfunc = lambda x: f(foo, x)
>
>The reason a nested funct
ions they need.
>
That's not true. Have you actually tried this? It works perfectly, and
is, in fact, the expected and standard operation procedure.The
functions from myFunctions execute in the environment of the module they
were define in, no matter how you import/reference them
:
>python -c "import compileall; compileall.compile_dir('.',0)"
>Listing . ...
>Compiling ./Ciscoports.py ...
> File "./Ciscoports.py", line 753
>print string.ljust(PortlinkbeatInv[row[j][0]],14),
>^
>SyntaxError: invalid syntax
>
LittlePython wrote:
>Is this a good place to post python questions from newbie's, or would you
>suggest another board?
>Thx
>
>
This is the correct place. This group has the reputation of being
newbie-friendly.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
se 1, no matter how
many times an import causes phase two to be performed.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
ck
try:
assert False
except:
traceback.print_exc()
and you'll get a traceback (a very short one in this case):
Traceback (most recent call last):
File "", line 2, in ?
AssertionError
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
A
traceback.print_exc() within the "except" clause will print it at that
point, then execution can continue normally.
Gary Herron
>
>
>- Bill
>
>
--
http://mail.python.org/mailman/listinfo/python-list
ripts and tips at vim.sf.net for
"python".
HTH,
Gary
--
http://mail.python.org/mailman/listinfo/python-list
that I did this on a Unix system.
- compiler/python.vim --
" Vim compiler file
" Compiler: Python
" Maintainer: Gary Johnson <[EMAIL PROTECTED]>
" Last Change: 2002-06-26 00:27:56
if exists("current_compiler")
finish
endif
ation will be at the Zope Corporation offices.
Further details below, and at
http://www.zope.org/Members/poster/fxbgzpug_announce.
Gary
-
Fredericksburg, VA ZPUG: second Wednesday of every month, 7:30-9:00
First meeting: June 8, 7:30.
Speaker: Tres Seaver, architect of the Zope Content
tell, if the Python bytecodes that cause dictionary
modifications are atomic, then there should be no problem. But I don't
know that they are because I haven't looked at the bytecodes.
Any feedback on this would be appreciated. For various reasons, we're
still using Python 2.3
;t
>work, so it must be some other syntax.
>
>
Not with tuples, lists or dictionaries. However a more recent addition
to the language is Sets, and they support set differences:
>>> from sets import Set
>>> Set([1,2,3,4,5,6]) - Set([2,3,6])
Set([1, 4, 5])
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
tential to solve our problem.
Or maybe there's another way to temporarily let one thread have
priority over all the others?
Gary
--
Gary Robinson
CTO
Emergent Music, LLC
[EMAIL PROTECTED]
207-942-3463
Company: http://www.goombah.com
Blog:http://www.garyrobinson.net
--
http://mail.py
hat
doesn't invalidate the claim that the value *is* a dimensioned
quantity. In lieu of a name, we'd have to label such a quantity as
"sqrt of degrees" or "sqrt of radians". After all, we do the same
thing for measures of area. We have some units of area like &
Wildemar Wildenburger wrote:
> Gary Herron wrote:
>
>> Of course not! Angles have units, commonly either degrees or radians.
>>
>> However, sines and cosines, being ratios of two lengths, are unit-less.
>>
>>
>>> To understand it: sin()
directories.
After giving you a chance to modify that list, ow.walk then goes through
the list (whatever contents it has at that point) and visits any
subdirectory.
I'd guess your trouble with understanding this has to do with wondering
how the modified list gets from your code back to os.wa
you can iterate through that list of lines. Like this:
import urllib2
url = urllib2.urlopen('http://www.google.com')
for line in url.readlines():
print line
url.close()
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
with sizes that are
putting a serious strain on your memory footprint, then one of the other
suggestions might be indicated.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
laces
> **weights_array(randomizing_counter) = small_randomized_int
>
If weights_array is a list or dictionary then use
weights_array[randomizing_counter] = ...
to choose which element of the list gets the assignment.
If weights_array is a function, then
weights_array(rand
jolly wrote:
> Hey guys,
>
> I'm rather new to python and i'm have trouble(as usual)
>
> I want to know if it is possible to change where 'import' looks
> this will save me clogging up my python directory
>
> Thanks
>
Easily done. The value of sys.path is a list of directories that import
.
However, there are software packages that represent numbers (integer and
floating point) with larger collections of bit.
Try looking at GMP at for one such package: http://gmplib.org/
Good luck,
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
Instantly Turn your Computer into a Super TV
• Watch all your favorite shows on your Computer & TV!
• Channels you can’t get any other place in the U.S.A!
• Watch from anywhere in the world!
• Save 1000's of $$$ over many years on cable and satellite bills
• INSTANT DOWNLOAD
• And much, much more!
s than 0 (and probably less than
any integer). Given that, your two observations above are consistent.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
if type( x ) == NoneType:
>> # true
>> < code >
>> else:
>> # false; do something else.
>> < more code >
>>
>> Steven Howe
>>
>
> Is that any better than this?
>
> if x is None:
> # do something
> else
In article <[EMAIL PROTECTED]>,
John Nagle <[EMAIL PROTECTED]> wrote:
>
>(P.S. PEP 3117 is a joke, right?)
I expect so, especially given its creation date.
Gary Duzan
Motorola CHS
--
http
ere?
>
>
Obviously? Conditions? What conditions?
We do things like this constantly, and in fact, it *does* work.
Please tell us how it fails, or what is unsatisfactory about it.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
local* to that function. And like all local variables, they
can be set and used within the function, but are independent of objects outside
the function.
If you want to assign to a global object from within a function, then you must
explicitly say so:
def setExitCode():
global _exitco
hich order the data has to be written.
>>>
>> [snip]
>> Or have a `Queue.Queue` for each source thread and make the writer
>> thread read from each in turn.
>>
>
>
> I'll try Queue.Queue, thank you. I didn't expect that multithread
> write a file is so troublesome
>
As a general rule, *ALL* multithread operations are at least that
troublesome, and most are far more so.
Pessimistically-yours,
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
;
Yes. The builtin function zip does just that: merging separate lists
into a list of tuples.
See: http://docs.python.org/lib/built-in-funcs.html#l2h-81
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
g is
immutable, nothing you do inside the function can change the string
outside the function.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
gt;> x = re.search("[0-9.]+", "(3.12345)")
>>> print x.group(0)
3.12345
There's a lot more to the re module, of course. I'd suggest reading the
manual, but this should get you started.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
301 - 400 of 1014 matches
Mail list logo