On Sat, Oct 11, 2014 at 2:44 AM, Peter Pearson
wrote:
> On Fri, 10 Oct 2014 08:31:04 +0200, Irmen de Jong wrote:
>> On 10-10-2014 6:21, Igor Korot wrote:
>
>>> When I am on Windows, I can write something like this:
>>>
>>> sys.path.append('C:\Users\Igor\Documents\MyLib')
>>
>> While this might wor
On Fri, Oct 10, 2014 at 12:31 AM, Irmen de Jong wrote:
> - you need to escape the backslashes (or just use forward slashes, they work
> on windows too)
Or use a raw string. There is usually no reason to have escape
sequences at all in a file system path.
--
https://mail.python.org/mailman/listi
On Fri, 10 Oct 2014 08:31:04 +0200, Irmen de Jong wrote:
> On 10-10-2014 6:21, Igor Korot wrote:
>> When I am on Windows, I can write something like this:
>>
>> sys.path.append('C:\Users\Igor\Documents\MyLib')
>
> While this might work on your system, it may not work on others.
>
> - you need to
On 10-10-2014 8:58, Chris Angelico wrote:
> AIUI you can use os.path.expanduser() on Windows as well, and it'll
> take care of USERPROFILE.
Nice, didn't know that!
I've been using the appdirs module (https://pypi.python.org/pypi/appdirs/) as
well to
avoid constructing paths manually altogether.
On Fri, Oct 10, 2014 at 5:31 PM, Irmen de Jong wrote:
> On 10-10-2014 6:21, Igor Korot wrote:
>> Hi, ALL,
>> When I am on Windows, I can write something like this:
>>
>> sys.path.append('C:\Users\Igor\Documents\MyLib')
>
> While this might work on your system, it may not work on others.
>
> - you
On 10-10-2014 6:21, Igor Korot wrote:
> Hi, ALL,
> When I am on Windows, I can write something like this:
>
> sys.path.append('C:\Users\Igor\Documents\MyLib')
While this might work on your system, it may not work on others.
- you need to escape the backslashes (or just use forward slashes, they
In Igor Korot
writes:
> sys.path.append('~/MyLib')
> I.e., will '~' sign be expanded correctly?
Not as written.
Use os.path.expanduser() to get user's home directories.
--
John Gordon Imagine what it must be like for a real medical doctor to
gor...@panix.comwatch 'House', or a
Try:
sys.path.append(os.path.expanduser('~/MyLib'))
On Thu, Oct 9, 2014 at 9:21 PM, Igor Korot wrote:
> Hi, ALL,
> When I am on Windows, I can write something like this:
>
> sys.path.append('C:\Users\Igor\Documents\MyLib')
>
> Now, when I'm on Linux, can I do this:
>
> sys.path.append('~/MyLib')
John Abel enlightened us with:
> Here's one I used a while back. Returns a dict containing details per
> partition
This only gives information about actually mounted partitions. It
could be improved by checking /proc/partitions as well.
Sybren
--
The problem with the world is stupidity. Not sa
Partitioning a hard disk on linux can be done with parted, see
http://www.gnu.org/software/parted/parted.html - I don't know how good
the python-pated interface is, and what it's capable of
--
http://mail.python.org/mailman/listinfo/python-list
Here's one I used a while back. Returns a dict containing details per
partition
def _getAvailPartitions():
validTypes = [ 'ufs', 'nfs', 'reiserfs' ]
mntTab = file( '/etc/mtab', 'r' )
drvDetails = {}
for mntLine in mntTab:
splitLine = mntLine.split()
> Hi i wanted to know how can i find disk size on linux platform using
> python.
You could use python to drive the 'sfdisk' command through a pipe, which
will probably do much of what you want.
-- Lars
--
Lars Kellogg-Stedman <[EMAIL PROTECTED]>
This email address will expire on 2005-11-23.
--
"Austin" <[EMAIL PROTECTED]> wrote:
>
>On Red Hat 9, Python is installed by default and it's version is 2.2.2
>If I want to upgrade Python to 2.3.4(newer version), how could I do?
>If I compile source code of Python, how do I uninstall the old version?
You don't want to uninstall the old version.
>> On Red Hat 9, Python is installed by default and it's version is 2.2.2
>> If I want to upgrade Python to 2.3.4(newer version), how could I do?
>> If I compile source code of Python, how do I uninstall the old version?
>> I tried rpm packages but failed with dependence.
>I didn't try the rpm's.
Paul Rubin wrote:
"Austin" <[EMAIL PROTECTED]> writes:
On Red Hat 9, Python is installed by default and it's version is 2.2.2
If I want to upgrade Python to 2.3.4(newer version), how could I do?
If I compile source code of Python, how do I uninstall the old version?
I tried rpm packages but failed
"Austin" <[EMAIL PROTECTED]> writes:
> On Red Hat 9, Python is installed by default and it's version is 2.2.2
> If I want to upgrade Python to 2.3.4(newer version), how could I do?
> If I compile source code of Python, how do I uninstall the old version?
> I tried rpm packages but failed with depen
Gurpreet Sachdeva wrote:
I have shifted my python script on a 4 node open ssi cluster. Please
guide me what changes do I have to do in my python scripts to fully
utilize the cluster. How do we introduce parralel processing in
python???
There was a very recent thread about this subject: http://tinyu
17 matches
Mail list logo