Re: urgent
You need an IDE Check out: PyCharm Wing IDE Spyder ^^ Very few people use the in-built IDE -- https://mail.python.org/mailman/listinfo/python-list
Re: urgent
On 2021-09-02 09:56:38 -0500, Michael F. Stemper wrote: > On 31/08/2021 18.02, Barry wrote: > > The big problem with >>> is that it means a third level quote in > > email clients. So when people cut-n-paste REPL output it’s formatted > > badly by some > > email clients. A prompt that avoided that issue would be nice. > > A little bit of piping fixes that: [...] > username@hostname$ sed 's/^>>> /REPL> /' < text > username@hostname$ python3 > Python 3.5.2 (default, Jan 26 2021, 13:30:48) > [GCC 5.4.0 20160609] on linux > Type "help", "copyright", "credits" or "license" for more information. > REPL> import sys # in the original, this line will be messed up > REPL> sys.exit(0) # this one, too > username@hostname$ Yes, but then it doesn't look like the Python prompt anymore which may confuse the reader even more. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature -- https://mail.python.org/mailman/listinfo/python-list
Re: urgent
On 31/08/2021 18.02, Barry wrote: The big problem with >>> is that it means a third level quote in email clients. So when people cut-n-paste REPL output it’s formatted badly by email clients. A prompt that avoided that issue would be nice. A little bit of piping fixes that: username@hostname$ cat text username@hostname$ python3 Python 3.5.2 (default, Jan 26 2021, 13:30:48) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys # in the original, this line will be messed up >>> sys.exit(0) # this one, too username@hostname$ sed 's/^>>> /REPL> /' < text username@hostname$ python3 Python 3.5.2 (default, Jan 26 2021, 13:30:48) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. REPL> import sys # in the original, this line will be messed up REPL> sys.exit(0) # this one, too username@hostname$ -- Michael F. Stemper What happens if you play John Cage's "4'33" at a slower tempo? -- https://mail.python.org/mailman/listinfo/python-list
Re: urgent
On 2021-08-29, Hari wrote: > i was download ur python software but it is like boring user > interface for me like young student to learn ,can u have any > updates? Check the calendar, it must be September again... Well, almost. -- Grant Edwards grant.b.edwardsYow! Did I do an INCORRECT at THING?? gmail.com -- https://mail.python.org/mailman/listinfo/python-list
RE: urgent (actually NOT urgent at all.)
This is a bit sillier then some other discussions here! There are many programs (especially back when more command-line programs were used) that presented default prompts like "$" and many or most of them let you over-ride it. Can someone tell this person that if >>> is not pleasing, they can do something like: import sys sys.ps1 = "what do you wish Mistress? -=> " And this can be set per session or perhaps across all accounts in an installation as a default? Some people focus on minutiae rather than either accept a language as being what it is, or finding a different way that meets their needs. I occasionally have made the prompt empty for a while so I can more easily do cut and paste from it. All that is needed for some is to make whatever prompt be somewhat unique among the other prompts they normally face. Sure, on some screens there are ways to add color or even odd characters and graphics to some prompts but who needs sexy? Realistically, many of us do so much of the programming elsewhere as in some editor or environment, and especially a language like python where indentation levels are strictly a part of the language. -Original Message- From: Python-list On Behalf Of Barry Sent: Tuesday, August 31, 2021 7:02 PM Cc: Python-list@python.org Subject: Re: urgent > On 31 Aug 2021, at 16:53, jak wrote: > > Il 31/08/2021 03:05, Python ha scritto: >> Hari wrote: >>> i was download ur python software but it is like boring user >>> interface for me like young student to learn ,can u have any updates? >> God, let me die please... > > Oh no, please don't speak in that way ... evidently now that python > has reached its tenth version its prompt is a little boring. It may > need to be replaced. You could open a competition notice to vote on > the new prompt. I would vote for: > > :^P> The big problem with >>> is that it means a third level quote in email clients. So when people cut-n-paste REPL output it’s formatted badly by email clients. A prompt that avoided that issue would be nice. >>> print(“this is not a quoted reply”) Barry > > rofl > -- > https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
Re: urgent
On Wed, Sep 1, 2021 at 9:03 AM Barry wrote: > > > > > On 31 Aug 2021, at 16:53, jak wrote: > > > > Il 31/08/2021 03:05, Python ha scritto: > >> Hari wrote: > >>> i was download ur python software but it is like boring user interface for > >>> me like young student to learn ,can u have any updates? > >> God, let me die please... > > > > Oh no, please don't speak in that way ... evidently now that python has > > reached its tenth version its prompt is a little boring. It may need to > > be replaced. You could open a competition notice to vote on the new > > prompt. I would vote for: > > > > :^P> > > The big problem with >>> is that it means a third level quote in email > clients. > So when people cut-n-paste REPL output it’s formatted badly by email clients. > A prompt that avoided that issue would be nice. > > >>> print(“this is not a quoted reply”) > Welp, gonna have to convince people that the Python 3000 decision needs to be reversed :) https://www.python.org/dev/peps/pep-3099/#interactive-interpreter ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: urgent
> On 31 Aug 2021, at 16:53, jak wrote: > > Il 31/08/2021 03:05, Python ha scritto: >> Hari wrote: >>> i was download ur python software but it is like boring user interface for >>> me like young student to learn ,can u have any updates? >> God, let me die please... > > Oh no, please don't speak in that way ... evidently now that python has > reached its tenth version its prompt is a little boring. It may need to > be replaced. You could open a competition notice to vote on the new > prompt. I would vote for: > > :^P> The big problem with >>> is that it means a third level quote in email clients. So when people cut-n-paste REPL output it’s formatted badly by email clients. A prompt that avoided that issue would be nice. >>> print(“this is not a quoted reply”) Barry > > rofl > -- > https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
Re: urgent
Hi, On Tue, Aug 31, 2021 at 12:44 AM Hari wrote: > > Yes, I can. Why do you want python? > option: ? What do you mean - "option". I am actually asking you why you want python? > What task do you want to solve with python? > option: ? See above. > Why python? > option: ? > Why not any other language? > option: ? Those 2 depend on the task at hand. Thank you. > > > On Tue, Aug 31, 2021 at 3:08 AM Igor Korot wrote: >> >> Hi, >> >> On Mon, Aug 30, 2021 at 4:34 PM Hari wrote: >> > >> > i was download ur python software but it is like boring user interface for >> > me like young student to learn ,can u have any updates? >> >> Can you elaborate a little: >> Why do you want python? >> What task do you want to solve with python? >> Why python? Why not any other language? >> >> Thank you. >> >> > -- >> > https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
Re: urgent
Yes, I can. Why do you want python? option: ? What task do you want to solve with python? option: ? Why python? option: ? Why not any other language? option: ? On Tue, Aug 31, 2021 at 3:08 AM Igor Korot wrote: > Hi, > > On Mon, Aug 30, 2021 at 4:34 PM Hari > wrote: > > > > i was download ur python software but it is like boring user interface > for > > me like young student to learn ,can u have any updates? > > Can you elaborate a little: > Why do you want python? > What task do you want to solve with python? > Why python? Why not any other language? > > Thank you. > > > -- > > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list
Re: urgent
Il 31/08/2021 03:05, Python ha scritto: Hari wrote: i was download ur python software but it is like boring user interface for me like young student to learn ,can u have any updates? God, let me die please... Oh no, please don't speak in that way ... evidently now that python has reached its tenth version its prompt is a little boring. It may need to be replaced. You could open a competition notice to vote on the new prompt. I would vote for: :^P> rofl -- https://mail.python.org/mailman/listinfo/python-list
Python UI (was Re: urgent)
On 29/08/2021 11:28, Hari wrote: > i was download ur python software but it is like boring user interface I agree it is a boring user interface. Just 3 chevrons: >>> You can change it a little if you want but ultimately its just an invitation to type commands. What kind of interface did you have in mind? If you want a GUI to develop code there are literally dozens of those. But ultimately programming is about typing text into an editor. > me like young student to learn ,can u have any updates? There are many tools to help you work with python. If you tell us what kind of things you want we can tell you where to find them (if they exist!) But the basic Python interpreter is primarily there to run your programs, it's hard to see how you can make that less boring without also making it very inefficient. And professional users would hate that! -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos -- https://mail.python.org/mailman/listinfo/python-list
Re: urgent
Hi, On Mon, Aug 30, 2021 at 4:34 PM Hari wrote: > > i was download ur python software but it is like boring user interface for > me like young student to learn ,can u have any updates? Can you elaborate a little: Why do you want python? What task do you want to solve with python? Why python? Why not any other language? Thank you. > -- > https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
Re: Urgent
On 2020-07-13 17:08, Damilare wrote: I need help, am trying to activate python 3.8 on command prompt with Windows 10 but it’s proving rather difficult. I will appreciate any help. Thanks Why is it difficult? (Why doesn't the subject give a clue as to the topic of the post?) If it's saying that it can't find python.exe, try starting it with the Python launcher "py". -- https://mail.python.org/mailman/listinfo/python-list
Re: ***URGENT CONTRACT OPPORTUNITY***
Ian Kelly wrote: The ad said ASAP, so I guess that now it's already too late. Also they apparently want someone who can start with three exclamation marks. That rules me out, I only have two left over from my last job. -- Greg -- https://mail.python.org/mailman/listinfo/python-list
Re: ***URGENT CONTRACT OPPORTUNITY***
On Wed, Mar 28, 2018 at 9:02 AM, Tobiahwrote: > > When should I apply? The ad said ASAP, so I guess that now it's already too late. -- https://mail.python.org/mailman/listinfo/python-list
Re: ***URGENT CONTRACT OPPORTUNITY***
On 03/28/2018 06:45 AM, cagdenw...@gmail.com wrote: opportunity in Tours, France starting ASAP!!! and able to start ASAP!!! contact me ASAP When should I apply? -- https://mail.python.org/mailman/listinfo/python-list
Re: Urgent - Would like to see output of each block of python
On Monday, June 6, 2016 at 12:35:55 PM UTC+5:30, Chris Rebert wrote: > On Sun, Jun 5, 2016 at 11:57 PM, Archana Sonavane >wrote: > > Hi Team, > > > > I don't have any idea about python scripts, i have ganglia tool python > > scripts. > > > > I would like see the output of each code block, could you please guide. > > > > The code as follows: > > > With regard to your Subject line, please don't attempt to mark posts > as "urgent". > See http://www.catb.org/esr/faqs/smart-questions.html#urgent > > Regards, > Chris Ok.. Sorry, next time will take care. -- https://mail.python.org/mailman/listinfo/python-list
Re: Urgent - Would like to see output of each block of python
On Sun, Jun 5, 2016 at 11:57 PM, Archana Sonavanewrote: > Hi Team, > > I don't have any idea about python scripts, i have ganglia tool python > scripts. > > I would like see the output of each code block, could you please guide. > > The code as follows: With regard to your Subject line, please don't attempt to mark posts as "urgent". See http://www.catb.org/esr/faqs/smart-questions.html#urgent Regards, Chris -- https://mail.python.org/mailman/listinfo/python-list
Re: urgent help
On 20/02/2015 08:24, ismaham...@gcuf.edu.pk wrote: Would you please give your requests a meaningful subject. sir these errors whats mean by it warning (from warnings module): File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 18 br.set_handle_gzip(True) UserWarning: gzip transfer encoding is experimental! See http://stackoverflow.com/questions/21415450/what-does-mechanize-br-set-handle-gzip-do Traceback (most recent call last): File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 106, in module getLinksComlicated() File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 80, in getLinksComlicated for file in os.listdir(dir)[1:]: WindowsError: [Error 3] The system cannot find the path specified: 'complicated/*.*' Either the code needs changing so it does a wildcard search or you need to pass in 'complicated' alone. Seeing those three magic letters P H D I'll leave you to research the former :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: urgent help
On 2015-02-21 00:16, ms.isma...@gmail.com wrote: On Saturday, February 21, 2015 at 8:14:43 AM UTC+8, ms.is...@gmail.com wrote: On Friday, February 20, 2015 at 4:41:57 PM UTC+8, Mark Lawrence wrote: On 20/02/2015 08:24, ismaham...@gcuf.edu.pk wrote: Would you please give your requests a meaningful subject. sir these errors whats mean by it warning (from warnings module): File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 18 br.set_handle_gzip(True) UserWarning: gzip transfer encoding is experimental! See http://stackoverflow.com/questions/21415450/what-does-mechanize-br-set-handle-gzip-do Traceback (most recent call last): File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 106, in module getLinksComlicated() File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 80, in getLinksComlicated for file in os.listdir(dir)[1:]: WindowsError: [Error 3] The system cannot find the path specified: 'complicated/*.*' Either the code needs changing so it does a wildcard search or you need to pass in 'complicated' alone. Seeing those three magic letters P H D I'll leave you to research the former :) sir what mean by the following errors: Traceback (most recent call last): File D:\My Documents\Desktop\scripts\WebMD\getWebMDExperts.py, line 143, in module links = getExpertInfoLinks() File D:\My Documents\Desktop\scripts\WebMD\getWebMDExperts.py, line 119, in getExpertInfoLinks fid = open(health-experts.htm,rb) IOError: [Errno 2] No such file or directory: 'health-experts.htm' File D:\My Documents\Desktop\scripts\BeOk\getBeOKExperts.py, line 149, in module getForums() File D:\My Documents\Desktop\scripts\BeOk\getBeOKExperts.py, line 143, in getForums soup = BeautifulSoup(open(file,r).read()) File C:\Python27\lib\codecs.py, line 878, in open file = __builtin__.open(filename, mode, buffering) IOError: [Errno 2] No such file or directory: 'links.htm It looks like the same problem, and the same solution, as the previous one, i.e. try an absolute path instead of a relative path. -- https://mail.python.org/mailman/listinfo/python-list
Re: urgent help
On Saturday, February 21, 2015 at 8:14:43 AM UTC+8, ms.is...@gmail.com wrote: On Friday, February 20, 2015 at 4:41:57 PM UTC+8, Mark Lawrence wrote: On 20/02/2015 08:24, ismaham...@gcuf.edu.pk wrote: Would you please give your requests a meaningful subject. sir these errors whats mean by it warning (from warnings module): File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 18 br.set_handle_gzip(True) UserWarning: gzip transfer encoding is experimental! See http://stackoverflow.com/questions/21415450/what-does-mechanize-br-set-handle-gzip-do Traceback (most recent call last): File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 106, in module getLinksComlicated() File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 80, in getLinksComlicated for file in os.listdir(dir)[1:]: WindowsError: [Error 3] The system cannot find the path specified: 'complicated/*.*' Either the code needs changing so it does a wildcard search or you need to pass in 'complicated' alone. Seeing those three magic letters P H D I'll leave you to research the former :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence sir what mean by the following errors: Traceback (most recent call last): File D:\My Documents\Desktop\scripts\WebMD\getWebMDExperts.py, line 143, in module links = getExpertInfoLinks() File D:\My Documents\Desktop\scripts\WebMD\getWebMDExperts.py, line 119, in getExpertInfoLinks fid = open(health-experts.htm,rb) IOError: [Errno 2] No such file or directory: 'health-experts.htm' File D:\My Documents\Desktop\scripts\BeOk\getBeOKExperts.py, line 149, in module getForums() File D:\My Documents\Desktop\scripts\BeOk\getBeOKExperts.py, line 143, in getForums soup = BeautifulSoup(open(file,r).read()) File C:\Python27\lib\codecs.py, line 878, in open file = __builtin__.open(filename, mode, buffering) IOError: [Errno 2] No such file or directory: 'links.htm -- https://mail.python.org/mailman/listinfo/python-list
Re: urgent help
On Friday, February 20, 2015 at 4:41:57 PM UTC+8, Mark Lawrence wrote: On 20/02/2015 08:24, ismaham...@gcuf.edu.pk wrote: Would you please give your requests a meaningful subject. sir these errors whats mean by it warning (from warnings module): File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 18 br.set_handle_gzip(True) UserWarning: gzip transfer encoding is experimental! See http://stackoverflow.com/questions/21415450/what-does-mechanize-br-set-handle-gzip-do Traceback (most recent call last): File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 106, in module getLinksComlicated() File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 80, in getLinksComlicated for file in os.listdir(dir)[1:]: WindowsError: [Error 3] The system cannot find the path specified: 'complicated/*.*' Either the code needs changing so it does a wildcard search or you need to pass in 'complicated' alone. Seeing those three magic letters P H D I'll leave you to research the former :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence sir what mean by the following errors: Traceback (most recent call last): File D:\My Documents\Desktop\scripts\WebMD\getWebMDExperts.py, line 143, in module links = getExpertInfoLinks() File D:\My Documents\Desktop\scripts\WebMD\getWebMDExperts.py, line 119, in getExpertInfoLinks fid = open(health-experts.htm,rb) IOError: [Errno 2] No such file or directory: 'health-experts.htm' -- https://mail.python.org/mailman/listinfo/python-list
Re: urgent help
On Saturday, February 21, 2015 at 8:17:06 AM UTC+8, ms.is...@gmail.com wrote: On Saturday, February 21, 2015 at 8:14:43 AM UTC+8, ms.is...@gmail.com wrote: On Friday, February 20, 2015 at 4:41:57 PM UTC+8, Mark Lawrence wrote: On 20/02/2015 08:24, ismaham...@gcuf.edu.pk wrote: Would you please give your requests a meaningful subject. sir these errors whats mean by it warning (from warnings module): File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 18 br.set_handle_gzip(True) UserWarning: gzip transfer encoding is experimental! See http://stackoverflow.com/questions/21415450/what-does-mechanize-br-set-handle-gzip-do Traceback (most recent call last): File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 106, in module getLinksComlicated() File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 80, in getLinksComlicated for file in os.listdir(dir)[1:]: WindowsError: [Error 3] The system cannot find the path specified: 'complicated/*.*' Either the code needs changing so it does a wildcard search or you need to pass in 'complicated' alone. Seeing those three magic letters P H D I'll leave you to research the former :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence sir what mean by the following errors: Traceback (most recent call last): File D:\My Documents\Desktop\scripts\WebMD\getWebMDExperts.py, line 143, in module links = getExpertInfoLinks() File D:\My Documents\Desktop\scripts\WebMD\getWebMDExperts.py, line 119, in getExpertInfoLinks fid = open(health-experts.htm,rb) IOError: [Errno 2] No such file or directory: 'health-experts.htm' File D:\My Documents\Desktop\scripts\BeOk\getBeOKExperts.py, line 149, in module getForums() File D:\My Documents\Desktop\scripts\BeOk\getBeOKExperts.py, line 143, in getForums soup = BeautifulSoup(open(file,r).read()) File C:\Python27\lib\codecs.py, line 878, in open file = __builtin__.open(filename, mode, buffering) IOError: [Errno 2] No such file or directory: 'links.htm Traceback (most recent call last): File D:\My Documents\Desktop\scripts\NetDoctor\getNetDoctor.py, line 106, in module getLinksComlicated() File D:\My Documents\Desktop\scripts\NetDoctor\getNetDoctor.py, line 80, in getLinksComlicated for file in os.listdir(dir)[1:]: WindowsError: [Error 3] The system cannot find the path specified: 'complicated/*.*' -- https://mail.python.org/mailman/listinfo/python-list
Re: urgent help
On 02/20/2015 07:20 PM, ms.isma...@gmail.com wrote: On Saturday, February 21, 2015 at 8:17:06 AM UTC+8, ms.is...@gmail.com wrote: On Saturday, February 21, 2015 at 8:14:43 AM UTC+8, ms.is...@gmail.com wrote: On Friday, February 20, 2015 at 4:41:57 PM UTC+8, Mark Lawrence wrote: On 20/02/2015 08:24, ismaham...@gcuf.edu.pk wrote: Would you please give your requests a meaningful subject. sir these errors whats mean by it warning (from warnings module): File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 18 br.set_handle_gzip(True) UserWarning: gzip transfer encoding is experimental! See http://stackoverflow.com/questions/21415450/what-does-mechanize-br-set-handle-gzip-do Traceback (most recent call last): File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 106, in module getLinksComlicated() File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 80, in getLinksComlicated for file in os.listdir(dir)[1:]: WindowsError: [Error 3] The system cannot find the path specified: 'complicated/*.*' Either the code needs changing so it does a wildcard search or you need to pass in 'complicated' alone. Seeing those three magic letters P H D I'll leave you to research the former :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence sir what mean by the following errors: Traceback (most recent call last): File D:\My Documents\Desktop\scripts\WebMD\getWebMDExperts.py, line 143, in module links = getExpertInfoLinks() File D:\My Documents\Desktop\scripts\WebMD\getWebMDExperts.py, line 119, in getExpertInfoLinks fid = open(health-experts.htm,rb) IOError: [Errno 2] No such file or directory: 'health-experts.htm' File D:\My Documents\Desktop\scripts\BeOk\getBeOKExperts.py, line 149, in module getForums() File D:\My Documents\Desktop\scripts\BeOk\getBeOKExperts.py, line 143, in getForums soup = BeautifulSoup(open(file,r).read()) File C:\Python27\lib\codecs.py, line 878, in open file = __builtin__.open(filename, mode, buffering) IOError: [Errno 2] No such file or directory: 'links.htm Traceback (most recent call last): File D:\My Documents\Desktop\scripts\NetDoctor\getNetDoctor.py, line 106, in module getLinksComlicated() File D:\My Documents\Desktop\scripts\NetDoctor\getNetDoctor.py, line 80, in getLinksComlicated for file in os.listdir(dir)[1:]: WindowsError: [Error 3] The system cannot find the path specified: 'complicated/*.*' Those errors all mean the same thing. You've got a bug in your code. But since you don't show your code, all we can do is guess. All of those refer to missing files. The first two are missing when you try to open them, so we can be pretty sure they're not in the current directory. In the third case, you're calling listdir() with a directory name with asterisks in it. And those aren't legal in Windows. Fix the directory name, perhaps to Z:/Your_documents/someplace/else/complicated/ Of course, you probably don't ahve that directory either, but it's more likely than the one you specified. -- DaveA -- https://mail.python.org/mailman/listinfo/python-list
Re: urgent help
On 2015-02-21 00:20, ms.isma...@gmail.com wrote: On Saturday, February 21, 2015 at 8:17:06 AM UTC+8, ms.is...@gmail.com wrote: On Saturday, February 21, 2015 at 8:14:43 AM UTC+8, ms.is...@gmail.com wrote: On Friday, February 20, 2015 at 4:41:57 PM UTC+8, Mark Lawrence wrote: On 20/02/2015 08:24, ismaham...@gcuf.edu.pk wrote: Would you please give your requests a meaningful subject. sir these errors whats mean by it warning (from warnings module): File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 18 br.set_handle_gzip(True) UserWarning: gzip transfer encoding is experimental! See http://stackoverflow.com/questions/21415450/what-does-mechanize-br-set-handle-gzip-do Traceback (most recent call last): File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 106, in module getLinksComlicated() File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 80, in getLinksComlicated for file in os.listdir(dir)[1:]: WindowsError: [Error 3] The system cannot find the path specified: 'complicated/*.*' Either the code needs changing so it does a wildcard search or you need to pass in 'complicated' alone. Seeing those three magic letters P H D I'll leave you to research the former :) sir what mean by the following errors: Traceback (most recent call last): File D:\My Documents\Desktop\scripts\WebMD\getWebMDExperts.py, line 143, in module links = getExpertInfoLinks() File D:\My Documents\Desktop\scripts\WebMD\getWebMDExperts.py, line 119, in getExpertInfoLinks fid = open(health-experts.htm,rb) IOError: [Errno 2] No such file or directory: 'health-experts.htm' File D:\My Documents\Desktop\scripts\BeOk\getBeOKExperts.py, line 149, in module getForums() File D:\My Documents\Desktop\scripts\BeOk\getBeOKExperts.py, line 143, in getForums soup = BeautifulSoup(open(file,r).read()) File C:\Python27\lib\codecs.py, line 878, in open file = __builtin__.open(filename, mode, buffering) IOError: [Errno 2] No such file or directory: 'links.htm Traceback (most recent call last): File D:\My Documents\Desktop\scripts\NetDoctor\getNetDoctor.py, line 106, in module getLinksComlicated() File D:\My Documents\Desktop\scripts\NetDoctor\getNetDoctor.py, line 80, in getLinksComlicated for file in os.listdir(dir)[1:]: WindowsError: [Error 3] The system cannot find the path specified: 'complicated/*.*' You're giving listdir a wildcarded path. Either give it just the (absolute) path of the directory, or use 'glob' (with an absolute path!) instead. -- https://mail.python.org/mailman/listinfo/python-list
Re: urgent help
On Fri, 20 Feb 2015 16:14:18 -0800, ms.isma222 wrote: sir what mean by the following errors: Traceback (most recent call last): File D:\My Documents\Desktop\scripts\WebMD\getWebMDExperts.py, line 143, in module links = getExpertInfoLinks() File D:\My Documents\Desktop\scripts\WebMD\getWebMDExperts.py, line 119, in getExpertInfoLinks fid = open(health-experts.htm,rb) This line tried to open a file called health-experts.htm IOError: [Errno 2] No such file or directory: 'health-experts.htm' This error says the file does not exist. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list
Re: urgent help
On 2015-02-21 00:14, ms.isma...@gmail.com wrote: On Friday, February 20, 2015 at 4:41:57 PM UTC+8, Mark Lawrence wrote: On 20/02/2015 08:24, ismaham...@gcuf.edu.pk wrote: Would you please give your requests a meaningful subject. sir these errors whats mean by it warning (from warnings module): File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 18 br.set_handle_gzip(True) UserWarning: gzip transfer encoding is experimental! See http://stackoverflow.com/questions/21415450/what-does-mechanize-br-set-handle-gzip-do Traceback (most recent call last): File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 106, in module getLinksComlicated() File D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py, line 80, in getLinksComlicated for file in os.listdir(dir)[1:]: WindowsError: [Error 3] The system cannot find the path specified: 'complicated/*.*' Either the code needs changing so it does a wildcard search or you need to pass in 'complicated' alone. Seeing those three magic letters P H D I'll leave you to research the former :) sir what mean by the following errors: Traceback (most recent call last): File D:\My Documents\Desktop\scripts\WebMD\getWebMDExperts.py, line 143, in module links = getExpertInfoLinks() File D:\My Documents\Desktop\scripts\WebMD\getWebMDExperts.py, line 119, in getExpertInfoLinks fid = open(health-experts.htm,rb) IOError: [Errno 2] No such file or directory: 'health-experts.htm' It means that it can't find that file, either because it doesn't exist, or because it's not in the directory that it's looking in. Notice that it's a relative path (it doesn't start with a drive letter), so it's looking for the file in the current directory. Try opening the file with an absolute path instead. -- https://mail.python.org/mailman/listinfo/python-list
Re: urgent help
On 02/19/2015 03:35 AM, ismaham...@gcuf.edu.pk wrote: this is the error in the following python code, can any one help me error{Traceback (most recent call last): File C:\Python27\Scripts\BeOk\getBeOKExperts.py, line 6, in module from BeautifulSoup import BeautifulSoup ImportError: No module named BeautifulSoup} #encoding=utf8 from codecs import open from collections import defaultdict import re from BeautifulSoup import BeautifulSoup When you can demonstrate a problem in a couple of lines of source code, why would you waste our bandwidth showing us dozens of unrelated lines? Since the error says there's no module named BeautifulSoup, perhaps that's because you haven't installed BeautifulSoup. it's not in the standard library. I've never used it, but a quick web search found me the page: http://www.crummy.com/software/BeautifulSoup/bs4/doc/ And that seems to say the module is called bs4. Anyway, if you did install it, and read the directions, and are still stumped, you probably need to supply many other details: 1) what version of Python are you using, and do you have multiple versions installed 2) what OS 3) where did you download it from, and what commands did you use to actually install it How did you specify which Python version it would install to? 4) what your import line looks like (which you did specify) 5) and of course, what the exception is (which you did include) Other things people may need to know include what directory the bs4.pyc file is installed to, what your sys.path is, and so on. But just answering the first questions might let you figure it out for yourself. -- DaveA -- https://mail.python.org/mailman/listinfo/python-list
Re: urgent help
On Thursday, February 19, 2015 at 4:35:18 PM UTC+8, ismah...@gcuf.edu.pk wrote: this is the error in the following python code, can any one help me error{Traceback (most recent call last): File C:\Python27\Scripts\BeOk\getBeOKExperts.py, line 6, in module from BeautifulSoup import BeautifulSoup ImportError: No module named BeautifulSoup} #encoding=utf8 from codecs import open from collections import defaultdict import re from BeautifulSoup import BeautifulSoup import mechanize import cookielib import html2text import time def getbr(): br = mechanize.Browser() # Cookie Jar cj = cookielib.LWPCookieJar() br.set_cookiejar(cj) # Browser options br.set_handle_equiv(True) br.set_handle_gzip(True) br.set_handle_redirect(True) br.set_handle_referer(True) br.set_handle_robots(False) # Follows refresh 0 but not hangs on refresh 0 br.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time=1) # User-Agent (this is cheating, ok?) br.addheaders = [('User-agent', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1')] return br def logthis(text): open(log.txt,a,utf8).write(text+\n) def getCommunity(community,url,out=): # Browser # The site we will navigate into, handling it's session i = 1 flag = True discussions = [] baseDiscussion = [] while flag: print i currurl = url+/+str(i) try: br = getbr() br.open(currurl) #br.follow_link(text='link') html = br.response().read() soup = BeautifulSoup(html) if soup.find(title).string == u'\r\n\t\u05d4\u05d5\u05d3\u05e2\u05ea \u05de\u05e2\u05e8\u05db\u05ea - BeOK\r\n': print done at ,i,community logthis(done at +str(i)+ +community) return True hrefList = soup.findAll('div',{class:MsgTtlChildRow}) print currurl #print hrefList for link in hrefList: #print str(link) #continue span = link.find('div',{class:MsgUsr}) if frm_mngr in str(span): mgr = span.find(span,{class:frm_mngr}).string if not '' in mgr: continue mgr = mgr.replace(',) date = link.find('span',{class:MsgDate}).string.split( )[1] #out.write(community+\t+mgr+\t+date+\n) print community.rstrip(),date,mgr #fout = open(corpus\\+community+-+date+-+mgr,w,utf8) ansDiv = link.nextSibling.find('div',{class:BodyMesInner}) print bla ans = fixHtml2(str(ansDiv)) print bla print ans #fout.write(fixHtml(link.find('div',{class:BodyMesInner}).string)+\n) #fout.close() questionDiv = link.previousSibling.find('div',{class:BodyMesInner}) print bla,questionDiv quesiton = fixHtml2(str(questionDiv)) print question span = None soup = None br = None except: time.sleep(60) i+=1 return list(set(discussions)) def fixHtml(page): page = page.replace(/p,\n) page = page.replace(/P,\n) page = page.replace(br /,\n) page = page.replace(BR /,\n) page = page.replace(br,\n) page = page.replace(BR,\n) page = page.replace(quot;,') reg = re.compile() reg2 = re.compile() page = .join([x[-1] for x in map(reg2.split,reg.split(page))]) page = page.replace(\r\n\t\t\t,\n) return page def fixHtml2(page): page = page.split('ner')[1].split(div)[0] print page page = page.replace(/p,\n) page = page.replace(/P,\n) page = page.replace(br /,\n) page = page.replace(BR /,\n) page = page.replace(br,\n) page = page.replace(BR,\n) page = page.replace(quot;,') return page def getText(br,url): br.open(url) html = br.response().read() soup = BeautifulSoup(html) title = fixHtml(soup.find('h1',{'class':articleName}).contents[0]) #print title artics = soup.findAll('div',{'class':article}) text = \n+fixHtml(str(artics[0]).split('article')[1].split('/div')[0]) text += \nEXPERT+ fixHtml(str(artics[1]).split('article')[1].split('/div')[0])+/EXPERT text = text.decode(utf-8) #text = artics[0] + #print type(title),type(text) return title+text def getForums(file = links.htm): #out = open(beokDates,w,utf8)
Re: urgent help
On Thursday, February 19, 2015 at 5:46:42 PM UTC+8, ismah...@gcuf.edu.pk wrote: On Thursday, February 19, 2015 at 5:31:49 PM UTC+8, ismah...@gcuf.edu.pk wrote: On Thursday, February 19, 2015 at 4:35:18 PM UTC+8, ismah...@gcuf.edu.pk wrote: this is the error in the following python code, can any one help me error{Traceback (most recent call last): File C:\Python27\Scripts\BeOk\getBeOKExperts.py, line 6, in module from BeautifulSoup import BeautifulSoup ImportError: No module named BeautifulSoup} #encoding=utf8 from codecs import open from collections import defaultdict import re from BeautifulSoup import BeautifulSoup import mechanize import cookielib import html2text import time def getbr(): br = mechanize.Browser() # Cookie Jar cj = cookielib.LWPCookieJar() br.set_cookiejar(cj) # Browser options br.set_handle_equiv(True) br.set_handle_gzip(True) br.set_handle_redirect(True) br.set_handle_referer(True) br.set_handle_robots(False) # Follows refresh 0 but not hangs on refresh 0 br.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time=1) # User-Agent (this is cheating, ok?) br.addheaders = [('User-agent', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1')] return br def logthis(text): open(log.txt,a,utf8).write(text+\n) def getCommunity(community,url,out=): # Browser # The site we will navigate into, handling it's session i = 1 flag = True discussions = [] baseDiscussion = [] while flag: print i currurl = url+/+str(i) try: br = getbr() br.open(currurl) #br.follow_link(text='link') html = br.response().read() soup = BeautifulSoup(html) if soup.find(title).string == u'\r\n\t\u05d4\u05d5\u05d3\u05e2\u05ea \u05de\u05e2\u05e8\u05db\u05ea - BeOK\r\n': print done at ,i,community logthis(done at +str(i)+ +community) return True hrefList = soup.findAll('div',{class:MsgTtlChildRow}) print currurl #print hrefList for link in hrefList: #print str(link) #continue span = link.find('div',{class:MsgUsr}) if frm_mngr in str(span): mgr = span.find(span,{class:frm_mngr}).string if not '' in mgr: continue mgr = mgr.replace(',) date = link.find('span',{class:MsgDate}).string.split( )[1] #out.write(community+\t+mgr+\t+date+\n) print community.rstrip(),date,mgr #fout = open(corpus\\+community+-+date+-+mgr,w,utf8) ansDiv = link.nextSibling.find('div',{class:BodyMesInner}) print bla ans = fixHtml2(str(ansDiv)) print bla print ans #fout.write(fixHtml(link.find('div',{class:BodyMesInner}).string)+\n) #fout.close() questionDiv = link.previousSibling.find('div',{class:BodyMesInner}) print bla,questionDiv quesiton = fixHtml2(str(questionDiv)) print question span = None soup = None br = None except: time.sleep(60) i+=1 return list(set(discussions)) def fixHtml(page): page = page.replace(/p,\n) page = page.replace(/P,\n) page = page.replace(br /,\n) page = page.replace(BR /,\n) page = page.replace(br,\n) page = page.replace(BR,\n) page = page.replace(quot;,') reg = re.compile() reg2 = re.compile() page = .join([x[-1] for x in map(reg2.split,reg.split(page))]) page = page.replace(\r\n\t\t\t,\n) return page def fixHtml2(page): page = page.split('ner')[1].split(div)[0] print page page = page.replace(/p,\n) page = page.replace(/P,\n) page = page.replace(br /,\n) page = page.replace(BR /,\n) page = page.replace(br,\n) page = page.replace(BR,\n) page = page.replace(quot;,') return page def getText(br,url): br.open(url) html = br.response().read() soup = BeautifulSoup(html) title =
Re: urgent help
On Thursday, February 19, 2015 at 5:31:49 PM UTC+8, ismah...@gcuf.edu.pk wrote: On Thursday, February 19, 2015 at 4:35:18 PM UTC+8, ismah...@gcuf.edu.pk wrote: this is the error in the following python code, can any one help me error{Traceback (most recent call last): File C:\Python27\Scripts\BeOk\getBeOKExperts.py, line 6, in module from BeautifulSoup import BeautifulSoup ImportError: No module named BeautifulSoup} #encoding=utf8 from codecs import open from collections import defaultdict import re from BeautifulSoup import BeautifulSoup import mechanize import cookielib import html2text import time def getbr(): br = mechanize.Browser() # Cookie Jar cj = cookielib.LWPCookieJar() br.set_cookiejar(cj) # Browser options br.set_handle_equiv(True) br.set_handle_gzip(True) br.set_handle_redirect(True) br.set_handle_referer(True) br.set_handle_robots(False) # Follows refresh 0 but not hangs on refresh 0 br.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time=1) # User-Agent (this is cheating, ok?) br.addheaders = [('User-agent', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1')] return br def logthis(text): open(log.txt,a,utf8).write(text+\n) def getCommunity(community,url,out=): # Browser # The site we will navigate into, handling it's session i = 1 flag = True discussions = [] baseDiscussion = [] while flag: print i currurl = url+/+str(i) try: br = getbr() br.open(currurl) #br.follow_link(text='link') html = br.response().read() soup = BeautifulSoup(html) if soup.find(title).string == u'\r\n\t\u05d4\u05d5\u05d3\u05e2\u05ea \u05de\u05e2\u05e8\u05db\u05ea - BeOK\r\n': print done at ,i,community logthis(done at +str(i)+ +community) return True hrefList = soup.findAll('div',{class:MsgTtlChildRow}) print currurl #print hrefList for link in hrefList: #print str(link) #continue span = link.find('div',{class:MsgUsr}) if frm_mngr in str(span): mgr = span.find(span,{class:frm_mngr}).string if not '' in mgr: continue mgr = mgr.replace(',) date = link.find('span',{class:MsgDate}).string.split( )[1] #out.write(community+\t+mgr+\t+date+\n) print community.rstrip(),date,mgr #fout = open(corpus\\+community+-+date+-+mgr,w,utf8) ansDiv = link.nextSibling.find('div',{class:BodyMesInner}) print bla ans = fixHtml2(str(ansDiv)) print bla print ans #fout.write(fixHtml(link.find('div',{class:BodyMesInner}).string)+\n) #fout.close() questionDiv = link.previousSibling.find('div',{class:BodyMesInner}) print bla,questionDiv quesiton = fixHtml2(str(questionDiv)) print question span = None soup = None br = None except: time.sleep(60) i+=1 return list(set(discussions)) def fixHtml(page): page = page.replace(/p,\n) page = page.replace(/P,\n) page = page.replace(br /,\n) page = page.replace(BR /,\n) page = page.replace(br,\n) page = page.replace(BR,\n) page = page.replace(quot;,') reg = re.compile() reg2 = re.compile() page = .join([x[-1] for x in map(reg2.split,reg.split(page))]) page = page.replace(\r\n\t\t\t,\n) return page def fixHtml2(page): page = page.split('ner')[1].split(div)[0] print page page = page.replace(/p,\n) page = page.replace(/P,\n) page = page.replace(br /,\n) page = page.replace(BR /,\n) page = page.replace(br,\n) page = page.replace(BR,\n) page = page.replace(quot;,') return page def getText(br,url): br.open(url) html = br.response().read() soup = BeautifulSoup(html) title = fixHtml(soup.find('h1',{'class':articleName}).contents[0]) #print title artics = soup.findAll('div',{'class':article}) text = \n+fixHtml(str(artics[0]).split('article')[1].split('/div')[0]) text += \nEXPERT+
Re: urgent help
On 19/02/2015 09:48, ismaham...@gcuf.edu.pk wrote: As Dave Angel said nearly two hours ago the module is called bs4, so the command you need is:- from bs4 import BeautifulSoup In future please don't repeat the entire email just to add a sentence or two, particularly when you do so three times, as some people pay for bandwidth. Thanks. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: urgent help
On Thu, 19 Feb 2015 04:00:50 -0500, Dave Angel wrote: On 02/19/2015 03:35 AM, ismaham...@gcuf.edu.pk wrote: this is the error in the following python code, can any one help me error{Traceback (most recent call last): File C:\Python27\Scripts\BeOk\getBeOKExperts.py, line 6, in module from BeautifulSoup import BeautifulSoup ImportError: No module named BeautifulSoup} #encoding=utf8 from codecs import open from collections import defaultdict import re from BeautifulSoup import BeautifulSoup When you can demonstrate a problem in a couple of lines of source code, why would you waste our bandwidth showing us dozens of unrelated lines? Since the error says there's no module named BeautifulSoup, perhaps that's because you haven't installed BeautifulSoup. it's not in the standard library. I've never used it, but a quick web search found me the page: http://www.crummy.com/software/BeautifulSoup/bs4/doc/ * * And that seems to say the module is called bs4. * * It seems that the OP has failed to read your post, the documentation or the examples for the code he is using. As a very strong hint, I have highlighted your fix for his main problem above with a few (ok, several) asterisks. Let's see if he can find it now. If he can't, I don't understand why he bothered to ask for help, because I'm pretty sure you nailed the issue right there, and unless he's going to read the responses to his post to see the answers that are provided it's a bit stupid to post asking for help in the first place. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list
Re: urgent requirement at Hyderabad
In case anyone wondered: Hyderabad is likely referring to some place in Asia: http://en.wikipedia.org/wiki/Hyderabad_%28disambiguation%29 Stefan -- http://mail.python.org/mailman/listinfo/python-list
Re: urgent requirement at Hyderabad
sushma wrote: We are looking for Python Developers/programmers with 1+ years of experience. Send resume to sush...@millenniumsoft.com So urgent you can't even be bothered to describe the job or post the advert in the correct place on the python job board. Good luck with that ;-) Chris -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk -- http://mail.python.org/mailman/listinfo/python-list
Re: urgent requirement at Hyderabad
In article mailman.1949.1281529030.1673.python-l...@python.org, Stefan Behnel stefan...@behnel.de wrote: In case anyone wondered: Hyderabad is likely referring to some place in Asia: It's one of the high-tech cities in India. A lot of out-sourcing winds up there. -- -Ed Falk, f...@despams.r.us.com http://thespamdiaries.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list
Re: urgent requirement at Hyderabad
Stefan Behnel wrote: In case anyone wondered: Hyderabad is likely referring to some place in Asia: http://en.wikipedia.org/wiki/Hyderabad_%28disambiguation%29 And Berlin is likely some place in Europe: http://en.wikipedia.org/wiki/Berlin_(disambiguation) :-) -- http://mail.python.org/mailman/listinfo/python-list
Re: urgent requirement at Hyderabad
On 8/11/2010 12:39 PM MRAB said... Stefan Behnel wrote: In case anyone wondered: Hyderabad is likely referring to some place in Asia: http://en.wikipedia.org/wiki/Hyderabad_%28disambiguation%29 And Berlin is likely some place in Europe: http://en.wikipedia.org/wiki/Berlin_(disambiguation) :-) And Paris is likely someplace in the US... http://en.wikipedia.org/wiki/Paris_%28disambiguation%29 Emile :)) -- http://mail.python.org/mailman/listinfo/python-list
Re: urgent requirement at Hyderabad
On Wed, 11 Aug 2010 14:25:08 -0700, Emile van Sebille wrote: On 8/11/2010 12:39 PM MRAB said... Stefan Behnel wrote: In case anyone wondered: Hyderabad is likely referring to some place in Asia: http://en.wikipedia.org/wiki/Hyderabad_%28disambiguation%29 And Berlin is likely some place in Europe: http://en.wikipedia.org/wiki/Berlin_(disambiguation) :-) And Paris is likely someplace in the US... http://en.wikipedia.org/wiki/Paris_%28disambiguation%29 No, I'm pretty sure it's a town in Australia filled with murderers... http://en.wikipedia.org/wiki/The_Cars_That_Ate_Paris -- Steven -- http://mail.python.org/mailman/listinfo/python-list
Re: urgent requirement
On Aug 8, 9:25 pm, sushma sushma.kona...@gmail.com wrote: We have an urgent requirement for people who are having experience in python. If you are interested for this position forward your updated resume to the sush...@millenniumsoft.com with the details mention below; current ctc: expected ctc: notice period: #1: You should post this on the Python jobs board. http://www.python.org/community/jobs/ #2: I know the economy's bad but not everyone is going to apply to every job posting they see. You should include a least a little information about the job. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list
Re: URGENT! Changing IE PAC Settings with Python
K-Dawg wrote: Thanks for any response. I am in a crisis where one of our networking guys moved where our PAC file is housed. There was a group policy set in Active Directory that set the PAC file location in Internet Explorer to the new location. However, we have 100 remote centers that have about 3 to 4 machines that are not on AD (from before an AD migration). These machines did not receive the update. Is there a way I can write a python script to run from my machine to jump out to a list More of a Windows question, really, and depends on the configuration of network, security etc. Certainly you can use any of the usual Windows techniques (UNCs, WMI, DCOM etc.) to invoke things on those remote machines, assuming you have enough network and credentials to get there. Not clear what your level of expertise is, either at the Windows or at the Python level, so apols. if suggesting the obvious here. If you already know what technique you're going to use to push your file out (say, a copy to a remote unc) then getting Python to read a list of machines from a file and doing the same to each one is child's play: import shutil for machine in open (machines.txt): shutil.copyfile (local.pac, r\\%s\c$\somewhere\thing.pac % machine) If you need to set up credentials for that connection first, you might want to use the win32net module from the pywin32 extensions to establish a mapped drive or at least a NULL session with known credentials. As a possibility the other way round, if you're able to WMI into the machines, you could run a command on them to pull the file in, rather than pushing. Obviously, you've still got to establish credentials. I'll stop there, because I might be missing the target altogether. You'll certainly get help here, but you might want to post to the python-win32 list which is a bit more specialised. TJG -- http://mail.python.org/mailman/listinfo/python-list
Re: URGENT! Changing IE PAC Settings with Python
HI forwarded it to the Python Win32 list On Thu, May 21, 2009 at 12:11 AM, Tim Golden m...@timgolden.me.uk wrote: K-Dawg wrote: Thanks for any response. I am in a crisis where one of our networking guys moved where our PAC file is housed. There was a group policy set in Active Directory that set the PAC file location in Internet Explorer to the new location. However, we have 100 remote centers that have about 3 to 4 machines that are not on AD (from before an AD migration). These machines did not receive the update. Is there a way I can write a python script to run from my machine to jump out to a list More of a Windows question, really, and depends on the configuration of network, security etc. Certainly you can use any of the usual Windows techniques (UNCs, WMI, DCOM etc.) to invoke things on those remote machines, assuming you have enough network and credentials to get there. Not clear what your level of expertise is, either at the Windows or at the Python level, so apols. if suggesting the obvious here. If you already know what technique you're going to use to push your file out (say, a copy to a remote unc) then getting Python to read a list of machines from a file and doing the same to each one is child's play: import shutil for machine in open (machines.txt): shutil.copyfile (local.pac, r\\%s\c$\somewhere\thing.pac % machine) If you need to set up credentials for that connection first, you might want to use the win32net module from the pywin32 extensions to establish a mapped drive or at least a NULL session with known credentials. As a possibility the other way round, if you're able to WMI into the machines, you could run a command on them to pull the file in, rather than pushing. Obviously, you've still got to establish credentials. I'll stop there, because I might be missing the target altogether. You'll certainly get help here, but you might want to post to the python-win32 list which is a bit more specialised. TJG -- http://mail.python.org/mailman/listinfo/python-list -- http://www.goldwatches.com -- http://mail.python.org/mailman/listinfo/python-list
Re: urgent question, about filesystem-files
En Thu, 10 Apr 2008 05:11:09 -0300, bvidinli [EMAIL PROTECTED] escribió: i started python programming a few months ago. now i need the code to understand if a file already opened in filesystem by another process ? i looked at docs, howtos, but did not find related info. note that normal file open/write operations in python, i know it. i specificly need to know that is a file already open by some other process other than python. The operating system is more relevant here than Python. Is it Windows, some Linux flavor, what? -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list
Re: urgent question, about filesystem-files
bvidinli wrote: i started python programming a few months ago. now i need the code to understand if a file already opened in filesystem by another process ? i looked at docs, howtos, but did not find related info. note that normal file open/write operations in python, i know it. i specificly need to know that is a file already open by some other process other than python. Thank you in advance This is certainly an operating-system dependent bit of functionality. So first off, you are going to have to tell us *which* OS you're working on. Then, perhaps someone can help... Gary Herron -- http://mail.python.org/mailman/listinfo/python-list
Re: urgent question, about filesystem-files
The need/reason for this, i write a program that should perform some operation on files, only if the file is not being used this is for ensuring that file is not in use, ... by any process in system 10.04.2008 tarihinde bvidinli [EMAIL PROTECTED] yazmış: Sory for lack of information, i use linux/unix i need to solve this for linux/unix i tested os.open with O_EXCL flag, and some other things, that did not solve. i need exacly: say example file testfile, check if testfile already open by some other process in linux, tahnks. 2008/4/10, Gary Herron [EMAIL PROTECTED]: bvidinli wrote: i started python programming a few months ago. now i need the code to understand if a file already opened in filesystem by another process ? i looked at docs, howtos, but did not find related info. note that normal file open/write operations in python, i know it. i specificly need to know that is a file already open by some other process other than python. Thank you in advance This is certainly an operating-system dependent bit of functionality. So first off, you are going to have to tell us *which* OS you're working on. Then, perhaps someone can help... Gary Herron -- İ.Bahattin Vidinli Elk-Elektronik Müh. --- iletisim bilgileri (Tercih sirasina gore): skype: bvidinli (sesli gorusme icin, www.skype.com) msn: [EMAIL PROTECTED] yahoo: bvidinli +90.532.7990607 +90.505.5667711 -- İ.Bahattin Vidinli Elk-Elektronik Müh. --- iletisim bilgileri (Tercih sirasina gore): skype: bvidinli (sesli gorusme icin, www.skype.com) msn: [EMAIL PROTECTED] yahoo: bvidinli +90.532.7990607 +90.505.5667711 -- İ.Bahattin Vidinli Elk-Elektronik Müh. --- iletisim bilgileri (Tercih sirasina gore): skype: bvidinli (sesli gorusme icin, www.skype.com) msn: [EMAIL PROTECTED] yahoo: bvidinli +90.532.7990607 +90.505.5667711 -- http://mail.python.org/mailman/listinfo/python-list
Re: urgent question, about filesystem-files
bvidinli wrote: i started python programming a few months ago. now i need the code to understand if a file already opened in filesystem by another process ? i looked at docs, howtos, but did not find related info. note that normal file open/write operations in python, i know it. i specificly need to know that is a file already open by some other process other than python. The pragmatic solution here is to not worry about it and let it be the user's problem if he does something stupid. It's OS specific how to get at this information. On Linux, for example you can call the `fuser` program (if installed; on Ubuntu it's in the psmisc package). But this will only tell you if the same user has the file open (or if you're root). -- Gerhard -- http://mail.python.org/mailman/listinfo/python-list
Re: urgent question, about filesystem-files
* i do not want to prevent other process access same file, i only want if a file being used as i acess it. * i am not interested if a process will access same file just after i access it... because in my case, this is not possible.. * i want some other way, other than linux lsof command. it is slow for me. is there a native python way, ? thanks. 2008/4/10, Diez B. Roggisch [EMAIL PROTECTED]: bvidinli wrote: this is for ensuring that file is not in use, ... by any process in system How do you prevent the other processes that *might* access that file from doing so while *you* work on it? unless they cooperate using file-locks, you might end up with garbage. Diez -- http://mail.python.org/mailman/listinfo/python-list -- İ.Bahattin Vidinli Elk-Elektronik Müh. --- iletisim bilgileri (Tercih sirasina gore): skype: bvidinli (sesli gorusme icin, www.skype.com) msn: [EMAIL PROTECTED] yahoo: bvidinli +90.532.7990607 +90.505.5667711 -- http://mail.python.org/mailman/listinfo/python-list
Re: urgent question, about filesystem-files
bvidinli wrote: this is for ensuring that file is not in use, ... by any process in system How do you prevent the other processes that *might* access that file from doing so while *you* work on it? unless they cooperate using file-locks, you might end up with garbage. Diez -- http://mail.python.org/mailman/listinfo/python-list
Re: urgent question, about filesystem-files
bvidinli wrote: i started python programming a few months ago. now i need the code to understand if a file already opened in filesystem by another process ? i looked at docs, howtos, but did not find related info. note that normal file open/write operations in python, i know it. i specificly need to know that is a file already open by some other process other than python. Thank you in advance This is a OS function. With Linux you use the command lsof (as root). A Python program can call such a command, but you have to parse the output. Robert -- http://mail.python.org/mailman/listinfo/python-list
Re: urgent question, about filesystem-files
Could you first find out if it exists with isfile(..) and then try to open it? If it fails I *think* it would have to be open by another process. -Rick King Southfield MI bvidinli wrote: i started python programming a few months ago. now i need the code to understand if a file already opened in filesystem by another process ? i looked at docs, howtos, but did not find related info. note that normal file open/write operations in python, i know it. i specificly need to know that "is a file already open by some other process other than python". Thank you in advance -- http://mail.python.org/mailman/listinfo/python-list
RE: Urgent : How to do memory leaks detection in python ?
Thanks for your inputs !!! I have installed python v 2.5 on my Linux machine and executing the tool again. I would like to share the memory status( using free -m command ) before and after the execution of the tool. BEFORE EXECUTION total used free sharedbuffers cached Mem: 1006148*858* 0 8 92 -/+ buffers/cache: 46960 Swap: 2047 0 2047 AFTER EXECUTION === total used free sharedbuffers cached Mem: 1006940 *66* 0 49846 -/+ buffers/cache: 44962 Swap: 2047 0 2047 I am unable to find out why *66 MB* system memory is left after tool execution ? If python does not have memory leaks then where this memory is going ? I have explored few urls (as given below) related to memory leak in python : http://www.nightmare.com/medusa/memory-leaks.html http://mail.python.org/pipermail/tutor/1999-April/000162.html Please comment !!! -Original Message- *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *tsuraan *Sent:* 16 March 2008 8:27 AM *To:* python-list@python.org *Subject:* Re: Urgent : How to do memory leaks detection in python ? Python doesn't have memory leaks. Yeah, interesting bit of trivia: python is the world's only non-trivial program that's totally free of bugs. Pretty exciting! But seriously, python 2.4, at least, does have some pretty trivially exposed memory leaks when working with strings. A simple example is this: letters = [chr(c) for c in range(ord('a'), ord('z'))+range(ord('A'), ord('Z'))] ary = [] for a in letters: ... for b in letters: ... for c in letters: ...for d in letters: ... ary.append(a+b+c+d) ... del(ary) import gc gc.collect() 0 The VM's memory usage will never drop from its high point of (on my computer) ~200MB. Since you're using GIS data, this could be what you're running into. I haven't been able to upgrade my systems to python 2.5, but from my tests, that version did not have that memory leak. Nobody seems interesting in backporting fixes from 2.5 to 2.4, so you're probably on your own in that case as well, if upgrading to python 2.5 isn't an option or isn't applicable to your situation. -- http://mail.python.org/mailman/listinfo/python-list
Re: Urgent : How to do memory leaks detection in python ?
On Mar 17, 2008, at 3:21 AM, Pradeep Rai wrote: Thanks for your inputs !!! I have installed python v 2.5 on my Linux machine and executing the tool again. I would like to share the memory status( using free -m command ) before and after the execution of the tool. BEFORE EXECUTION total used free shared buffers cached Mem: 1006148858 0 8 92 -/+ buffers/cache: 46960 Swap: 2047 0 2047 AFTER EXECUTION === total used free shared buffers cached Mem: 1006940 66 0 49846 -/+ buffers/cache: 44962 Swap: 2047 0 2047 I am unable to find out why 66 MB system memory is left after tool execution ? If python does not have memory leaks then where this memory is going ? the free you are looking at is not a good indication of 'actual memory available' in linux. the number you are intersted is this one: -/+ buffers/cache: 46960 vs -/+ buffers/cache: 44962 before execution you had 960 available for use by applications after execution you had 962 available. here is one of many pages explaining memory under linux: http://gentoo-wiki.com/FAQ_Linux_Memory_Management -- http://mail.python.org/mailman/listinfo/python-list
Re: Urgent : How to do memory leaks detection in python ?
Python doesn't have memory leaks. Yeah, interesting bit of trivia: python is the world's only non-trivial program that's totally free of bugs. Pretty exciting! But seriously, python 2.4, at least, does have some pretty trivially exposed memory leaks when working with strings. A simple example is this: letters = [chr(c) for c in range(ord('a'), ord('z'))+range(ord('A'), ord('Z'))] ary = [] for a in letters: ... for b in letters: ... for c in letters: ...for d in letters: ... ary.append(a+b+c+d) ... del(ary) import gc gc.collect() 0 The VM's memory usage will never drop from its high point of (on my computer) ~200MB. Since you're using GIS data, this could be what you're running into. I haven't been able to upgrade my systems to python 2.5, but from my tests, that version did not have that memory leak. Nobody seems interesting in backporting fixes from 2.5 to 2.4, so you're probably on your own in that case as well, if upgrading to python 2.5 isn't an option or isn't applicable to your situation. -- http://mail.python.org/mailman/listinfo/python-list
Re: Urgent : How to do memory leaks detection in python ?
2008/3/14, Pradeep Rai [EMAIL PROTECTED]: Dear All, I am working on the python tools that process a huge amount of GIS data. These tools encountering the problem of memory leaks. Please suggest what are the different ways to detect the memory leaks in python ? This is very critical problem for me. Help needed urgently. Thanks Regards, Pradeep Python doesn't have memory leaks. -- http://mail.python.org/mailman/listinfo/python-list
RE: Urgent : How to do memory leaks detection in python ?
This is not entirely true: Symptoms of increasing memory usage are either because a) you are keeping too much data around in user accessable memory (likely) b) you are creating self-referential structures that are not garbage collected (also likely) c) You have memory leaks in underlying C extension modules. For category a), you are on your own. For category b), you can use various methods in the gc module to print out everything that is still 'live'. You can also recompile python to build a list of all objects that are still live. For category c), a tool like valgrind or purify often helps. Create a simple example rather than trying to run it on your whole application. From: Michael Wieher [mailto:[EMAIL PROTECTED] Sent: Friday, March 14, 2008 10:16 AM To: python-list@python.org Subject: Re: Urgent : How to do memory leaks detection in python ? 2008/3/14, Pradeep Rai : Dear All, I am working on the python tools that process a huge amount of GIS data. These tools encountering the problem of memory leaks. Please suggest what are the different ways to detect the memory leaks in python ? This is very critical problem for me. Help needed urgently. Thanks Regards, Pradeep Python doesn't have memory leaks. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. IRS Circular 230 Disclosure: Please be advised that any discussion of U.S. tax matters contained within this communication (including any attachments) is not intended or written to be used and cannot be used for the purpose of (i) avoiding U.S. tax related penalties or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein. -- http://mail.python.org/mailman/listinfo/python-list
Re: URGENT REQUIREMENT FOR PYTHON DEVELOPERS
Krishna: You might want to consider reading http://www.python.org/community/jobs/howto/ and submitting these jobs to the Job Board. It's free. regards Steve [EMAIL PROTECTED] wrote: HI THIS IS KRISHNA KISHORE FROM MindRiver. We have an Urgent requirement for Python Developers who have 5-7 YRS of EXP. SKILLS :PYTHON AND C/C++ WORK LOCATION: BANGALROE PLEASE REVERT US WITH YOUR UPDATED PROFILES. Thanks Regards, Kishore Seethanraju |Senior Associate-People Consulting| MindRiver Information Technologies Pvt. Ltd. Suite# 512, 4th Floor and Suite # 104, Ground Floor ,Oxford Towers, 139, Airport Road, Bangalore 560 008| Tel: +91.80.3052.1600 |Direct: +91.80.3057.5799| Mobile: + 91.9901 96 1696 | Fax: +91.80.3057.5797| Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] | Web www.mindriver-it.com http://www.mindriver-it.com/ Information transmitted by this-mail is proprietary to MindRiver and / or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at the above mentioned telephone number or email to [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] and delete this mail from your records. We believe this email to be virus free but do not warrant that this is the case and we will not accept liability for any losses arising from any virus being transmitted unintentionally by us' -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://del.icio.us/steve.holden Sorry, the dog ate my .sigline -- http://mail.python.org/mailman/listinfo/python-list
Re: urgent - Matplolib with IDLE!
Dear Ana, I have the same problem with a similar setup (except Python 2.4.3) and have tried the same solutions (BTW those steps really did used to work on my machine using Python 2.3.5). In the short term you could either try IPython (a proper solution to this problem, which returns me to the prompt just fine after closing the figure) or try the following quick and dirty fix with IDLE: 1) If your script does stuff other than define classes and functions, put in a command that prevents it getting to the calculations (e.g. insert a 1/0 line) or, for instance, turn all your calculations into function calls that you can easily comment out (temporarily). Run your script using F5 so that you just get the prompt. 3) Create an empty figure using pylab.figure() or whatever. 2) Close the figure and the IDLE console (command prompt window) that opened when you ran the script (you have to say Yes when it asks about killing a python process). 3) This leaves an orphaned python process which you have to clean up later using your Task Manager, but ... 4) you can now continue to interact with any new IDLE console created in the current session when you bring up new figures. i.e. uncomment the parts of your script that actually do stuff and run it again. At least that's a quick fix that's working for me while I await a better answer too... Perhaps this hack will outrage someone's sensibilities sufficiently that we'll hear of a better IDLE solution. HTH, Rob -- http://mail.python.org/mailman/listinfo/python-list
Re: urgent - Matplolib with IDLE!
Hi, in site-packages/matplotlib/backends/backend_tkagg.py I commented out in the show function the line Tk.mainloop() In addition to the changes I mentioned in my first email, this has solved my problem! On 3/19/07, Rob Clewley [EMAIL PROTECTED] wrote: I have the same problem with a similar setup (except Python 2.4.3) and have tried the same solutions (BTW those steps really did used to work on my machine using Python 2.3.5). In the short term you could either try IPython (a proper solution to this problem, which returns me to the prompt just fine after closing the figure) or try the following quick and dirty fix with IDLE: 1) If your script does stuff other than define classes and functions, put in a command that prevents it getting to the calculations (e.g. insert a 1/0 line) or, for instance, turn all your calculations into function calls that you can easily comment out (temporarily). Run your script using F5 so that you just get the prompt. 3) Create an empty figure using pylab.figure() or whatever. 2) Close the figure and the IDLE console (command prompt window) that opened when you ran the script (you have to say Yes when it asks about killing a python process). 3) This leaves an orphaned python process which you have to clean up later using your Task Manager, but ... 4) you can now continue to interact with any new IDLE console created in the current session when you bring up new figures. i.e. uncomment the parts of your script that actually do stuff and run it again. At least that's a quick fix that's working for me while I await a better answer too... Perhaps this hack will outrage someone's sensibilities sufficiently that we'll hear of a better IDLE solution. HTH, Rob -- http://mail.python.org/mailman/listinfo/python-list
Re: Urgent Openings with the World's Leading Software Company !!!
Software Hiring [EMAIL PROTECTED] wrote: If you're interested in relocating to India for such a good opportunity and be a part of the World's Best Software Company and if you have good skill sets in: C, C++, C#, Java (for .Net Platform or Visual Studio) OR C, C++, Java, Product Development (for MS RFID Infrastructure PathFinder - Adapters) OR C, C++, driver or kernel, Linux or Unix (for Windows Serviceability) not much to do with python *closes eyes, and imagines the sing-song accent of the Indians contrasting with his guttural Afrikaans accent * *shudders* I think I will give this one a miss - it would be worse than relocating to Wales... - Hendrik -- http://mail.python.org/mailman/listinfo/python-list
Re: Urgent Openings with the World's Leading Software Company !!!
(cc'ed) Software Hiring [EMAIL PROTECTED] wrote an off-topic job announcement that make no mention of wanting Python programmers Hi Vamsi. Recruiting for Microsoft gives you no extra right to spam comp.lang.python with off-topic messages. There are thousands of other software groups that might like to do the same but with a couple of exceptions a year, they all desist for the greater common good. Please do likewise. tjr ps. A Microsoft recruiter using gmail is a puzzle, but that is a different off-topic issue. -- http://mail.python.org/mailman/listinfo/python-list
Re: Urgent: Embedding Python problems - advice sought
Thanks Michael. I will look into the areas you have suggested... Alan -- http://mail.python.org/mailman/listinfo/python-list
Re: Urgent: Embedding Python problems - advice sought
Does anyone have advice on other groups, sites etc that has knowledge of this subject ? Thanks -- http://mail.python.org/mailman/listinfo/python-list
Re: Urgent: Embedding Python problems - advice sought
[EMAIL PROTECTED] writes: Hi, I am embedding Python into a multi-threaded C++ application running on Solaris and need urgent clarification on the embedding architecture and its correct usage (as I am experience weird behaviors). What version of Python are you using? Can anyone clarify: - if Python correctly supports multiple sub-interpreters (Py_NewInterpreter) ? It's supposed to but it's not often used or tested and can get a bit flaky. - if Python correctly supports multiple thread states per sub-interpreter (PyThreadState_New) ? There are bugs in 2.3.5 and 2.4.1 in this area (they are fixed in CVS -- I hope -- and will be in 2.4.2). and the real question: - what is the rationale for choosing one of: [a] one sub-interpreter with many thread states This is the best tested and understood (it's what the core Python interpreter does, after all). [b] many sub-interpreters with one thread state each [c] many sub-interpreters with many threas states each These are probably somewhat broken in recent Python's, I'm afraid. Can you try CVS? Cheers, mwh -- ARTHUR: Yes. It was on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign on the door saying Beware of the Leopard. -- The Hitch-Hikers Guide to the Galaxy, Episode 1 -- http://mail.python.org/mailman/listinfo/python-list
Re: Urgent: Embedding Python problems - advice sought
[EMAIL PROTECTED] writes: Does anyone have advice on other groups, sites etc that has knowledge of this subject ? I've just replied to your original post, having not seen it the first time around. Cheers, mwh -- Nafai w00t w00t w00t w00t! Nafai I don't understand all of the code, but it works! Nafai I guess I should check it in. -- from Twisted.Quotes -- http://mail.python.org/mailman/listinfo/python-list