On Thu, May 25, 2017 at 1:01 AM, Abdur-Rahmaan Janhangeer
wrote:
> a basic idea would be to get a webpage and put your code there. This is
> where you edit your codes
>
> Now you make a program which has
> - an updater
> - the script to execute in a separate file
>
> the updater each times pull th
I have some Python 3.6.0 scripts that my co-workers use for some small
and medium tasks. Whenever I have time I fix some bugs and add some
features to said scripts to make their lives (and mine :D) easier, but
there's a problem: I need to send a new script via email/chat/whatever
and they have to r
On Fri, Jan 27, 2017 at 7:47 PM, Jim wrote:
>
> [...] This question seems a little dumb and maybe I am being a little dense,
> but then what?
Imagine that you are working on 5 different Python projects, each
using different packages with different versions. We can break this
down in two situatio
On Mon, Dec 12, 2016 at 2:29 PM, Bryon Adams wrote:
> Is there a way to force my argument to always be a string before entering
> the function?
You could do the following:
1. Use `def ip_checker(ip_address: str):` to make it more clear that
you're expecting a str, but remember, this is just a "h
On Dec 10, 2016 12:15 PM, "Tetteh, Isaac - SDSU Student"
> isaac.tet...@jacks.sdstate.edu> wrote:
> >
> > Hello,
> >
> > I am trying to find the number of times a word occurs on a webpage so I
> used bs4 code below
> >
> > Let assume html contains the "html code"
> > soup = BeautifulSoup(html, "htm
On Wed, Nov 30, 2016 at 12:29 AM, Parish Watteau
wrote:
> A program that will read each player’s name and golf score as
> keyboard input, and then save these as records in a file named golf.txt.
> (Each record will have a field for the player’s name and a field for the
> player’s score.)
On Tue, Nov 29, 2016 at 7:12 AM, Alan Gauld via Tutor
wrote:
> I just noticed the last bit.
> Is this a client side API or a server side API?
> In other words are you building a set of services on the
> server or are you building a module that makes it easy
> for client side programs to access the
On Mon, Nov 28, 2016 at 11:33 PM, Alan Gauld via Tutor
wrote:
>
> On 28/11/16 21:53, Juan C. wrote:
> > I'm a student and my university uses Moodle as their learning management
> > system (LMS).
>
> Never heard of it but hopefully that doesn't matter :-)
>
I'm a student and my university uses Moodle as their learning management
system (LMS). They don't have Moodle Web Services enabled and won't be
enabling it anytime soon, at least for students. The university programs
have the following structure, for example:
1. Bachelor's Degree in Computer Scien
On Thu, Nov 24, 2016 at 9:14 PM, urfa jamil wrote:
>
> I need help to write a code for this problem.
>
> Please help
>
>
> Ask the user to enter a series of numbers. Stop reading numbers when they
enter a negative number. Calculate the average of the numbers given not
including the final negative
On Sun, Mar 29, 2015 at 9:39 PM Juan C. wrote:
The ID is set by the API, I don't have control over it, I can't modify it,
and I don't really need to modify it. There is an option to search the API
using the name, like so (
http://private-anon-37abaab74-themoviedb.apiary-mock.com/
On Sun, Mar 29, 2015 at 8:55 PM Alan Gauld
wrote:
Can you explain how that works? Does the user create their own
random unique values? Do you use a source of unique keys?
Or could the Actor init() maybe generate an ID for the user?
But without the API knowing the ID, how does the correct data get
Ok, applying what you guys said I have:
- folder: pycinema
- package: pycinema
- - core.py
- - mdb.py
- __main__.py
Current code on core.py:
# -*- coding: utf-8 -*-
from pycinema.mdb import MovieDB
API = MovieDB('API KEY GOES HERE')
class Actor:
def __init__(self, actor_id):
api = API.get_act
On Sun, Mar 29, 2015 at 3:56 AM Ben Finney
wrote:
As a side issue: You apparently intend to choose names that are English
language.
If that's true, you should know that “actor”, “movie”, “series” are all
singular.
My bad, it's series indeed.
On Sun, Mar 29, 2015 at 10:33 AM Dave Angel wrote:
On Sat, Mar 28, 2015 at 10:26 PM Mark Lawrence
wrote:
If your classes are small put them in one source file, which is clearly
simpler than your proposed structure. Why over-engineer something if
there is no need to?
Well, my classes won't be that small, and separating them by modules would
be eas
Ok, so, let me try to express what I think is 'right' here according to
what you said.
My code structure needs to be something like that:
pycinema
- package: pycinema
- - __init__.py
- - api.py
- - actor.py
- - movie.py
- - serie.py
- __main__.py
And why I use it this way?
1. You said that I ne
On Sat, Mar 28, 2015 at 5:23 PM Alan Gauld
wrote:
> That looks like a data oriented class, which may not be a bad thing but
you should also be thinking about the methods. What will a series object
do in the context of your application? How will those data attributes help
the methods do their job?
So, I'm trying to create a little script here using OO to learn it, and I
got some questions:
The script uses the Movie DB API, and I have a Series module.
In this module I have 3 classes, 'Serie', 'Season' and 'Episode'. In
__main__.py I will instantiate a serie like so 'some_random_name =
Serie
The code is fine, the email should have ruined the indentation. Anyway,
indeed, I only saw the 403 error and didn't even read the rest as I thought
it was only HTML/CSS code, my bad.
Tried with other pages and everything is working, thanks.
___
Tutor mai
Code:
# !/usr/bin/env python3
# -*- coding: utf-8 -*-
import socket
def main():
target_host = 'www.google.com'
target_port = 80
client = socket.socket()
client.connect((target_host, target_port))
client.send(b"GET HTTP/1.1\r\nHost:google.com\r\n\r\n")
response = client.recv(4096)
print(respons
20 matches
Mail list logo