I'm new to python and have a need to convert a 'list of lists' to a
dictionary object. Can someone help me to convert data similar to the
following using two different examples of a list comprehension and a for
loop?
Data is similar to the following:
[['name=server1', 'state=active', 'ncpu=8', 'me
On Tue, May 17, 2011 at 11:30 AM, Emile van Sebille wrote:
> On 5/17/2011 8:58 AM Brad Hudson said...
>
> I'm new to python and have a need to convert a 'list of lists' to a
>> dictionary object. Can someone help me to convert data similar to the
>> followi
On Tue, May 17, 2011 at 12:10 PM, Alan Gauld wrote:
>
> Given that you want more than one method I assume
> this is a homwework assignment rather than a practical
> problem? If so we would prefer that you showed us what
> you tried and we can then help you fix it rather than
> just offer you solut
Can someone provide information on the best modules/python tools to use for
general database scripting? I'm interested in something that works across
the board for Oracle, MySQL, MS SQL Server, and DB2. I was hoping a good
generic ODBC module would be out there, but I'm having difficulty locating
o
Thanks for the responses Alan & Modulok. I will start with SQLAlchemy and
see where it takes me.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Can someone assist in a very basic task of retrieving a '.txt' file
from a sharepoint document library using Python 2.4 standard
libraries? I'm certain, I need to build up some form of authentication
to pass, but do not know where to begin. Also, I do not want to
attempt to customize or install add
On Fri, Mar 2, 2012 at 11:03 AM, Brad Hudson wrote:
> Can someone assist in a very basic task of retrieving a '.txt' file
> from a sharepoint document library using Python 2.4 standard
> libraries? I'm certain, I need to build up some form of authentication
> to pas
>> Are you possibly thinking of the Khan Academy [1] ?
>>
>> [1] http://www.khanacademy.org/
If you're interested in free courses, MIT also has free programming
courses (done in Python) via their OpenCourseWare and will be
expanding this to MITx in the near future.
OpenCourseWare - Intro to Compu
Can someone point me to information on how to create Windows .exe files
from python 2.7.3? The py2exe method (www.py2exe.org) appears to only be
available for python 2.6 from the sites I've seen.
Thanks in advance.
___
Tutor maillist - Tutor@python.org
Aside from emacs, vim is a nice editor that can be used across
UNIX/Linux/Windows OS. It is also more friendly to learn/configure than
emacs (install it, type "vim" at a shell/cmd.exe prompt and use the help
that comes with it for customization). It comes by default on most modern
UNIX/Linux OS. Si
I don't use notepad or notepad++, so I don't know the settings. However, if
you're familiar with vi/vim, you can download the CLI from www.vim.org for
almost any flavor OS and it works quite well on Windows.
BTW: you can customize your settings to use spaces instead of tabs, among
others, which is
I think this is more of what you ar looking for:
>>> a = 'this is a list with is repeated twice.'
>>> a
'this is a list with is repeated twice.'
>>> alist = a.strip().split()
>>> alist
['this', 'is', 'a', 'list', 'with', 'is', 'repeated', 'twice.']
>>> var='is'
>>> alist.count(var)
2
>>>
On Wed,
Look at the subprocess module. You can send your SSH connections via
subprocess and collect the output for parsing.
On Mon, Dec 17, 2012 at 7:40 AM, Ufuk Eskici wrote:
> Hello All,
>
> Can we make an SSH connection with Pyhton 3.3 ?
>
> I want to connecto to my router, send commands and receive
> #!/usr/bin/env python
>
> import os
>
> global name_wo_ext
>
> name_wo_ext = "d:\\fun"
>
> os.system("mkdir %s" % (name_wo_ext))
>
>
>
> This gets executed well but there is no directory created L I tried with
> another command as below and it works for me
>
This is not a problem with os.system.
> I am getting the following for my installation.
>
> Why is this happening, and how do I get it to work properly (returning
> element 0 - n, versus n - 0)?
>
> Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on
> win32
> Type "help", "copyright", "credits" or "license" fo
> I have given the admin privileges for my drive but still os.system won't
> work :(
>
Are you saying you applied "Administrator" privileges to the
drive/folder? If so, are you executing your script as a normal user or
as "Administrator"? Example: In order to run something from the
command prompt a
16 matches
Mail list logo