Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: WxPython Line Number
Post: WxPython Line Number
Does wxPython's have a line number option for any of the textboxes, like Notepad++? |
|
QueenSvetlana |
GUI |
0 |
2,414 |
Dec-14-2017, 03:42 AM |
|
|
Thread: Preserve Encapsulation while Displaying Information
Post: RE: Preserve Encapsulation while Displaying Inform...
(Dec-07-2017, 04:31 PM)QueenSvetlana Wrote: (Dec-07-2017, 04:26 PM)Windspar Wrote: @Mekire @snippsat
It might not be absolute private and name mangling. But docs say to use as such. section 9.6
So... |
|
QueenSvetlana |
General Coding Help |
13 |
7,027 |
Dec-07-2017, 04:48 PM |
|
|
Thread: Preserve Encapsulation while Displaying Information
Post: RE: Preserve Encapsulation while Displaying Inform...
(Dec-07-2017, 04:26 PM)Windspar Wrote: @Mekire @snippsat
It might not be absolute private and name mangling. But docs say to use as such. section 9.6
So it is python way of support private class var... |
|
QueenSvetlana |
General Coding Help |
13 |
7,027 |
Dec-07-2017, 04:31 PM |
|
|
Thread: Preserve Encapsulation while Displaying Information
Post: RE: Preserve Encapsulation while Displaying Inform...
I think @Mekire provided the answer I was looking for. Which brings me to another question, if getter/setters shouldn't be used, how do I indicate to someone using my code that they should treat a var... |
|
QueenSvetlana |
General Coding Help |
13 |
7,027 |
Dec-07-2017, 03:21 PM |
|
|
Thread: Preserve Encapsulation while Displaying Information
Post: Preserve Encapsulation while Displaying Informatio...
Suppose I've got the following class to represent a Car and Tire
class Tire:
def __init__(self, id, name, type):
self.id = id
self.name = name
self.type = type
@prop... |
|
QueenSvetlana |
General Coding Help |
13 |
7,027 |
Dec-07-2017, 02:31 AM |
|
|
Thread: Variable Scope for Scripts
Post: RE: Variable Scope for Scripts
(Dec-01-2017, 06:01 PM)snippsat Wrote: (Dec-01-2017, 02:59 PM)QueenSvetlana Wrote: The way I've declared file_name and files_to_backup are not in a global way, correct?That's not correct the are i... |
|
QueenSvetlana |
General Coding Help |
6 |
4,272 |
Dec-01-2017, 07:40 PM |
|
|
Thread: Variable Scope for Scripts
Post: RE: Variable Scope for Scripts
(Dec-01-2017, 02:40 PM)snippsat Wrote: Try to avoid global variables **wall** at all cost,is a good rule.
The way I've declared file_name and files_to_backup are not in a global way, correct? The pr... |
|
QueenSvetlana |
General Coding Help |
6 |
4,272 |
Dec-01-2017, 02:59 PM |
|
|
Thread: Variable Scope for Scripts
Post: Variable Scope for Scripts
I just came across the book Code Complete, 2nd Ed on amazon. It comes with a checklist to ensure you write maintainable code.
Under Chapter 10: General Issues In Using Variables
Other General Issues... |
|
QueenSvetlana |
General Coding Help |
6 |
4,272 |
Dec-01-2017, 03:34 AM |
|
|
Thread: Immutable Book Class
Post: RE: Immutable Book Class
(Nov-27-2017, 07:19 PM)nilamo Wrote: (Nov-27-2017, 06:53 PM)QueenSvetlana Wrote: but suppose if you had to model data that changes but wanted to keep it thread-safe how would you do it?
With a lo... |
|
QueenSvetlana |
General Coding Help |
10 |
6,294 |
Nov-27-2017, 07:24 PM |
|
|
Thread: Immutable Book Class
Post: RE: Immutable Book Class
(Nov-27-2017, 07:04 PM)buran Wrote: https://opensource.com/article/17/4/grok-gil
what happened to the other link? |
|
QueenSvetlana |
General Coding Help |
10 |
6,294 |
Nov-27-2017, 07:07 PM |
|
|
Thread: Immutable Book Class
Post: RE: Immutable Book Class
(Nov-27-2017, 06:50 PM)buran Wrote: (Nov-27-2017, 06:44 PM)QueenSvetlana Wrote: That being said, how would go about modelling the logs while keeping it thread safe?from your description I don't se... |
|
QueenSvetlana |
General Coding Help |
10 |
6,294 |
Nov-27-2017, 06:53 PM |
|
|
Thread: Immutable Book Class
Post: RE: Immutable Book Class
(Nov-27-2017, 06:37 PM)buran Wrote: why not use tuple, instead of list, if you want it immutable? Note that I don't think logs should be immutable - user may want to edit an old log
I wasn't thinkin... |
|
QueenSvetlana |
General Coding Help |
10 |
6,294 |
Nov-27-2017, 06:44 PM |
|
|
Thread: Immutable Book Class
Post: Immutable Book Class
from copy import deepcopy
class Book:
def __init__(self, book_title, authors):
self.book_title = book_title
self.authors = deepcopy(authors)
self.logs = []
def upda... |
|
QueenSvetlana |
General Coding Help |
10 |
6,294 |
Nov-27-2017, 06:23 PM |
|
|
Thread: Joining a Daemon Thread
Post: RE: Joining a Daemon Thread
(Nov-21-2017, 09:34 PM)Windspar Wrote: 1. Deamon threads are made to keep running until they are done or programming closes. So if you have a deamon thread that does not stop it self. Then it waitin... |
|
QueenSvetlana |
General Coding Help |
3 |
3,595 |
Nov-21-2017, 10:38 PM |
|
|
Thread: Joining a Daemon Thread
Post: Joining a Daemon Thread
I've asked this question twice (1,2), and for whatever reason I haven't been able to get an answer. Could someone please take a few minutes out of there day to help me?
I was reading about threads, m... |
|
QueenSvetlana |
General Coding Help |
3 |
3,595 |
Nov-21-2017, 06:14 PM |
|
|
Thread: When to call thread.join in a GUI application
Post: When to call thread.join in a GUI application
import wx
import json
import queue
import threading
class MyDialog(wx.Frame):
def __init__(self, parent, title):
self.no_resize = wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.M... |
|
QueenSvetlana |
General Coding Help |
0 |
2,123 |
Nov-14-2017, 06:12 PM |
|
|
Thread: Using Sqlite with WAL
Post: Using Sqlite with WAL
I've been following Python documentation on the SQLite tutorial and I managed to create an Employee table and write to it.
import sqlite3
conn = sqlite3.connect('employee.db')
c = conn.cursor()
fir... |
|
QueenSvetlana |
General Coding Help |
1 |
5,045 |
Nov-12-2017, 05:09 PM |
|
|
Thread: wxPython wxListBox Contains
Post: wxPython wxListBox Contains
Does wxListBox have the equivalent of C# ListBox.Items.Contains()? I looked into FindString() but I don't think that's it, or I'm not using FindString() right. |
|
QueenSvetlana |
GUI |
1 |
2,791 |
Nov-11-2017, 03:42 PM |
|
|
Thread: Reading a file without blocking the main thread
Post: Reading a file without blocking the main thread
I'm following up from this question. I implemented the asyncio wrong, so I decided to correct it, use a threadpoolexecuitor and ask for feedback.
I have a text file parsed like this:
Ann Marie,Smith... |
|
QueenSvetlana |
Code sharing |
0 |
2,711 |
Nov-09-2017, 04:17 PM |
|
|
Thread: Using asyncio to read text file and load GUI
Post: Using asyncio to read text file and load GUI
Goal: Using wxPython, load a combo box and read in a potentially huge text file to add to the list.
I have a text file with the names parsed with commas that looks like this:
Ann Marie,Smith,ams@com... |
|
QueenSvetlana |
General Coding Help |
1 |
4,813 |
Nov-08-2017, 02:39 AM |