On Wed, Mar 18, 2015 at 7:10 PM, Rustom Mody wrote:
> On Thursday, March 19, 2015 at 1:58:29 AM UTC+5:30, Albert-Jan Roskam
> wrote:
> >
> > On Wed, Mar 18, 2015 7:06 PM CET Rustom Mody wrote:
> >
> > >On Wednesday, March 18, 2015 at 8:12:12 PM UTC+5:30, Robert Clove
**SciPy 2015 Conference (Scientific Computing with Python) Call for Proposals:
Submit Your Tutorial and Talk Ideas by April 1, 2015 at
http://scipy2015.scipy.org.**
SciPy 2015, the fourteenth annual Scientific Computing with Python conference,
will be held July 6-12, 2015 in Austin, Texas. Sc
On Wednesday, March 18, 2015 at 4:58:34 PM UTC-7, MRAB wrote:
> On 2015-03-18 23:22, PK Khatri wrote:
> > This script untars .gz file to file without extension
> >
> > import gzip
> > import glob
> > import os.path
> > import tarfile
> >
> > source_dir = "C:\\TEST"
> > dest_dir = "C:\\TEST
On Thursday, March 19, 2015 at 1:58:29 AM UTC+5:30, Albert-Jan Roskam wrote:
>
> On Wed, Mar 18, 2015 7:06 PM CET Rustom Mody wrote:
>
> >On Wednesday, March 18, 2015 at 8:12:12 PM UTC+5:30, Robert Clove wrote:
> >> ./my_eth_script.pl eth0 M > a.txt
> >>
> >> How can
On Wed, 18 Mar 2015 10:46:20 -0700, Aditya Raj Bhatt wrote:
> I always do single line comments with # but just for the sake of it I
> tried it with ''' ''' and it gives me a syntax error.
> ...
> So can someone tell me why a triple-quoted string gives a syntax error
> if only in one line?
A tri
Aditya Raj Bhatt writes:
> I always do single line comments with # but just for the sake of it I
> tried it with ''' ''' and it gives me a syntax error.
The only comment syntax in Python code is the line-end ‘# …’ syntax.
> In both the interpreter, and the source code text file, doing -
>
> a =
On 2015-03-18 23:22, PK Khatri wrote:
This script untars .gz file to file without extension
import gzip
import glob
import os.path
import tarfile
source_dir = "C:\\TEST"
dest_dir = "C:\\TEST"
for src_name in glob.glob(os.path.join(source_dir, '*.gz')):
base = os.path.basename(src_n
This script untars .gz file to file without extension
import gzip
import glob
import os.path
import tarfile
source_dir = "C:\\TEST"
dest_dir = "C:\\TEST"
for src_name in glob.glob(os.path.join(source_dir, '*.gz')):
base = os.path.basename(src_name)
dest_name = os.path.join(dest_di
On Thu, 19 Mar 2015 07:22 am, Albert-Jan Roskam wrote:
>
>
> On Wed, Mar 18, 2015 7:06 PM CET Rustom Mody wrote:
>
>>On Wednesday, March 18, 2015 at 8:12:12 PM UTC+5:30, Robert Clove wrote:
>>> ./my_eth_script.pl eth0 M > a.txt
>>>
>>> How can i run this command wit
On Thu, Mar 19, 2015 at 9:58 AM, Steven D'Aprano
wrote:
> But let's also remember that sometimes you cannot be bothered with *best*
> practice, and "good enough for now" practice is fine.
>
> Need to comment out a large block of code in a hurry while using a basic
> editor that doesn't offer a "Co
On Thu, 19 Mar 2015 06:53 am, Thomas 'PointedEars' Lahn wrote:
> I must strongly object and recommend against getting accustomed to the
> suggested use of multi-line string literals.
I agree in general with Thomas' comments about using arbitrary strings as
comments. If you want to write code acco
On Thu, Mar 19, 2015 at 7:22 AM, Albert-Jan Roskam
wrote:
> On Wed, Mar 18, 2015 7:06 PM CET Rustom Mody wrote:
>
>>On Wednesday, March 18, 2015 at 8:12:12 PM UTC+5:30, Robert Clove wrote:
>>> ./my_eth_script.pl eth0 M > a.txt
>>>
>>> How can i run this command with subprocess.popen
>>
>>Something
On Thu, 19 Mar 2015 06:42 am, Chris Kavanagh wrote:
> While I appreciate the help greatly I thought I had put the entire
> traceback of the error. I was posting here and on StackOverflow, and
> suppose I got confused.
We all make mistakes. I got distracted and forgot to link you to
http://sscce
On 18/03/2015 19:42, Chris Kavanagh wrote:
2nd, you say you "don't want to play guessing games", yet complain about "300
lines of irrelevant code", lol. Which way is it? Do you want the code, or not? How do I know
what's relevant or irrelevant when I'm clearly confused? On Stack, if you don'
On 3/18/2015 3:53 PM, Thomas 'PointedEars' Lahn wrote:
I must strongly object and recommend against getting accustomed to the
suggested use of multi-line string literals.
I agree.
If you want to comment your code, then by all means do so using docstrings
and *real* comments. IDEs like PyDev
On 3/18/2015 3:42 PM, Chris Kavanagh wrote:
2nd, you say you "don't want to play guessing games", yet complain
about "300 lines of irrelevant code", lol. Which way is it? Do you
want the code, or not? How do I know what's relevant or irrelevant
when I'm clearly confused?
You comment out appare
On 2015-03-18 10:46, Aditya Raj Bhatt wrote:
> a = 5 '''a comment'''
>
> results in a syntax error
That's to be expected, and happens with any string, not just
triple-quoted:
>>> a = 5 "hello"
> there are no 'true' multiline comments in python and that all those
> 'block' comments are actuall
On Wed, Mar 18, 2015 7:06 PM CET Rustom Mody wrote:
>On Wednesday, March 18, 2015 at 8:12:12 PM UTC+5:30, Robert Clove wrote:
>> ./my_eth_script.pl eth0 M > a.txt
>>
>> How can i run this command with subprocess.popen
>
>Something like this I guess?
>
>>> proc = Pope
Aditya Raj Bhatt wrote:
> I always do single line comments with # but just for the sake of it I
> tried it with ''' ''' and it gives me a syntax error.
>
> In both the interpreter, and the source code text file, doing -
>
> a = 5 '''a comment'''
>
> results in a syntax error, with the very last
Thomas 'PointedEars' Lahn wrote:
> […] standalone multi-line string literals in Python code serve a specific
> purpose when at the beginning of a function, method or class clock: they
^ block¹
> constitute *docstrings”, setting
_
Laurent Pointal wrote:
> Laurent Pointal wrote:
>> Take care of indent:
>>
>> def f(x):
>> a = 5
>> """an correctly indented expression to be
>> inside the function"""
>> return a * x
>
> Here only the first indent of """ at beginning of the string to be aligned
> to function blo
On Wednesday, March 18, 2015 at 8:02:14 AM UTC-4, Steven D'Aprano wrote:
> On Wed, 18 Mar 2015 01:41 pm, Chris Kavanagh wrote:
>
> > I have a simple script that takes user input (for an Employee) such as
> > name, age, etc then puts in an sqlite3 database. The script worked fine
> > until I realiz
Aditya Raj Bhatt wrote:
> On Wednesday, March 18, 2015 at 1:04:39 PM UTC-5, Laurent Pointal wrote:
>> > Can someone also provide a sort of a 'guide' to triple-quoted
> comments
>> > in general?
>>
>> A triple ' or " string is a Python string, allowing line-return in
> string.
>
> What do you mea
Hi,
On Wed, Mar 18, 2015 at 2:23 PM, Aditya Raj Bhatt
wrote:
> On Wednesday, March 18, 2015 at 1:04:39 PM UTC-5, Laurent Pointal wrote:
>> > Can someone also provide a sort of a 'guide' to triple-quoted
> comments
>> > in general?
>>
>> A triple ' or " string is a Python string, allowing line-re
On Wednesday, March 18, 2015 at 1:04:39 PM UTC-5, Laurent Pointal wrote:
> > Can someone also provide a sort of a 'guide' to triple-quoted
comments
> > in general?
>
> A triple ' or " string is a Python string, allowing line-return in
string.
What do you mean by line-return in string? Is it newli
On Wednesday, March 18, 2015 at 11:36:39 PM UTC+5:30, Rustom Mody wrote:
> On Wednesday, March 18, 2015 at 8:12:12 PM UTC+5:30, Robert Clove wrote:
> > ./my_eth_script.pl eth0 M >> a.txt
> >
> > How can i run this command with subprocess.popen
>
> Something like this I guess?
>
> >>> proc = Pope
Laurent Pointal wrote:
(oups)
> Take care of indent:
>
> def f(x):
> a = 5
> """an correctly indented expression to be
> inside the function"""
> return a * x
Here only the first indent of """ at beginning of the string to be aligned
to function bloc is important, remaining cont
On Wednesday, March 18, 2015 at 8:12:12 PM UTC+5:30, Robert Clove wrote:
> ./my_eth_script.pl eth0 M >> a.txt
>
> How can i run this command with subprocess.popen
Something like this I guess?
>>> proc = Popen("cat", shell=True, stdout=open(inname, "w"),
>>> stdin=open(outname,"r"))
inname and
Aditya Raj Bhatt wrote:
> I always do single line comments with # but just for the sake of it I
> tried it with ''' ''' and it gives me a syntax error.
>
> In both the interpreter, and the source code text file, doing -
>
> a = 5 '''a comment'''
>
> results in a syntax error, with the very last
I always do single line comments with # but just for the sake of it I
tried it with ''' ''' and it gives me a syntax error.
In both the interpreter, and the source code text file, doing -
a = 5 '''a comment'''
results in a syntax error, with the very last quote at the end of the
line highlighted
Steven D'Aprano writes:
> The two weeks we lost upgrading from Python 2.6 to 2.7 is just the
> normal upgrade pains you always have to expect from any major project,
Wait, what happened between 2.6 and 2.7 that took you two weeks of
upgrading?
--
https://mail.python.org/mailman/listinfo/python-l
On 18/03/2015 00:35, Mark Lawrence wrote:
I've just come across this http://www.stavros.io/posts/brilliant-or-insane-code/
as a result of this http://bugs.python.org/issue23695
Any and all opinions welcomed, I'm chickening out and sitting firmly on the
fence.
There was a long thread on an in
On 18/03/2015 14:59, Ian Kelly wrote:
On Tue, Mar 17, 2015 at 7:14 PM, Dan Sommers wrote:
On Wed, 18 Mar 2015 00:35:42 +, Mark Lawrence wrote:
I've just come across this
http://www.stavros.io/posts/brilliant-or-insane-code/ as a result of
this http://bugs.python.org/issue23695
Any and al
On Tue, Mar 17, 2015 at 7:14 PM, Dan Sommers wrote:
> On Wed, 18 Mar 2015 00:35:42 +, Mark Lawrence wrote:
>
>> I've just come across this
>> http://www.stavros.io/posts/brilliant-or-insane-code/ as a result of
>> this http://bugs.python.org/issue23695
>>
>> Any and all opinions welcomed, I'm
EuroPython would not be possible and as affordable as it is without
the help of our sponsors.
Reach out to 1200+ attendees in Europe
--
If your company is using Python, sells a product or service in the
Python space or looking to hire excellent Python programm
./my_eth_script.pl eth0 M >> a.txt
How can i run this command with subprocess.popen
On Wed, Mar 18, 2015 at 3:49 AM, Rustom Mody wrote:
> On Wednesday, March 18, 2015 at 4:06:05 PM UTC+5:30, Robert Clove wrote:
> > Hi,
> >
> > I have a perl script named "my_eth-traffic.pl" which calculates the
On Wed, 2015-03-18 at 00:35 +, Mark Lawrence wrote:
> I've just come across this
> http://www.stavros.io/posts/brilliant-or-insane-code/ as a result of
> this http://bugs.python.org/issue23695
>
> Any and all opinions welcomed, I'm chickening out and sitting firmly on
> the fence.
I'll go
On Wednesday, March 18, 2015 at 4:23:37 PM UTC+5:30, Steven D'Aprano wrote:
> On Wed, 18 Mar 2015 08:11 pm, Ned Deily wrote:
>
> > In any case, of the two problems noted with Python itself, there is only
> > one that appears to be Python 3 related. That's still not good but I
> > think it would b
On Wed, 18 Mar 2015 01:41 pm, Chris Kavanagh wrote:
> I have a simple script that takes user input (for an Employee) such as
> name, age, etc then puts in an sqlite3 database. The script worked fine
> until I realized one problem. The age input field is defined in SQLAlchemy
> as an Integer, so if
On Wed, 18 Mar 2015 08:11 pm, Ned Deily wrote:
> In any case, of the two problems noted with Python itself, there is only
> one that appears to be Python 3 related. That's still not good but I
> think it would be fairer to ascribe a good chunk of the pain you've
> experienced to the more common p
On Wednesday, March 18, 2015 at 4:06:05 PM UTC+5:30, Robert Clove wrote:
> Hi,
>
> I have a perl script named "my_eth-traffic.pl" which calculates the tx and rx
> speed of the Ethernet interface in Mb.
>
> I want to run this script from another script and want the output in other
> file.
> So i
Hi,
I have a perl script named "my_eth-traffic.pl" which calculates the tx and
rx speed of the Ethernet interface in Mb.
I want to run this script from another script and want the output in other
file.
So i wrote the following script but not getting the output.
#!/usr/bin/python
import sys
impo
On Wednesday, March 18, 2015 at 12:00:54 AM UTC-4, MRAB wrote:
> On 2015-03-18 02:41, Chris Kavanagh wrote:
> > I have a simple script that takes user input (for an Employee) such as
> > name, age, etc then puts in an sqlite3 database. The script worked fine
> > until I realized one problem. The ag
In article , John Nagle
wrote:
>If only that were true. Look what I'm reporting bugs on:
>
> ssl - a core Python module.
I assume you're referring to http://bugs.python.org/issue23476.
It seems to me that the issue there was not in Python but due to a
shortcoming in OpenSSL itself.
On 18/03/2015 06:37, John Nagle wrote:
On 3/15/2015 4:43 PM, Roy Smith wrote:
In article ,
Mario Figueiredo wrote:
What makes you think your anecdotal bugs constitute any sort of
evidence this programming language isn't ready to be used by the
public?
There's several levels of "ready".
I
On Wed, Mar 18, 2015 at 2:01 AM, Frank Millman wrote:
>
> "Ian Kelly" wrote in message
> news:CALwzidmNDcSvER7S6inEaVZA=DHUrDX1KzL-WRVwhd=o3_l...@mail.gmail.com...
>> On Tue, Mar 17, 2015 at 12:44 AM, Frank Millman
>> wrote:
>>> Thanks for the explanation. I'll try not to make that mistake again
"Ian Kelly" wrote in message
news:CALwzidmNDcSvER7S6inEaVZA=DHUrDX1KzL-WRVwhd=o3_l...@mail.gmail.com...
> On Tue, Mar 17, 2015 at 12:44 AM, Frank Millman
> wrote:
>> Thanks for the explanation. I'll try not to make that mistake again.
>>
>> However, to go back to the original example, we want
47 matches
Mail list logo