On 2/27/2017 11:16 PM, Jarod Nash wrote:
I have just started into python and this was my first time setting up my
own software. I ended up with pycharm and chose the python 3.6 or whatever
translator. Every time I run my hello world program I get the message
"invalid translator" and I get several
I have just started into python and this was my first time setting up my
own software. I ended up with pycharm and chose the python 3.6 or whatever
translator. Every time I run my hello world program I get the message
"invalid translator" and I get several pop ups giving me the options of
custom se
On 2017-02-28 04:07, Jim wrote:
I found this module by accident the other day and decided to try to use
it to position some windows on my desktop.
# Script to open and position program windows
import subprocess
from xdo import Xdo
xdo = Xdo()
subprocess.call('firefox')
win = xdo.search_window
I found this module by accident the other day and decided to try to use
it to position some windows on my desktop.
# Script to open and position program windows
import subprocess
from xdo import Xdo
xdo = Xdo()
subprocess.call('firefox')
win = xdo.search_windows(winname = 'Mozilla Firefox')
x
On Tue, Feb 28, 2017 at 11:35 AM, Jon Ribbens wrote:
> Sorry, I must have missed something here. What are you talking about?
> "lambda: [1,2,3]" is not acceptable input to ast.literal_eval(), it
> will throw an exception.
[1,2,3] is, though. Go read my previous posts.
ChrisA
--
https://mail.pyt
On 2017-02-27, Chris Angelico wrote:
> On Tue, Feb 28, 2017 at 3:58 AM, Jon Ribbens
> wrote:
>> Seeing as most of it is code along the lines of "is this an integer
>> constant? if so the value is that constant": no, I think "execution"
>> is a misleading word to use.
>
> That's true of a lot of
On Monday, February 27, 2017 at 4:27:23 PM UTC-5, Pavol Lisy wrote:
> On 2/27/17, Andrew Zyman wrote:
> I think you meant:
> colnames = ['hostname']
arh... Exactly. Now the rest is "unfolding".
> What do you want is probably:
> >>> data[colnames[0]].tolist()
this is great and the rest of the
On 2/27/17, Andrew Zyman wrote:
> Hello,
> i'm trying to understand what is the difference between the below code.
> And how do i access the column's data without hardcoding the column name in
> such a way that i'll be able to convert it's values into the list of
> strings?
>
> I appreciate your
Hello,
i'd appreciate an explanation about the differences in the code versions
below. I'm trying to get the list of the strings out of the column and avoid
hardcoding the column name.
cat Data/2domain.csv
hostname
hostname1
hostname2
...
...
Working version(s):
Python2.7:
input_file = r'Data
Hello,
i'm trying to understand what is the difference between the below code.
And how do i access the column's data without hardcoding the column name in
such a way that i'll be able to convert it's values into the list of strings?
I appreciate your help.
Short version:
colnames='hostname'
da
On Tue, Feb 28, 2017 at 3:58 AM, Jon Ribbens wrote:
> On 2017-02-27, Chris Angelico wrote:
>> On Tue, Feb 28, 2017 at 3:17 AM, Jon Ribbens
>> wrote:
>>> On 2017-02-27, Chris Angelico wrote:
Actually it does execute, as you can see from the source code.
>>>
>>> I'm not sure what you mean b
On 2017-02-27, Chris Angelico wrote:
> On Tue, Feb 28, 2017 at 3:17 AM, Jon Ribbens
> wrote:
>> On 2017-02-27, Chris Angelico wrote:
>>> Actually it does execute, as you can see from the source code.
>>
>> I'm not sure what you mean by that. I was looking at the source code
>> (and its history)
On Tue, Feb 28, 2017 at 3:17 AM, Jon Ribbens wrote:
> On 2017-02-27, Chris Angelico wrote:
>> Actually it does execute, as you can see from the source code.
>
> I'm not sure what you mean by that. I was looking at the source code
> (and its history) when I wrote my post, and I would be hard pushe
On 2017-02-27, Chris Angelico wrote:
> On Tue, Feb 28, 2017 at 1:18 AM, Jon Ribbens
> wrote:
>> "execution" isn't really the right way to describe literal_eval().
>> It isn't an code executor or even an expression evaluator, all it
>> does is turns a Python literal in source form into the value
On Tue, Feb 28, 2017 at 1:18 AM, Jon Ribbens wrote:
> On 2017-02-27, Vincent Vande Vyvre wrote:
>> Le 27/02/17 à 14:09, Chris Angelico a écrit :
>>> The message is a little confusing, but the error comes from the fact
>>> that literal_eval permits a very few legal operations, and calling a
>>> fu
On 2017-02-27, Vincent Vande Vyvre wrote:
> Le 27/02/17 à 14:09, Chris Angelico a écrit :
>> The message is a little confusing, but the error comes from the fact
>> that literal_eval permits a very few legal operations, and calling a
>> function isn't one of them. So when you try to evaluate the "
On Tue, Feb 28, 2017 at 12:44 AM, Vincent Vande Vyvre
wrote:
> OK, it's coherent with the secure execution.
>
Yep. Here's a PR to make the message a bit clearer, though:
https://github.com/python/cpython/pull/340
>>> ast.literal_eval("print('hello world')")
Traceback (most recent call last):
Le 27/02/17 à 14:09, Chris Angelico a écrit :
On Mon, Feb 27, 2017 at 11:57 PM, Vincent Vande Vyvre
wrote:
I've this strange error:
Python 3.4.3 (default, Nov 17 2016, 01:08:31)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
import ast
l = "print('
Vincent Vande Vyvre writes:
> I've this strange error:
>
> Python 3.4.3 (default, Nov 17 2016, 01:08:31)
> [GCC 4.8.4] on linux
> Type "help", "copyright", "credits" or "license" for more information.
import ast
l = "print('hello world')"
ast.literal_eval(l)
> Traceback (most recent
On Mon, Feb 27, 2017 at 11:57 PM, Vincent Vande Vyvre
wrote:
> I've this strange error:
>
> Python 3.4.3 (default, Nov 17 2016, 01:08:31)
> [GCC 4.8.4] on linux
> Type "help", "copyright", "credits" or "license" for more information.
import ast
l = "print('hello world')"
ast.literal
I've this strange error:
Python 3.4.3 (default, Nov 17 2016, 01:08:31)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ast
>>> l = "print('hello world')"
>>> ast.literal_eval(l)
Traceback (most recent call last):
File "", line 1, in
File
Ho Yeung Lee wrote:
> before cloususerlogin
> Unexpected error:
> after map pool
>
>
> ...
> passwordlist = pickle.load( open( str(currentworkingdirectory) +
> "\\decryptedsecret.p", "rb" ) )
According to
https://docs.python.org/dev/library/multiprocessing.html#programming-guidelines
you cann
22 matches
Mail list logo