Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: How many languages do you use.
Post: RE: How many languages do you use.

Probably at any given time, I’d expect a professional developer to at least use say three languages - the main language they program in, something for data management (SQL or similar) and a scripting ...
jim2007 Bar 5 2,800 Feb-24-2020, 09:07 AM
    Thread: How to write test cases for a init function by Unit test in python?
Post: RE: How to write test cases for a init function by...

In a nutshell create an instance of the class and check that whatever should have been performed were in fact carried out. Check if properties were correctly set, do method return the correct values ...
jim2007 General Coding Help 2 3,109 Feb-24-2020, 08:53 AM
    Thread: Converting SQL Code To Python Code Query
Post: RE: Converting SQL Code To Python Code Query

(Feb-13-2020, 09:43 PM)eddywinch82 Wrote: Thanks for that info Larz60+, I see you can't simply, have SQL code translated into Python Code, using SQLAlchemy ? Code has to be executed, as part of qu...
jim2007 General Coding Help 13 29,248 Feb-15-2020, 06:03 PM
    Thread: how to extract financial data from photocopy of document
Post: RE: how to extract financial data from photocopy o...

(Feb-14-2020, 07:52 AM)angela1 Wrote: However, it seems there are some companies not having XBRL format document. That is unfortunate. Any chance they might have them on their own websites by any c...
jim2007 Data Science 6 3,680 Feb-15-2020, 05:50 PM
    Thread: urllib.error.HTTPError: HTTP Error 404: Not Found
Post: RE: urllib.error.HTTPError: HTTP Error 404: Not Fo...

Line 14, you've got 4 Ws in the url: 'https://wwww.googleapis.com/youtube/v3/search?'
jim2007 Web Scraping & Web Development 4 8,719 Feb-13-2020, 06:03 PM
    Thread: Is it mandatory to call superclass init inside the class init?
Post: RE: Is it mandatory to call superclass init inside...

No it is not, but it is good practice to do so and it is the expected way things work... The __init__ function is used to set everything up when you create an instance of the class, so users of class...
jim2007 General Coding Help 3 6,029 Feb-13-2020, 05:58 PM
    Thread: how to extract financial data from photocopy of document
Post: RE: how to extract financial data from photocopy o...

Is it an actual PDF document or just an image embedded in a PDF? If so there is not much you can do. Is there a reason why you can’t use the XBRL format instead?
jim2007 Data Science 6 3,680 Feb-12-2020, 11:31 PM
    Thread: Fixing "PermissionError: [Errno 13] Permission denied"
Post: RE: Fixing "PermissionError: [Errno 13] Permission...

(Feb-10-2020, 07:45 PM)puredata Wrote: Would you have any input about this? Thanks a lot again in advance! I would stick it into the same if block that handed files (if entry.is_file():)
jim2007 General Coding Help 17 72,466 Feb-10-2020, 10:29 PM
    Thread: understanding basic loop behaviour
Post: RE: understanding basic loop behaviour

There is code inside the while loop... try: state_list.remove(vowel) except: breakPut a break point on it and you will see. [Image: https://i.postimg.cc/5ND2hhK4/python-1.png]
jim2007 General Coding Help 5 2,876 Feb-10-2020, 06:20 PM
    Thread: Fixing "PermissionError: [Errno 13] Permission denied"
Post: RE: Fixing "PermissionError: [Errno 13] Permission...

So I did the same, but it is a function that returns a list of files: import os from typing import List FileList = List[str] def get_list_of_files(base_folder: str, files: FileList) -> None: ...
jim2007 General Coding Help 17 72,466 Feb-10-2020, 04:51 PM
    Thread: Fixing "PermissionError: [Errno 13] Permission denied"
Post: RE: Fixing "PermissionError: [Errno 13] Permission...

Have a read of this, it should get you off the starting block in finding a list of files: https://realpython.com/working-with-files-in-python/
jim2007 General Coding Help 17 72,466 Feb-09-2020, 04:53 AM
    Thread: How can I paste an entire file from clipboard to a folder?
Post: RE: How can I paste an entire file from clipboard ...

Your ability to do something like this would be dependent on how good your knowledge of Windows system programming is. Basically when you copy a file to the clipboard in Explorer, it puts the necessa...
jim2007 General Coding Help 5 8,475 Feb-08-2020, 11:51 AM
    Thread: Fixing "PermissionError: [Errno 13] Permission denied"
Post: RE: Fixing "PermissionError: [Errno 13] Permission...

It is almost certainly an issue with passing the correct file name to the function. Try hard coding one of the file names into the my_zip variable and see if it runs without error.
jim2007 General Coding Help 17 72,466 Feb-08-2020, 11:28 AM
    Thread: Frustrations with Test & Dev Environments
Post: RE: Frustrations with Test & Dev Environments

No not in about 15 years. The technology is mature at this stage. One big issue is where tests are unknowingly dependent on each other. For example one person creates a test based on a set of dat...
jim2007 Bar 6 2,483 Feb-07-2020, 11:05 PM
    Thread: Fixing "PermissionError: [Errno 13] Permission denied"
Post: RE: Fixing "PermissionError: [Errno 13] Permission...

So two things to check: - Check if you can create a file in the folder with notepad for instance - Your variable my_zip points to a folder name and not a file. It should be something like: my_zip ...
jim2007 General Coding Help 17 72,466 Feb-07-2020, 10:50 PM
    Thread: Fixing "PermissionError: [Errno 13] Permission denied"
Post: RE: Fixing "PermissionError: [Errno 13] Permission...

Is there a folder called C:\Users\username on your machine? That looks very strange in the error message you posted. I would expect it to be C:\Users\<your login Id>\My_Dataset
jim2007 General Coding Help 17 72,466 Feb-06-2020, 11:52 PM
    Thread: Frustrations with Test & Dev Environments
Post: RE: Frustrations with Test & Dev Environments

Well most places of any size at this point runs some kind of CI environment and you follow the procedures - you write your code as required, check it in, it gets checked out, built, deployed, tested a...
jim2007 Bar 6 2,483 Feb-06-2020, 11:35 PM
    Thread: Equality in Python
Post: RE: Equality in Python

Think of it this way, you are learning a foreign language and in this new language the word for equal is == and the word for assignment is = and that is it. Just as equals and assignment are not rela...
jim2007 General Coding Help 8 3,426 Feb-06-2020, 12:33 AM
    Thread: Frustrations with Test & Dev Environments
Post: RE: Frustrations with Test & Dev Environments

What kind of testing are you talking about? The testing a developer does at his desktop, the company’s formal testing environment?
jim2007 Bar 6 2,483 Feb-05-2020, 11:54 PM
    Thread: SQLAlchemy - Program Name in SQL Workbench
Post: RE: SQLAlchemy - Program Name in SQL Workbench

It is not a coding issue. As far as I can see it a feature deficit in SQLAlchemy. There just is no way to indicate to MySQL the name of program owning the connection. This becomes a support issue b...
jim2007 General Coding Help 4 2,686 Feb-02-2020, 02:04 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020