Hallo,
I want to synchronize the main function of my script. I havn't a class
structure in my script.
def main():
# my code to synchronized
if __name__=='__main__':
main()
How can I resolve this problem simply?
Thank's for your hints, Thomas 8 1645
Thomas Rademacher wrote: Hallo,
I want to synchronize the main function of my script. I havn't a class structure in my script.
def main(): # my code to synchronized
if __name__=='__main__': main()
How can I resolve this problem simply?
What do you mean here by "synchronize"? Normally, I believe,
it's a term used in multithreaded applications... it has
nothing to do with "class structures" or anything else other
than as a means to coordinate two or more threads of execution.
(Guessing) If you have seen examples of code that does
synchronize but it's all based on subclasses of threading.Thread,
then maybe you just need to know that the main thread is
actually wrapped with a proxy in the threading class when
it's imported, and you can just use any normal synchronization
technique that you would have used in a thread subclass...
(somehow I doubt that's where you were going with this).
-Peter
Peter Hansen wrote: Thomas Rademacher wrote:
Hallo,
I want to synchronize the main function of my script. I havn't a class structure in my script.
def main(): # my code to synchronized
if __name__=='__main__': main()
How can I resolve this problem simply?
What do you mean here by "synchronize"? Normally, I believe, it's a term used in multithreaded applications... it has nothing to do with "class structures" or anything else other than as a means to coordinate two or more threads of execution.
(Guessing) If you have seen examples of code that does synchronize but it's all based on subclasses of threading.Thread, then maybe you just need to know that the main thread is actually wrapped with a proxy in the threading class when it's imported, and you can just use any normal synchronization technique that you would have used in a thread subclass... (somehow I doubt that's where you were going with this).
"In the face of ambiguity, refuse the temptation to guess" :-)
One of the best features of c.l.py is how questions phrased in the most
ambiguous terms are often slowly elaborated into meaningful enquiries.
regards
Steve
Steve Holden wrote: "In the face of ambiguity, refuse the temptation to guess" :-)
One of the best features of c.l.py is how questions phrased in the most ambiguous terms are often slowly elaborated into meaningful enquiries.
Sometimes, and more so lately, *painfully* slowly. I'm somewhat
saddened by the waste involved in some of those threads where the
OP posts a vague question, we all spend days replying with various
guesses at what was really intended, and then finally the OP
posts again (and sometimes they don't even do us that courtesy!)
and says merely "oh, it wasn't that complicated, I just meant X"
and it turns out to have been a FAQ item anyway. :-(
But then, Steve, you're an optimist and I'm not. ;-)
-Peter
Peter Hansen wrote: Steve Holden wrote:
One of the best features of c.l.py is how questions phrased in the most ambiguous terms are often slowly elaborated into meaningful enquiries. Sometimes, and more so lately, *painfully* slowly. I'm somewhat saddened by the waste involved in some of those threads where the OP posts a vague question, we all spend days replying with various guesses at what was really intended, and then finally the OP posts again (and sometimes they don't even do us that courtesy!) and says merely "oh, it wasn't that complicated, I just meant X" and it turns out to have been a FAQ item anyway. :-(
While I'm in complete agreement with your sentiments above, Peter,
newsgroup dynamics *are* difficult. Speaking for myself, both you and
Steve (and virtually all other respondents) have been *quite* helpful
and friendly to me. But attempting to follow the customs of a group
can be a bit intimidating for some newer posters. While I'm not
intimidated (alas, eh? ;-) ), I've been told by different long-term
posters -- all with the best of intentions, I firmly believe -- that
I've given too *much* information in some cases, as well as too
*little* information in other cases. (And usually, they were correct.
;-) ) I'm fully capable of adjusting up and learning as needed -- and
I most *certainly* don't take any of this personally, in any case.
However, many of the newbies may not fare so well.
Mostly, in this group, people are quite civil and mature -- even in
the face of repeated problems such as you mention above. But that is
not the case universally -- here, or in any other group. Indeed, in
the world at large.
I have no answers, as it were. Likely, we're all going to have to hold
on tight as we careen into this 'Fraid New World, stumbling along,
working things out as we go. :-)
But then, Steve, you're an optimist and I'm not. ;-)
;-)
cautiously-pessimistically y'rs,
Richard Hanson
--
sick<PERI0D>old<P0INT>fart<PIE-DEC0-SYMB0L>newsguy<MARK>com
Peter Hansen schrieb: Sometimes, and more so lately, *painfully* slowly. I'm somewhat saddened by the waste involved in some of those threads where the OP posts a vague question, we all spend days replying with various guesses at what was really intended, and then finally the OP posts again (and sometimes they don't even do us that courtesy!) and says merely "oh, it wasn't that complicated, I just meant X" and it turns out to have been a FAQ item anyway. :-(
The best way to minimize c.l.py effort is to behave like an expert
system:
synchronize: unknown. Please explain.
--
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Tel +49-241-93878-0
E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64')
-------------------------------------------------------------------
Peter Maas wrote: Peter Hansen schrieb:
Sometimes, and more so lately, *painfully* slowly. I'm somewhat saddened by the waste involved in some of those threads where the OP posts a vague question, we all spend days replying with various guesses at what was really intended, and then finally the OP posts again (and sometimes they don't even do us that courtesy!) and says merely "oh, it wasn't that complicated, I just meant X" and it turns out to have been a FAQ item anyway. :-(
The best way to minimize c.l.py effort is to behave like an expert system:
synchronize: unknown. Please explain.
Maybe, but then I get emails telling me I'm being rude. :-(
Peter Hansen <pe***@engcorp.com> writes: Maybe, but then I get emails telling me I'm being rude. :-(
If we send you emails telling you you're nice would you do that? :-)
Maybe making a weekly "admin" post with guidelines and directions on
where to look first is a good thing. All the people that are not
interested on that can filter it out...
Be seeing you,
--
Godoy. <go***@ieee.org>
Peter Hansen wrote: Peter Maas wrote:
Peter Hansen schrieb:
Sometimes, and more so lately, *painfully* slowly. I'm somewhat saddened by the waste involved in some of those threads where the OP posts a vague question, we all spend days replying with various guesses at what was really intended, and then finally the OP posts again (and sometimes they don't even do us that courtesy!) and says merely "oh, it wasn't that complicated, I just meant X" and it turns out to have been a FAQ item anyway. :-( The best way to minimize c.l.py effort is to behave like an expert system:
synchronize: unknown. Please explain.
Maybe, but then I get emails telling me I'm being rude. :-(
Well Thomas, who asked the original question, has been so dumbstruck by
this outpouring of irrelevant response that he has thereafter failed to
enlighten us about what he really wants. So I guess we are talking to
ourselves here :-)
regards
Steve This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Roger Godefroy |
last post by:
Hi,
I have to develop a customer relation application. I would like to
synchronize databases, so the user can work at the office and at home.
Internet isn't available at home. What would be the...
|
by: alex via SQLMonster.com |
last post by:
Hi, anybody can help me.
How can i synchronize 2 tables on 2 different sql servers 2000
i mean TABLE1(col1, col2, col3, col4) and
TABLE1(col1, col2, col3, col4, col5, col6)
the first 3...
|
by: gene.ellis |
last post by:
Using a web interface, I am placing text into a SQL database. From time
to time, I would like to synchronize one of my other tables in the
database with the table that I am inserting content into....
|
by: Zlatko Matić |
last post by:
There is a form (single form) and a combobox. I want that current record of
the form is adjusted according to selected value in the combobox. Cuurrent
record should be the same as the value in the...
|
by: Hewit |
last post by:
DataTable Class documentation says.
Thread Safety
"This type is safe for multithreaded read operations. You must synchronize
any write operations."
In my web based application (ASP.Net)...
|
by: Rodusa |
last post by:
I am trying to Synchronize anonymous users with authenticated uses
using Profile_MigrateAnonymous. However Profile_MigrateAnonymous only
carries information in one direction, for instance, if I...
|
by: Stephen |
last post by:
Hi,
Is there a sample application using ASP .NET to synchronize folder contents?
I want to synchronize folder contents on 2 different machines
Thanks,
Stephen
|
by: sfeher |
last post by:
Hi All,
I need to synchronize on multiple event notifications.
After loading a number of scripts in my page ( using
document.createElement('script') / appendChild ) I get a notification
for...
|
by: nzkks |
last post by:
Hi, I am using these: ASP.Net 2.0, VB.Net, Visual Studio 2005, SQL Server 2005
In a asp.net page, I have two multiview controls each has 2 views & its corresponding 2 menu items named Metric &...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |