Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6727847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:05:56+00:00 2026-05-26T10:05:56+00:00

when my program receiving new file file is copied fine but progress bar is

  • 0

when my program receiving new file file is copied fine but progress bar is not moving… if possible please suggest me a better algo.. Thanks

    def filetransfer(self):
        s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
        s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
        s.bind(('',30098))
        s.listen(1)
        data='val'
        while True:
            request = s.accept()
            if request!=None:
                new_sock,addr=request
                break
        print 'Connected by', addr
        destination=open(data,'wb')
        while data!='':
            time.sleep(0.01)
            start=time.time()
            data=new_sock.recv(1024)
            end=time.time()
            xact=int(end-start)
            destination.write(data)
            self.run(xact)      
       new_sock.close()
       s.close()
       return


    def run_(self,xact):
       gobject.timeout_add(xact, self.update)
    def update(self):       
        if self.progressbar.get_fraction() >= 1.0:
             value = 0.0
         else:
             value = self.progressbar.get_fraction() + 0.1
         self.progressbar.set_fraction(value) 
         percent = value * 100
         percent = str(int(percent))
         self.progressbar.set_text(percent + "%")
         return True
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:05:56+00:00Added an answer on May 26, 2026 at 10:05 am

    I’m not sure why so many people answer in the comments…

    You need to call “Update()” inside of a loop, as in the question posted in the comment above.

    Progress bar not updating during operation

    However, if this doesn’t work, please update the question so I can help you further.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am not sure what the problem is but I keep receiving this error
In my program, I have been receiving an error when I use a command-line
Program followed by output. Someone please explain to me why 10,000,000 milliseconds from Jan
My program generates relatively simple PDF documents on request, but I'm having trouble with
What program can I use to decompile a class file? Will I actually get
In my program there is one thread (receiving thread) that is responsible for receiving
New to socket programming. Got a couple questions: My program is really inconsistent with
Possible duplicates: UDP Response or Receiving a response through UDP I've been writing a
So here is my program for receiving UTD messages. I am planning to use
I've been receiving help with a program I've been working on from you guys

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.