On Mon, Jan 21, 2013 at 7:56 AM, Lie Ryan wrote:
> On 22/01/13 04:02, kwakukwat...@gmail.com wrote:
>
>> f = open(r'c:\text\somefile.txt')
>> for i in range(3):
>> print str(i) + ': ' + f.readline(),
>> please with the print str(i) + ‘: ‘ + f.readline(), why not print str(i)
>> + f.readli
n(self.data) -> self.data = [1, 2, 4]
__getitem__(index) -> index = slice(-1, 9223372036854775807, None)
[4]
printing blist[-2]
__getitem__(index) -> index = -2
2
Best,
Josh Benner
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Aug 18, 2011 at 4:03 PM, Matt Funk wrote:
> Hi guys,
>
> thanks for the suggestions. I had tried the white space before as well (to
> no
> avail). So here is the expression i am using (based on suggestions), but
> still
> no success:
>
> instance_linetype_pattern_str =\
>r'(([-+]?
On Fri, Jul 29, 2011 at 1:07 PM, Wolfgang Rohdewald
wrote:
> On Freitag 29 Juli 2011, Josh Benner wrote:
> > if args.build not None:
>
> which python version understands this?
>
> --
> Wolfgang
>
Apparently the version running in my head understands it ;-)
Sorr
I'm writing a function to create a string that gets longer iff an argument
is defined. In there a more elegant way than nesting all those ifs?
def format_rsync_src_string(args, server="RSYNC"):
""" Format an rsync source directory string. """
if args.server is None:
raise CopyNigh
import os
lst = []
for x in xrange(1, 5001):
lst.append(r"Data\ma{0}.wav Data\ma{0}.mfc".format(x))
lst.insert(x-1, r"Data\ja{0}.wav Data\ja{0}.mfc".format(x))
with open("filename.txt", "w") as fd:
sep = os.linesep
fd.write(sep.join(lst))
On Thu, Jun 30, 2011 at 5:19 PM, Sibonis
On Fri, Feb 11, 2011 at 1:51 PM, Dan Stromberg wrote:
> On Fri, Feb 11, 2011 at 1:43 PM, André Roberge
> wrote:
> > On Friday, February 11, 2011 5:24:15 PM UTC-4, LL.Snark wrote:
> >> Hi,
> >>
> >> I'm looking for a pythonic way to translate this short Ruby code :
> >> t=[6,7,8,6,7,9,8,4,3,6,7]
his article ...
http://neopythonic.blogspot.com/2009/11/python-in-scientific-world.html ...
the answer is python.
Josh Benner
--
http://mail.python.org/mailman/listinfo/python-list