Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: How to prevent Command Promt from closing when I turn it off in Python?
Post: How to prevent Command Promt from closing when I t...

I am very new to python. I have a little program and I want it run in the following order : - First I set a method time.sleep(10) within code to suspends execution for the 10 seconds in my test file....
binhduonggttn General Coding Help 1 1,994 Mar-06-2020, 07:17 AM
    Thread: How to write test cases for a init function by Unit test in python?
Post: How to write test cases for a init function by Uni...

I'm new in Python. I have a __init__ function with information about data sink config and I have to write some test cases fot it. But init is a function which doesn't return any result so it confuses ...
binhduonggttn General Coding Help 2 3,118 Feb-24-2020, 04:47 AM
    Thread: AttributeError: type object 'FunctionNode' has no attribute '_TestValidateFuncLabel__
Post: AttributeError: type object 'FunctionNode' has no ...

I have a file to validate the label #configmanager.py class FunctionNode(object): def __validate_func_label(self, func_label): pattern = re.compile('^fn[1-9][0-9]{0,1}$') if not p...
binhduonggttn General Coding Help 0 2,246 Feb-19-2020, 11:29 AM
    Thread: How to write test cases by Unit test for database configuration file?
Post: How to write test cases by Unit test for database ...

I have a yaml file containing database configuration information and a python file to check connect to database via that configuration file. Then I writed some test cases in python file. There's a Fun...
binhduonggttn General Coding Help 0 2,558 Feb-18-2020, 08:03 AM
    Thread: How to use unittest module ?
Post: How to use unittest module ?

I have a YAML config file and a Python ConfigManager file used to check connection to database. I need to write some test cases for my ConfigManager file : 1. If the database is none then test case f...
binhduonggttn General Coding Help 1 2,039 Feb-16-2020, 01:06 PM
    Thread: Read Yaml configuration file in Python
Post: Read Yaml configuration file in Python

I wrote a program to read a Yaml configuration file and display it to the terminal. Now I want to try something like checking if the database (db) in the yaml file is not Sqlite or Postgres then excep...
binhduonggttn General Coding Help 1 2,081 Feb-11-2020, 02:43 AM
    Thread: Help me with Asyncio.
Post: RE: Help me with Asyncio.

(Feb-01-2020, 03:55 PM)DeaD_EyE Wrote: In your async function, you're using synchronous functions, which are blocking calls. Maybe you can speed it up with the async version of psycopg2: https://git...
binhduonggttn General Coding Help 2 2,457 Feb-01-2020, 04:02 PM
    Thread: Help me with Asyncio.
Post: Help me with Asyncio.

Hi guys, I have a script to migrate database from Sqlite to Postgres. My original scipt works, but when I try to use Asyncio to speed up program, my new code running slower than the original a few sec...
binhduonggttn General Coding Help 2 2,457 Feb-01-2020, 12:00 PM
    Thread: Error SQLite objects created in a thread can only be used in that same thread.
Post: RE: Error SQLite objects created in a thread can o...

@ibreeden You're right. I've removed it but it's still running fail. I asked Stackoverflow, they said I have two threads, the first is the "__main__" thread, the second is .Thread(target = copyTable, ...
binhduonggttn General Coding Help 3 15,579 Jan-31-2020, 10:43 AM
    Thread: Error SQLite objects created in a thread can only be used in that same thread.
Post: Error SQLite objects created in a thread can only ...

My script used to migrate data from SQLite to Postgres in Python. I'm using threading module to speed up transfer tables but I got a error Error:sqlite3.ProgrammingError: SQLite objects created in a t...
binhduonggttn General Coding Help 3 15,579 Jan-31-2020, 07:37 AM
    Thread: How can I use concurrency to migrate database in Python?
Post: RE: How can I use concurrency to migrate database ...

Thanks, its working, but what is the different ?
binhduonggttn General Coding Help 4 2,538 Jan-31-2020, 03:08 AM
    Thread: How can I use concurrency to migrate database in Python?
Post: How can I use concurrency to migrate database in P...

I have a script used to migrate data from SQLite to Postgres. I just use a for loop to transfer tables one by one. Now, I want to experiment with transfering multiple tables in concurrency using threa...
binhduonggttn General Coding Help 4 2,538 Jan-30-2020, 08:28 AM

User Panel Messages

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