Perhaps you are trying too hard too fast. When I started Python, after
20 years of on and off experience with multiple languages, I went
through the tutorial (on Dos, no Idle). It took about 2 hours. Then I
quickly wrote the code I needed for a paid project.
Do stick with 3.4.2, but use the 3.4
On 10/15/2014 3:36 PM, ryguy7272 wrote:
Please pay attention to Mark's comment about how to avoid blank line
doubling.
def showMaxFactor(num):
count = num / 2
while count > 1:
if num % count == 0:
print 'largest factor of %d is %d' % \
(num, c
On Wednesday, October 15, 2014, ryguy7272 wrote:
> So sorry everyone. I've posted here several times today. This is VERY
> frustrating.
>
> So, I'm reading this link.
> https://docs.python.org/2/howto/urllib2.html
>
>
Important note!: The "/2/" in the URL means those docs are for Python 2.x
Wh
ryguy7272 writes:
> So, I'm reading this link.
> https://docs.python.org/2/howto/urllib2.html
Note that this is the documentation for Python 2, which is obsolescent.
It has had a long life, so references to Python on the web are still
dominantly about that legacy version. Your confusion is quite
On Oct 15, 2014 7:04 PM, "Cameron Simpson" wrote:
>
> On 15Oct2014 16:09, Dan Stromberg wrote:
>>
>> On Wed, Oct 15, 2014 at 3:50 PM, ryguy7272 wrote:
>>>
>>> #1) That's very bizarre to mix single quotes and double quotes in a
single language. Does Python actually mix single quotes and do
On Wed, Oct 15, 2014 at 5:44 PM, ryguy7272 wrote:
> Either this is the most brilliant thing ever invented, or it's the biggest
> piece of shit ever invented. I just can't tell. All I know for sure, is
> that it doesn't do ANYTHING that I tell it to do.
Maybe you should decide whether you wan
On 2014-10-16 01:40, ryguy7272 wrote:
So sorry everyone. I've posted here several times today. This is
VERY frustrating.
> So, I'm reading this link.
> https://docs.python.org/2/howto/urllib2.html
>
>
> Fetching URLs
> The simplest way to use urllib2 is as follows:
> import urllib2
> response
On Wed, Oct 15, 2014 at 5:40 PM, ryguy7272 wrote:
>
> ImportError: No module named 'urllib2'
http://stackoverflow.com/questions/2792650/python3-error-import-error-no-module-name-urllib
--
https://mail.python.org/mailman/listinfo/python-list
On 15Oct2014 16:09, Dan Stromberg wrote:
On Wed, Oct 15, 2014 at 3:50 PM, ryguy7272 wrote:
#1) That's very bizarre to mix single quotes and double quotes in a single
language. Does Python actually mix single quotes and double quotes?
I'm not sure what you mean by "mix". C uses single
On Thu, Oct 16, 2014 at 11:40 AM, ryguy7272 wrote:
> I totally don't understand this language. Import means import. Right.
> WTF!
Yes, but import from where? If you ask Python - or any other language
- to "import asfadgt4tfihavzcxvzxcvaerg", do you expect it to succeed?
It doesn't exist.
On Wednesday, October 15, 2014 8:40:40 PM UTC-4, ryguy7272 wrote:
> So sorry everyone. I've posted here several times today. This is VERY
> frustrating.
>
>
>
> So, I'm reading this link.
>
> https://docs.python.org/2/howto/urllib2.html
>
>
>
>
>
> Fetching URLs
>
> The simplest way to
So sorry everyone. I've posted here several times today. This is VERY
frustrating.
So, I'm reading this link.
https://docs.python.org/2/howto/urllib2.html
Fetching URLs
The simplest way to use urllib2 is as follows:
import urllib2
response = urllib2.urlopen('http://python.org/')
html = respon
On 16/10/2014 12:32 AM, Chris “Kwpolska” Warrick wrote:
It should parse this as
else:
print 'false'
print 'done'
Why? Because things like `print 'done'` usually have an empty line before it:
if True:
print 'true'
else:
print 'false'
print 'done'
That should be parsed the way you w
On Wed, Oct 15, 2014 at 3:50 PM, ryguy7272 wrote:
> I'm trying to run this script (using IDLE 3.4)
> I would be most appreciative if someone could respond to a few questions.
>
> The error that I get is this.
> 'invalid syntax'
You may get better help if you give the context of this message.
>
I'm trying to run this script (using IDLE 3.4)
#!/usr/bin/env python
import urllib2
import pytz
import pandas as pd
from bs4 import BeautifulSoup
from datetime import datetime
from pandas.io.data import DataReader
SITE = "http://en.wikipedia.org/wiki/List_of_S%26P_500_companies";
START = datet
Anurag Patibandla Wrote in message:
> On Wednesday, October 15, 2014 1:35:43 PM UTC-4, Rustom Mody wrote:
>> On Wednesday, October 15, 2014 10:51:11 PM UTC+5:30, Anurag Patibandla wrote:
>>
>> > Here is my sample dict if that helps:
>>
>> >
>>
>> >
>>
>> >
>>
>> > json = {"1": {"Status": "
On 15/10/2014 21:45, ryguy7272 wrote:
On Wednesday, October 15, 2014 3:10:05 PM UTC-4, ryguy7272 wrote:
I'm wondering how to debug code in IDLE Python 3.4. I found this.
http://www.cs.uky.edu/~paulp/CS115F11/notes/debug/debug.html
That looks pretty helpful, but mine is nothing like that. A
On Wednesday, October 15, 2014 3:10:05 PM UTC-4, ryguy7272 wrote:
> I'm wondering how to debug code in IDLE Python 3.4. I found this.
>
> http://www.cs.uky.edu/~paulp/CS115F11/notes/debug/debug.html
>
>
>
> That looks pretty helpful, but mine is nothing like that. All my controls
> are greye
On 10/15/2014 11:39 AM, Shiva wrote:
Hi,
I am trying to search a string through files in a directory - however while
Python script works on it and writes a log - I want to present the user with
count of number of strings found. So it should increment for each string found.
How do I implement it
On 2014-10-15 20:36, ryguy7272 wrote:
On Wednesday, October 15, 2014 3:23:22 PM UTC-4, Terry Reedy wrote:
On 10/15/2014 3:09 PM, ryguy7272 wrote:
> I'm wondering how to debug code in IDLE Python 3.4. I found this.
Use 3.4.2, which has an important bugfix for debugger.
> http://www.cs.uky
On 2014-10-15 20:24, Vincent Vande Vyvre wrote:
Le 15/10/2014 20:39, Shiva a écrit :
Hi,
I am trying to search a string through files in a directory -
however while Python script works on it and writes a log - I want
to present the user with count of number of strings found. So it
should increm
On Wednesday, October 15, 2014 3:23:22 PM UTC-4, Terry Reedy wrote:
> On 10/15/2014 3:09 PM, ryguy7272 wrote:
>
> > I'm wondering how to debug code in IDLE Python 3.4. I found this.
>
>
>
> Use 3.4.2, which has an important bugfix for debugger.
>
>
>
> > http://www.cs.uky.edu/~paulp/CS115F1
Le 15/10/2014 20:39, Shiva a écrit :
Hi,
I am trying to search a string through files in a directory - however while
Python script works on it and writes a log - I want to present the user with
count of number of strings found. So it should increment for each string found.
How do I implement it
On 10/15/2014 2:39 PM, Shiva wrote:
Hi,
I am trying to search a string through files in a directory - however while
Python script works on it and writes a log - I want to present the user with
count of number of strings found. So it should increment for each string found.
How do I implement it?
On Wed, Oct 15, 2014 at 11:12 AM, Terry Reedy wrote:
> On 10/15/2014 10:32 AM, Chris “Kwpolska” Warrick wrote:
>> It should parse this as
>>
>> else:
>> print 'false'
>> print 'done'
>>
>> Why? Because things like `print 'done'` usually have an empty line before
>> it:
>
>
> There is no
On 10/15/2014 3:12 PM, tntsu...@googlemail.com wrote:
hi guys,
can you help me please...
i installed python 3.4.2
What system?
> and the IEP editor...
I have no idea what that is.
now i want to program a little thingy with a window, a button and some
entry fields that are connected to a s
On 10/15/2014 3:09 PM, ryguy7272 wrote:
I'm wondering how to debug code in IDLE Python 3.4. I found this.
Use 3.4.2, which has an important bugfix for debugger.
http://www.cs.uky.edu/~paulp/CS115F11/notes/debug/debug.html
That looks pretty helpful,
but mine is nothing like that. All my
On Wed, Oct 15, 2014 at 12:39 PM, Shiva
wrote:
> Hi,
>
> I am trying to search a string through files in a directory - however while
> Python script works on it and writes a log - I want to present the user with
> count of number of strings found. So it should increment for each string
> found.
>
hi guys,
can you help me please...
i installed python 3.4.2 and the IEP editor...
now i want to program a little thingy with a window, a button and some
entry fields that are connected to a simple calculation...
the IEP shows me "3.4.2 without GUI"...
strange... in the instalation i see the pa
I'm wondering how to debug code in IDLE Python 3.4. I found this.
http://www.cs.uky.edu/~paulp/CS115F11/notes/debug/debug.html
That looks pretty helpful, but mine is nothing like that. All my controls are
greyed out. The debugger does basically...nothing. All I get is messages like
this.
[D
On Wednesday, October 15, 2014 1:41:13 PM UTC-4, Dave Angel wrote:
> Anurag Patibandla Wrote in message:
>
> > Thanks for the response.
>
> > Here is the code that I have tried.
>
> >
>
> > from operator import itemgetter
>
> > keys = json.keys()
>
> > order = list(keys)
>
> > q1 = int(rou
Hi,
I am trying to search a string through files in a directory - however while
Python script works on it and writes a log - I want to present the user with
count of number of strings found. So it should increment for each string found.
How do I implement it?
If I use a print() within a if condi
On Wednesday, October 15, 2014 1:35:43 PM UTC-4, Rustom Mody wrote:
> On Wednesday, October 15, 2014 10:51:11 PM UTC+5:30, Anurag Patibandla wrote:
>
> > Here is my sample dict if that helps:
>
> >
>
> >
>
> >
>
> > json = {"1": {"Status": "Submitted", "Startdate": ["01/01/2011"],
> > "End
Xavier de Gaye Wrote in message:
> pdb-clone 1.9 has been released at Pypi:
> https://pypi.python.org/pypi/pdb-clone
>
> Features:
>* Improve significantly pdb performance. With breakpoints, pdb-clone runs
> just above the speed of the interpreter while pdb runs at 10 to 100 times the
> sp
Anurag Patibandla Wrote in message:
> dicts = dict(lists)
> print dicts
> print dict[0]
>
> Print dicts works as expected giving me the combine dictionary values. But
> when I say dict[0]. I see the error:
> TypeError: 'type' object has no attribute '__getitem__'
>
Of course. You
Anurag Patibandla Wrote in message:
> On Wednesday, October 15, 2014 1:10:41 PM UTC-4, Rustom Mody wrote:
>> On Wednesday, October 15, 2014 10:30:49 PM UTC+5:30, Anurag Patibandla wrote:
>>
>> > keys = json.keys()
>>
>> > order = list(keys)
>>
>> > q1 = int(round(len(keys)*0.2))
>>
>> > q2 = i
Anurag Patibandla Wrote in message:
> Thanks for the response.
> Here is the code that I have tried.
>
> from operator import itemgetter
> keys = json.keys()
> order = list(keys)
> q1 = int(round(len(keys)*0.2))
> q2 = int(round(len(keys)*0.3))
> q3 = int(round(len(keys)*0.5))
> b = [q1,q2,q3]
>
On Wednesday, October 15, 2014 10:51:11 PM UTC+5:30, Anurag Patibandla wrote:
> Here is my sample dict if that helps:
>
>
>
> json = {"1": {"Status": "Submitted", "Startdate": ["01/01/2011"], "Enddate":
> ["02/02/2012"], "Job_ID": 1, "m_Quantile": "80", "m_Controller": "Python",
> "m_Method":
Here is my sample dict if that helps:
json = {"1": {"Status": "Submitted", "Startdate": ["01/01/2011"], "Enddate":
["02/02/2012"], "Job_ID": 1, "m_Quantile": "80", "m_Controller": "Python",
"m_Method": "Distributed", "Allocation_3": ["50"], "Allocation_2": ["30"],
"Allocation_1": ["20"], "Note"
On Wednesday, October 15, 2014 1:10:41 PM UTC-4, Rustom Mody wrote:
> On Wednesday, October 15, 2014 10:30:49 PM UTC+5:30, Anurag Patibandla wrote:
>
> > keys = json.keys()
>
> > order = list(keys)
>
> > q1 = int(round(len(keys)*0.2))
>
> > q2 = int(round(len(keys)*0.3))
>
> > q3 = int(round(l
On Wednesday, October 15, 2014 10:30:49 PM UTC+5:30, Anurag Patibandla wrote:
> keys = json.keys()
> order = list(keys)
> q1 = int(round(len(keys)*0.2))
> q2 = int(round(len(keys)*0.3))
> q3 = int(round(len(keys)*0.5))
> b = [q1,q2,q3]
> n=0
> for i in b:
> queues = order[n:n+i]
> n = n+i
On 10/15/2014 10:32 AM, Chris “Kwpolska” Warrick wrote:
On Wed, Oct 15, 2014 at 9:27 AM, alex23 wrote:
On 15/10/2014 12:23 PM, Juan Christian wrote:
Using PyCharm is easy:
File > Settings > (IDE Settings) Editor > Smart Keys > Reformat on paste
> choose "Reformat Block"
This isn't as s
keys = json.keys()
order = list(keys)
q1 = int(round(len(keys)*0.2))
q2 = int(round(len(keys)*0.3))
q3 = int(round(len(keys)*0.5))
b = [q1,q2,q3]
n=0
for i in b:
queues = order[n:n+i]
n = n+i
lists = [(queues[j], json.get(queues[j])) for j in range(len(queues))]
dicts
On Wednesday, October 15, 2014 10:13:18 PM UTC+5:30, Rustom Mody wrote:
> On Wednesday, October 15, 2014 9:58:49 PM UTC+5:30, Anurag Patibandla wrote:
> > First the values printed by
> > '[(queues[j], json.get(queues[j])) for j in range(len(queues))] '
> > is a list, so I tried to convert it into a
keys = json.keys()
order = list(keys)
q1 = int(round(len(keys)*0.2))
q2 = int(round(len(keys)*0.3))
q3 = int(round(len(keys)*0.5))
b = [q1,q2,q3]
n=0
for i in b:
queues = order[n:n+i]
n = n+i
#print queues
#print [(queues[j], json.get(queues[j])) for j in range(len(queues))
On Wednesday, October 15, 2014 9:58:49 PM UTC+5:30, Anurag Patibandla wrote:
> First the values printed by
> '[(queues[j], json.get(queues[j])) for j in range(len(queues))] '
> is a list, so I tried to convert it into a dict using dict().
> And then I tried doing dict[0] but there is an error which
First the values printed by
'[(queues[j], json.get(queues[j])) for j in range(len(queues))] '
is a list, so I tried to convert it into a dict using dict().
And then I tried doing dict[0] but there is an error which says:
'type' object has no attribute '__getitem__'
--
https://mail.python.org/mail
On Wednesday, October 15, 2014 9:22:48 PM UTC+5:30, Anurag Patibandla wrote:
> Thanks Rustom for the advice.
> I am new to Python and getting struck at some basic things. How do I assign
> the values that I am printing to 3 variables say dict1, dict2, dict3?
> When I try to assign them before the
Hi Naoki,
I am new to python programming. Getting used to writing basic scripts to
understand python.
To understand 'Click' i may need some more guidance.
For e.g if i were to do 'ifconfig -a' from Click, how would the program look
like. That will help me get started.
What i am looking for is
Thanks Rustom for the advice.
I am new to Python and getting struck at some basic things. How do I assign the
values that I am printing to 3 variables say dict1, dict2, dict3?
When I try to assign them before the print statement like this:
d1, d2, d3 =[(queues[j], json.get(queues[j])) for j in ran
On Wed, Oct 15, 2014 at 9:27 AM, alex23 wrote:
> On 15/10/2014 12:23 PM, Juan Christian wrote:
>>
>> Using PyCharm is easy:
>>
>> File > Settings > (IDE Settings) Editor > Smart Keys > Reformat on paste
>> > choose "Reformat Block"
>
>
>
> This isn't as straight forward as you imply. Say I have m
Thank you Peter!
That makes sense, and I did find "pprint" that dumped it out aligned so I could
actually see the nested layers you are referring to.
That got me my IP's. :-) I'll play with this now and see if I can harvest
something targeted.. Like list all device host names running code 4.1
pdb-clone 1.9 has been released at Pypi: https://pypi.python.org/pypi/pdb-clone
Features:
* Improve significantly pdb performance. With breakpoints, pdb-clone runs
just above the speed of the interpreter while pdb runs at 10 to 100 times the
speed of the interpreter.
* Extend pdb with remo
Nick Ellson wrote:
> Hello!
>
> I have a very specific question related to the output of a Vendors API
> (Palo Alto Networks "pan.xapi" and how I might farm data from this output.
> I am new to python, doing well in the tutorials, but this is an automation
> task at work and I know the rest will
Venugopal Reddy wrote:
> Thanks for Help Sir,
>
> Am using " for feature in tree.findall(
>
> ".//{urn:ford/interface/VehicleOrder/LegacyFeatureMapping/v2}PortInstalledOptionFeature"):
> ) "
>
> Please sir help me
>
> Here also this findall Method is not return any list value
Thanks for Help Sir,
Am using " for feature in tree.findall(
".//{urn:ford/interface/VehicleOrder/LegacyFeatureMapping/v2}PortInstalledOptionFeature"):
) "
Please sir help me
Here also this findall Method is not return any list values.
On Wednesday, October 15, 2014 1:03:00 PM UTC
Hello!
I have a very specific question related to the output of a Vendors API
(Palo Alto Networks "pan.xapi" and how I might farm data from this output.
I am new to python, doing well in the tutorials, but this is an automation
task at work and I know the rest will be much easier once i get past t
On 10/14/2014 01:04 AM, Revenant wrote:
Hi all!
I'm new to Python and programming in general, and am trying to learn as much as
I can about it.
Anyway, for a basic first program I made a simple game of Paper, Rock,
Scissors. For this program, I incorporated a main menu that presented three
d
Venugopal Reddy wrote:
> Actuvally am having below XML File:
>
>
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
> xmlns:a="urn:ford/VehicleOrder/LegacyFeatureMapping/v2.0"
> xmlns:b="urn:ford/VehicleOrder/SingleOrderEdit/v1.0"
> xmlns:c="urn:ford/interface/VehicleOrder/LegacyFe
On 15/10/2014 12:23 PM, Juan Christian wrote:
Using PyCharm is easy:
File > Settings > (IDE Settings) Editor > Smart Keys > Reformat on paste
> choose "Reformat Block"
This isn't as straight forward as you imply. Say I have misindented code
like this:
if True:
print 'true'
els
Hello everyone,
I have a .sol file at my hand and I wish to make it an xml file so that its a
bit more convenient to read and skim off data from an xml file. But to do that,
I need to write a function to read the values in the .sol file. What I intend
is when I read the line z_ something, i nee
61 matches
Mail list logo