Re: Saving/exporting plots from Jupyter-labs?

2022-02-21 Thread Martin Schöön
Den 2022-02-14 skrev Martin Schöön : > > Now I am trying out Jupyter-labs. I like it. I have two head- > scratchers for now: > > 2) Why is Jupyter-labs hooking up to Google-analytics? Now I can answer this one myself. In a tab I had been working my way through a Holoviews tutorial. The tutorial d

Re: Saving/exporting plots from Jupyter-labs?

2022-02-15 Thread Martin Schöön
Den 2022-02-15 skrev Reto : > On Mon, Feb 14, 2022 at 08:54:01PM +, Martin Schöön wrote: >> 1) In notebooks I can save a plot by right-clicking on it and do >> save image as. In Jupyter-lab that does not work and so far I >> have not been able to figure out how to do it. Yes, I have looked >> i

Re: Saving/exporting plots from Jupyter-labs?

2022-02-14 Thread Reto
On Mon, Feb 14, 2022 at 08:54:01PM +, Martin Schöön wrote: > 1) In notebooks I can save a plot by right-clicking on it and do > save image as. In Jupyter-lab that does not work and so far I > have not been able to figure out how to do it. Yes, I have looked > in the documentation. Shift + righ

Re: Saving application configuration to the ini file respecting order of sections/options and providing mechanism for (nested) complex objects

2018-08-22 Thread zljubisic
Thanks. As I can see python 3.7 is the best option. Thank you very very muchs for the code as well. Best regards. -- https://mail.python.org/mailman/listinfo/python-list

Re: Saving application configuration to the ini file respecting order of sections/options and providing mechanism for (nested) complex objects

2018-08-21 Thread Peter Otten
zljubi...@gmail.com wrote: > 1. saving json will result in unordered ini file. It could be solved by > using OrderedDict that will than with json.dumps be saved to file in the > same order as options are added to the ordered dict. dict-s are guaranteed to keep insertion order in Python 3.7, see

Re: saving octet-stream png file

2016-08-22 Thread Jon Ribbens
On 2016-08-22, Larry Martell wrote: > On Mon, Aug 22, 2016 at 1:25 PM, Jon Ribbens > wrote: >> On 2016-08-22, Larry Martell wrote: >>> (Pdb) type(request.POST[key]) >>> >>> (Pdb) request.encoding = "iso-8859-1" >>> (Pdb) type(request.POST[key]) >>> *** MultiValueDictKeyError: >>> "u'right-carot

Re: saving octet-stream png file

2016-08-22 Thread Larry Martell
On Mon, Aug 22, 2016 at 1:25 PM, Jon Ribbens wrote: > On 2016-08-22, Larry Martell wrote: >> On Sun, Aug 21, 2016 at 5:24 PM, Jon Ribbens >> wrote: >>> On 2016-08-19, Larry Martell wrote: fd.write(request.POST[key]) >>> >>> You could try: >>> >>> request.encoding = "iso-8859-1" >>> fd

Re: saving octet-stream png file

2016-08-22 Thread Wildman via Python-list
On Mon, 22 Aug 2016 13:21:43 -0400, Larry Martell wrote: > On Fri, Aug 19, 2016 at 4:51 PM, Lawrence D’Oliveiro > wrote: >> On Saturday, August 20, 2016 at 6:03:53 AM UTC+12, Terry Reedy wrote: >>> >>> An 'octet' is a byte of 8 bits. >> >> Is there any other size of byte? > > Many, many years ag

Re: saving octet-stream png file

2016-08-22 Thread Jon Ribbens
On 2016-08-22, Larry Martell wrote: > On Sun, Aug 21, 2016 at 5:24 PM, Jon Ribbens > wrote: >> On 2016-08-19, Larry Martell wrote: >>> fd.write(request.POST[key]) >> >> You could try: >> >> request.encoding = "iso-8859-1" >> fd.write(request.POST[key].encode("iso-8859-1")) >> >> It's hacky

Re: saving octet-stream png file

2016-08-22 Thread Larry Martell
On Fri, Aug 19, 2016 at 4:51 PM, Lawrence D’Oliveiro wrote: > On Saturday, August 20, 2016 at 6:03:53 AM UTC+12, Terry Reedy wrote: >> >> An 'octet' is a byte of 8 bits. > > Is there any other size of byte? Many, many years ago, probably c. 1982 my Dad came into my house and saw a Byte Magazine l

Re: saving octet-stream png file

2016-08-22 Thread Larry Martell
On Mon, Aug 22, 2016 at 10:36 AM, Larry Martell wrote: > On Fri, Aug 19, 2016 at 4:24 PM, Chris Kaynor > wrote: >> On Fri, Aug 19, 2016 at 12:00 PM, Larry Martell >> wrote: >> >>> On Fri, Aug 19, 2016 at 1:24 PM, Chris Angelico wrote: >>> > On Sat, Aug 20, 2016 at 3:10 AM, Larry Martell >>> w

Re: saving octet-stream png file

2016-08-22 Thread Larry Martell
On Fri, Aug 19, 2016 at 4:24 PM, Chris Kaynor wrote: > On Fri, Aug 19, 2016 at 12:00 PM, Larry Martell > wrote: > >> On Fri, Aug 19, 2016 at 1:24 PM, Chris Angelico wrote: >> > On Sat, Aug 20, 2016 at 3:10 AM, Larry Martell >> wrote: >> >> I have some python code (part of a django app) that pro

Re: saving octet-stream png file

2016-08-22 Thread Larry Martell
On Sun, Aug 21, 2016 at 5:24 PM, Jon Ribbens wrote: > On 2016-08-19, Larry Martell wrote: >> fd.write(request.POST[key]) > > You could try: > > request.encoding = "iso-8859-1" > fd.write(request.POST[key].encode("iso-8859-1")) > > It's hacky and nasty and there might be a better "official" me

Re: saving octet-stream png file

2016-08-21 Thread Jon Ribbens
On 2016-08-19, Larry Martell wrote: > fd.write(request.POST[key]) You could try: request.encoding = "iso-8859-1" fd.write(request.POST[key].encode("iso-8859-1")) It's hacky and nasty and there might be a better "official" method but I think it should work. -- https://mail.python.org/mailma

Re: saving octet-stream png file

2016-08-20 Thread Marko Rauhamaa
Random832 : > On Sat, Aug 20, 2016, at 03:50, Marko Rauhamaa wrote: >> 2'scomplement arithmetics is quite often taken advantage of in C >> programming. Unfortunately, with the castration of signed integers >> with the most recent C standards, 2's-complement has been dangerously >> broken. > > No p

Re: saving octet-stream png file

2016-08-20 Thread Grant Edwards
On 2016-08-19, Random832 wrote: > On Fri, Aug 19, 2016, at 16:51, Lawrence D’Oliveiro wrote: >> On Saturday, August 20, 2016 at 6:03:53 AM UTC+12, Terry Reedy wrote: >> > >> > An 'octet' is a byte of 8 bits. >> >> Is there any other size of byte? > > Not very often anymore. Used to be some system

Re: saving octet-stream png file

2016-08-20 Thread Random832
On Sat, Aug 20, 2016, at 03:50, Marko Rauhamaa wrote: > 2'scomplement arithmetics is quite often taken advantage of in C > programming. Unfortunately, with the castration of signed integers with > the most recent C standards, 2's-complement has been dangerously broken. No part of any version of th

Re: saving octet-stream png file

2016-08-20 Thread Marko Rauhamaa
Random832 : > On Fri, Aug 19, 2016, at 16:51, Lawrence D’Oliveiro wrote: >> On Saturday, August 20, 2016 at 6:03:53 AM UTC+12, Terry Reedy wrote: >> > An 'octet' is a byte of 8 bits. >> Is there any other size of byte? > Not very often anymore. The main difference between an octet and a byte is t

Re: saving octet-stream png file

2016-08-19 Thread Random832
On Fri, Aug 19, 2016, at 21:09, Steve D'Aprano wrote: > Depends what you mean by "byte", but the short answer is "Yes". > > In the C/C++ standard, bytes must be at least eight bytes. As the below > FAQ > explains, that means that on machines like the PDP-10 a C++ compiler will > define bytes to be

Re: saving octet-stream png file

2016-08-19 Thread Steve D'Aprano
On Sat, 20 Aug 2016 06:51 am, Lawrence D’Oliveiro wrote: > On Saturday, August 20, 2016 at 6:03:53 AM UTC+12, Terry Reedy wrote: >> >> An 'octet' is a byte of 8 bits. > > Is there any other size of byte? Depends what you mean by "byte", but the short answer is "Yes". In the C/C++ standard, byt

Re: saving octet-stream png file

2016-08-19 Thread Random832
On Fri, Aug 19, 2016, at 16:51, Lawrence D’Oliveiro wrote: > On Saturday, August 20, 2016 at 6:03:53 AM UTC+12, Terry Reedy wrote: > > > > An 'octet' is a byte of 8 bits. > > Is there any other size of byte? Not very often anymore. Used to be some systems had 9-bit bytes, and of course a lot of c

Re: saving octet-stream png file

2016-08-19 Thread Lawrence D’Oliveiro
On Saturday, August 20, 2016 at 6:03:53 AM UTC+12, Terry Reedy wrote: > > An 'octet' is a byte of 8 bits. Is there any other size of byte? -- https://mail.python.org/mailman/listinfo/python-list

Re: saving octet-stream png file

2016-08-19 Thread Chris Kaynor
On Fri, Aug 19, 2016 at 12:00 PM, Larry Martell wrote: > On Fri, Aug 19, 2016 at 1:24 PM, Chris Angelico wrote: > > On Sat, Aug 20, 2016 at 3:10 AM, Larry Martell > wrote: > >> I have some python code (part of a django app) that processes a > >> request that contains a png file. The request is

Re: saving octet-stream png file

2016-08-19 Thread Larry Martell
On Fri, Aug 19, 2016 at 3:00 PM, Larry Martell wrote: > On Fri, Aug 19, 2016 at 1:24 PM, Chris Angelico wrote: >> On Sat, Aug 20, 2016 at 3:10 AM, Larry Martell >> wrote: >>> I have some python code (part of a django app) that processes a >>> request that contains a png file. The request is sen

Re: saving octet-stream png file

2016-08-19 Thread Larry Martell
On Fri, Aug 19, 2016 at 1:24 PM, Chris Angelico wrote: > On Sat, Aug 20, 2016 at 3:10 AM, Larry Martell > wrote: >> I have some python code (part of a django app) that processes a >> request that contains a png file. The request is send with >> content_type = 'application/octet-stream' >> >> In

Re: saving octet-stream png file

2016-08-19 Thread Terry Reedy
On 8/19/2016 1:10 PM, Larry Martell wrote: I have some python code (part of a django app) that processes a request that contains a png file. The request is send with content_type = 'application/octet-stream' An 'octet' is a byte of 8 bits. So the content is a stream of bytes and MUST NOT be d

Re: saving octet-stream png file

2016-08-19 Thread Chris Angelico
On Sat, Aug 20, 2016 at 3:10 AM, Larry Martell wrote: > I have some python code (part of a django app) that processes a > request that contains a png file. The request is send with > content_type = 'application/octet-stream' > > In the python code I want to write this data to a file and still have

Re: Saving Consol outputs in a python script

2016-05-03 Thread Terry Reedy
On 5/3/2016 8:14 AM, drewes@gmail.com wrote: Hello, I'm new to python and have a Question. I'm running a c++ file with a python script like: import os import subprocess subprocess.call(["~/caffe/build/examples/cpp_classification/classification", "deploy.prototxt", "this.caffemodel", "mean

Re: Saving Consol outputs in a python script

2016-05-03 Thread Stephen Hansen
On Tue, May 3, 2016, at 05:14 AM, drewes@gmail.com wrote: > What I need are the 2 values for the 2 classes saved in a variable in the > .py script, so that I can write them into a text file. > > Would be super nice if someone could help me! You shouldn't use the call() convienence function, b

Re: Saving Consol outputs in a python script

2016-05-03 Thread DFS
On 5/3/2016 8:14 AM, drewes@gmail.com wrote: Hello, I'm new to python and have a Question. I'm running a c++ file with a python script like: import os import subprocess subprocess.call(["~/caffe/build/examples/cpp_classification/classification", "deploy.prototxt", "this.caffemodel", "mean

Re: Saving a file "in the background" -- How?

2014-10-31 Thread Chris Angelico
On Sat, Nov 1, 2014 at 1:06 AM, Steven D'Aprano wrote: > Chris Angelico wrote: > >> Sounds like a lot of hassle, and a lot of things that could be done >> wrongly. Personally, if I need that level of reliability and >> atomicity, I'd rather push the whole question down to a lower level: >> maybe c

Re: Saving a file "in the background" -- How?

2014-10-31 Thread Steven D'Aprano
Chris Angelico wrote: > Sounds like a lot of hassle, and a lot of things that could be done > wrongly. Personally, if I need that level of reliability and > atomicity, I'd rather push the whole question down to a lower level: > maybe commit something to a git repository and push it to a remote > s

Re: Saving a file "in the background" -- How?

2014-10-31 Thread Chris Angelico
On Fri, Oct 31, 2014 at 11:07 PM, Akira Li <4kir4...@gmail.com> wrote: > where atomic_open() [1] tries to overcome multiple issues with saving > data reliably: > > - write to a temporary file so that the old data is always available > - rename the file when all new data is written, handle cases suc

Re: Saving a file "in the background" -- How?

2014-10-31 Thread Akira Li
Virgil Stokes writes: > While running a python program I need to save some of the data that is > being created. I would like to save the data to a file on a disk > according to a periodical schedule (e.g. every 10 > minutes). Initially, the amount of data is small (< 1 MB) but after > sometime t

Re: Saving a file "in the background" -- How?

2014-10-30 Thread Terry Reedy
On 10/30/2014 6:21 PM, Joel Goldstick wrote: On Thu, Oct 30, 2014 at 5:30 PM, Virgil Stokes wrote: While running a python program I need to save some of the data that is being created. I would like to save the data to a file on a disk according to a periodical schedule (e.g. every 10 minutes).

Re: Saving a file "in the background" -- How?

2014-10-30 Thread Deepfriedice
Why not just call the save function as a separate thread? threading.Thread(target=save, args=(data)).start() -- https://mail.python.org/mailman/listinfo/python-list

Re: Saving a file "in the background" -- How?

2014-10-30 Thread Joel Goldstick
On Thu, Oct 30, 2014 at 5:30 PM, Virgil Stokes wrote: > While running a python program I need to save some of the data that is being > created. I would like to save the data to a file on a disk according to a > periodical schedule (e.g. every 10 minutes). Initially, the amount of data > is small

Re: Saving

2014-07-07 Thread Denis McMahon
On Sun, 06 Jul 2014 23:03:07 +, mrwhackadoo1 wrote: > Hi, I’ve been looking forever for this and I cant get it. > > I need to know how to save my code and save as programs because I write > code and I run it but then I cant save it for later. > > Please help and thank you for your time. Wri

Re: Saving

2014-07-06 Thread Cameron Simpson
On 06Jul2014 23:03, mrwhackad...@gmail.com wrote: I need to know how to save my code and save as programs because I write code Please help and thank you for your time. Please tell a bit more about your work environment (editors, IDEs, computer OS, etc). The basic answer to your question is t

Re: Saving changes to path

2011-07-19 Thread Ethan Furman
Chess Club wrote: Hello, I used sys.path.append() to add to the path directory, but the changes made are not saved when I exit the compiler. Is there a way to save it? Do you mean saved as in your PATH environment variable is now changed? This would be bad. Not sure about *nix, but on M$ Win

Re: Saving changes to path

2011-07-19 Thread Billy Mays
On 07/19/2011 02:24 PM, Chess Club wrote: Hello, I used sys.path.append() to add to the path directory, but the changes made are not saved when I exit the compiler. Is there a way to save it? Thank you. Since python is running in a child process, it only affects its own environment variables

Re: Saving (unusual) linux filenames

2010-09-01 Thread Albert van der Horst
In article , Grant Edwards wrote: >On 2010-08-31, MRAB wrote: >> On 31/08/2010 17:58, Grant Edwards wrote: >>> On 2010-08-31, MRAB wrote: On 31/08/2010 15:49, amfr...@web.de wrote: > Hi, > > i have a script that reads and writes linux paths in a file. I save the > path (as

Re: Saving (unusual) linux filenames

2010-08-31 Thread Nobody
On Tue, 31 Aug 2010 18:49:33 +, Grant Edwards wrote: >> How many filenames contain control characters? > > How many filenames contain ","? Not many, Unless you only ever deal with "Unix folk", it's not /that/ uncommon to encounter filenames which are essentially complete sentences, punctuat

Re: Saving (unusual) linux filenames

2010-08-31 Thread Alan Meyer
On 8/31/2010 2:33 PM, Nobody wrote: ... FWIW, my usual solution is URL-encoding (i.e. replacing any "awkward" character by a "%" followed by two hex digits representing the byte's value). It has the advantage that you can extend the set of bytes which need encoding as needed without having to ch

Re: Saving (unusual) linux filenames

2010-08-31 Thread AmFreak
Thanks for all the nice answers! The normal thing to do is to escape the delimiter when it appears in data. There are lots of plenty of escaping standards to choose from, and some of them (e.g. the one used for URLs) are already present in various bits of Python's standard library. The CSV mo

Re: Saving (unusual) linux filenames

2010-08-31 Thread Stefan Schwarzer
Hi Grant, On 2010-08-31 20:49, Grant Edwards wrote: > How many filenames contain ","? CVS repository files end with ,v . However, just let's agree that nobody uses CVS anymore. :-) > Not many, but the OP wants his > program to be bulletproof. Can't fault him for that. What about using the csv

Re: Saving (unusual) linux filenames

2010-08-31 Thread Arnaud Delobelle
amfr...@web.de writes: > Hi, > > i have a script that reads and writes linux paths in a file. I save > the path (as unicode) with 2 other variables. I save them seperated by > "," and the "packets" by newlines. So my file looks like this: > path1, var1A, var1B > path2, var2A, var2B > path3, var3A

Re: Saving (unusual) linux filenames

2010-08-31 Thread MRAB
On 31/08/2010 19:33, Nobody wrote: On Tue, 31 Aug 2010 18:13:44 +0100, MRAB wrote: this works for "normal" paths but as soon as i have a path that does include a "," it breaks. The problem now is that (afaik) linux allows every char (aside from "/" and null) to be used in filenames. The only so

Re: Saving (unusual) linux filenames

2010-08-31 Thread Grant Edwards
On 2010-08-31, MRAB wrote: > On 31/08/2010 17:58, Grant Edwards wrote: >> On 2010-08-31, MRAB wrote: >>> On 31/08/2010 15:49, amfr...@web.de wrote: Hi, i have a script that reads and writes linux paths in a file. I save the path (as unicode) with 2 other variables. I save them

Re: Saving (unusual) linux filenames

2010-08-31 Thread Nobody
On Tue, 31 Aug 2010 18:13:44 +0100, MRAB wrote: this works for "normal" paths but as soon as i have a path that does include a "," it breaks. The problem now is that (afaik) linux allows every char (aside from "/" and null) to be used in filenames. The only solution i can think

Re: Saving (unusual) linux filenames

2010-08-31 Thread Albert Hopkins
On Tue, 2010-08-31 at 16:49 +0200, amfr...@web.de wrote: > i have a script that reads and writes linux paths in a file. I save > the > path (as unicode) with 2 other variables. I save them seperated by "," > and > the "packets" by newlines. So my file looks like this: > path1, var1A, var1B > pa

Re: Saving (unusual) linux filenames

2010-08-31 Thread MRAB
On 31/08/2010 17:58, Grant Edwards wrote: On 2010-08-31, MRAB wrote: On 31/08/2010 15:49, amfr...@web.de wrote: Hi, i have a script that reads and writes linux paths in a file. I save the path (as unicode) with 2 other variables. I save them seperated by "," and the "packets" by newlines. So

Re: Saving (unusual) linux filenames

2010-08-31 Thread Grant Edwards
On 2010-08-31, MRAB wrote: > On 31/08/2010 15:49, amfr...@web.de wrote: >> Hi, >> >> i have a script that reads and writes linux paths in a file. I save the >> path (as unicode) with 2 other variables. I save them seperated by "," >> and the "packets" by newlines. So my file looks like this: >> pa

Re: Saving (unusual) linux filenames

2010-08-31 Thread Jeremy Sanders
amfr...@web.de wrote: > i have a script that reads and writes linux paths in a file. I save the > path (as unicode) with 2 other variables. I save them seperated by "," and > the "packets" by newlines. So my file looks like this: > path1, var1A, var1B > path2, var2A, var2B > path3, var3A, var3B I

Re: Saving (unusual) linux filenames

2010-08-31 Thread MRAB
On 31/08/2010 15:49, amfr...@web.de wrote: Hi, i have a script that reads and writes linux paths in a file. I save the path (as unicode) with 2 other variables. I save them seperated by "," and the "packets" by newlines. So my file looks like this: path1, var1A, var1B path2, var2A, var2B path3,

Re: Saving (unusual) linux filenames

2010-08-31 Thread Grant Edwards
On 2010-08-31, amfr...@web.de wrote: > Hi, > > i have a script that reads and writes linux paths in a file. I save the > path (as unicode) with 2 other variables. I save them seperated by "," and > the "packets" by newlines. So my file looks like this: > path1, var1A, var1B > path2, var2A, var

Re: Saving a page loaded using the webbrowser library?

2010-03-25 Thread Irmen de Jong
On 3/25/10 8:41 AM, Dr. Benjamin David Clarke wrote: Does anyone know of a way to save the a loaded web page to file after opening it with a webbrowser.open() call? Specifically, what I want to do is get the raw HTML from a web page. This web page uses Javascript. I need the resulting HTML after

Re: Saving the Interactive Window with PythonWin

2010-02-21 Thread Mark Hammond
On 22/02/2010 4:28 AM, vsoler wrote: Hi everyone, When I run a python script, I know that I can print the results of my calculations on the Interactive Window. Once the scripts ends, I can copy/pate these results on an OpenOffice Writer document. However, I would like to know if I can somehow a

Re: saving a TIFF

2010-02-15 Thread Benjamin Kaplan
On Mon, Feb 15, 2010 at 12:55 PM, fernando sedano wrote: > I'm trying to save an image created from two arrays (I'm using numpy and > PIL): > > > n=(b4a-b3a)/(b4a+b3a); > ndvi = Image.fromarray(n) > ndvi.save("F:\Fire_scar_mapping\ILS3\ndvi_test","TIFF") > > ...but I get the following erro

Re: saving an e-mail attachement

2008-08-01 Thread Aspersieman
[EMAIL PROTECTED] wrote: > I'm trying to figure out how to save an e-mail attachment from a POP3 > mailbox. I've scoured the web, but -none- of the examples I have > found have actually worked. For instance, in this example: > http://groups.google.com/group/comp.lang.python/browse_thread/thread/8

Re: Saving tif file from tricky webserver

2008-05-30 Thread Diez B. Roggisch
schweet1 schrieb: Greetings, I am attempting to automate accessing and saving a file (a TIF) from the following URL: http://patimg1.uspto.gov/.DImg?Docid=US007376435&PageNum=1&IDKey=E21184B8FAD5 I have tried some methods using urllib, httplib, and web32com.client(InternetExplorer), but haven't

Re: Saving an audio file's waveform into an image

2008-05-12 Thread Joshua Kugler
Julien wrote: > Hi, > > I would like to pull out the waveform of an audio file and save it > into an image file, for example in GIF format. Is that achievable, and > if so, how? Take a look at http://code.enthought.com/projects/chaco/ One of their examples does exactly this. Last example on thi

Re: Saving an audio file's waveform into an image

2008-05-12 Thread Robert.Spilleboudt
I am using Snack to process the audio signal of a rc transmitter. Look at http://www.speech.kth.se/snack/ Another audio processing: PortAudio and the Python module PyAudio. Look at http://people.csail.mit.edu/hubert/pyaudio/ Robert Julien wrote: Hi, I would like to pull out the waveform of an

Re: Saving an audio file's waveform into an image

2008-05-11 Thread Larry Hale
On May 9, 1:55 am, Julien <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to pull out the waveform of an audio file and save it > into an image file, for example in GIF format. Is that achievable, and > if so, how? > > I heard about the Snack module, but the project looks dead and un- > maintaine

Re: saving a webpage's links to the hard disk

2008-05-07 Thread castironpi
On May 7, 8:36 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Jetus wrote: > > On May 4, 7:22 am, [EMAIL PROTECTED] wrote: > >> On May 4, 12:33 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > >> wrote: > > >> > En Sun, 04 May 2008 01:33:45 -0300, Jetus <[EMAIL PROTECTED]> > >> > escribió: > > >>

Re: saving a webpage's links to the hard disk

2008-05-07 Thread Diez B. Roggisch
Jetus wrote: > On May 4, 7:22 am, [EMAIL PROTECTED] wrote: >> On May 4, 12:33 am, "Gabriel Genellina" <[EMAIL PROTECTED]> >> wrote: >> >> > En Sun, 04 May 2008 01:33:45 -0300, Jetus <[EMAIL PROTECTED]> >> > escribió: >> >> > > Is there a good place to look to see where I can find some code that >>

Re: saving a webpage's links to the hard disk

2008-05-07 Thread castironpi
On May 7, 1:40 am, Jetus <[EMAIL PROTECTED]> wrote: > On May 4, 7:22 am, [EMAIL PROTECTED] wrote: > > > > > > > On May 4, 12:33 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > > wrote: > > > > En Sun, 04 May 2008 01:33:45 -0300, Jetus <[EMAIL PROTECTED]> escribió: > > > > > Is there a good place to l

Re: saving a webpage's links to the hard disk

2008-05-06 Thread Jetus
On May 4, 7:22 am, [EMAIL PROTECTED] wrote: > On May 4, 12:33 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: > > > En Sun, 04 May 2008 01:33:45 -0300, Jetus <[EMAIL PROTECTED]> escribió: > > > > Is there a good place to look to see where I can find some code that > > > will help me to save we

Re: saving a webpage's links to the hard disk

2008-05-04 Thread castironpi
On May 4, 12:33 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sun, 04 May 2008 01:33:45 -0300, Jetus <[EMAIL PROTECTED]> escribió: > > > Is there a good place to look to see where I can find some code that > > will help me to save webpage's links to the local drive, after I have > > used

Re: saving a webpage's links to the hard disk

2008-05-03 Thread Gabriel Genellina
En Sun, 04 May 2008 01:33:45 -0300, Jetus <[EMAIL PROTECTED]> escribió: > Is there a good place to look to see where I can find some code that > will help me to save webpage's links to the local drive, after I have > used urllib2 to retrieve the page? > Many times I have to view these pages when I

Re: Saving parameters between Python applications?

2007-10-13 Thread Stodge
os.getppid() isn't cross platform. I don't think it works on Windows. I think I'll just create a simple shell script (BAT or Bash) for each platform as needed. Thanks On Sep 20, 3:17 pm, David <[EMAIL PROTECTED]> wrote: > On 9/16/07, Stodge <[EMAIL PROTECTED]> wrote: > > > > > I'm trying to do th

Re: Saving parameters between Python applications?

2007-09-20 Thread David
On 9/16/07, Stodge <[EMAIL PROTECTED]> wrote: > I'm trying to do the following. I have a Python application that is > run: > > python app1.py --location=c:\test1 > > What I want to do is save the location parameter, so I can then do (in > the same window): > > python app2.py > > And have app2.py au

Re: Saving parameters between Python applications?

2007-09-19 Thread Stodge
I wrote a small C program in Linux and used setenv() from stdlib and it modified the console's environment. I can also modify the console's environment from a DOS batch file, so why not in Python? Guess I'm inexperienced and I just don't get it. :) On Sep 18, 11:48 am, Steve Holden <[EMAIL PROTEC

Re: Saving parameters between Python applications?

2007-09-18 Thread Steve Holden
Stodge wrote: > os.path.expanduser isn't an option; I need each console/window to > maintain different values which I wouldn't get from saving to a user's > home directory. Unless I used a different file for each console/window > but that just gets me into the same situation I'm already in. I think

Re: Saving parameters between Python applications?

2007-09-18 Thread Diez B. Roggisch
Stodge wrote: > os.path.expanduser isn't an option; I need each console/window to > maintain different values which I wouldn't get from saving to a user's > home directory. Unless I used a different file for each console/window > but that just gets me into the same situation I'm already in. I thin

Re: Saving parameters between Python applications?

2007-09-18 Thread Bruno Desthuilliers
Stodge a écrit : > os.path.expanduser isn't an option; I need each console/window to > maintain different values which I wouldn't get from saving to a user's > home directory. Unless I used a different file for each console/window > but that just gets me into the same situation I'm already in. I th

Re: Saving parameters between Python applications?

2007-09-18 Thread Stodge
os.path.expanduser isn't an option; I need each console/window to maintain different values which I wouldn't get from saving to a user's home directory. Unless I used a different file for each console/window but that just gets me into the same situation I'm already in. I think the only option is to

Re: Saving parameters between Python applications?

2007-09-17 Thread bryanjugglercryptographer
On Sep 17, 6:39 am, Laurent Pointal > May use simple file in known place: > $HOME/.myprefs > $HOME/.conf/myprefs > > Or host specific configuration API: > WindowsRegistry HKEY_CURRENT_USER\Software\MySociety\MyApp\myprefs > > See os.getenv, and _winreg Windows specific module. > See also standard C

Re: Saving parameters between Python applications?

2007-09-17 Thread Stodge
You're probably right! Thanks all. :) On Sep 17, 10:15 am, Bruno Desthuilliers wrote: > Stodge a écrit : > > > > > I'm trying to do the following. I have a Python application that is > > run: > > > python app1.py --location=c:\test1 > > > What I want to do is save the location parameter, so I ca

Re: Saving parameters between Python applications?

2007-09-17 Thread Bruno Desthuilliers
Stodge a écrit : > I'm trying to do the following. I have a Python application that is > run: > > python app1.py --location=c:\test1 > > What I want to do is save the location parameter, so I can then do (in > the same window): > > python app2.py > > And have app2.py automatically have access t

Re: Saving parameters between Python applications?

2007-09-17 Thread Laurent Pointal
Stodge a écrit : > I'm trying to do the following. I have a Python application that is > run: > > python app1.py --location=c:\test1 > > What I want to do is save the location parameter, so I can then do (in > the same window): > > python app2.py > > And have app2.py automatically have access t

Re: Saving parameters between Python applications?

2007-09-17 Thread Sebastian Bassi
On 9/17/07, Stodge <[EMAIL PROTECTED]> wrote: > Good idea, but I can't guarantee that the two scripts will be run from > the same directory - so where to store the pickle? It doesn't matter if is the same directory or not, as long as both programs has access to the pickle file (one program should

Re: Saving parameters between Python applications?

2007-09-17 Thread Stodge
Good idea, but I can't guarantee that the two scripts will be run from the same directory - so where to store the pickle? On Sep 16, 5:25 pm, "Sebastian Bassi" <[EMAIL PROTECTED]> wrote: > On 9/16/07, Stodge <[EMAIL PROTECTED]> wrote: > > > python app1.py --location=c:\test1 > > What I want to do

Re: Saving parameters between Python applications?

2007-09-16 Thread Sebastian Bassi
On 9/16/07, Stodge <[EMAIL PROTECTED]> wrote: > python app1.py --location=c:\test1 > What I want to do is save the location parameter, so I can then do (in > the same window): > python app2.py > And have app2.py automatically have access to the value of "location". Do app1.py to save a pickle of t

Re: Saving output of Turtle Graphics?

2007-04-07 Thread Dick Moores
At 09:31 AM 4/7/2007, =?ISO-8859-2?Q?Wojciech_Mu=B3a?= wrote: >Dick Moores wrote: > > What do I do to see this? > >For example Opera 9 and Firefox 1.5+ are able to view SVG files; >there is a free plugin for IrfanView. Ha. I had tried it with Firefox 2 already, but I stupidly changed the extensio

Re: Saving output of Turtle Graphics?

2007-04-07 Thread Peter Otten
Dick Moores wrote: > OK, thanks, now I've got [an svg file] > What do I do to see this? You can convert it to a jpeg using ImageMagick's convert. Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Saving output of Turtle Graphics?

2007-04-07 Thread Wojciech Muła
Dick Moores wrote: > What do I do to see this? For example Opera 9 and Firefox 1.5+ are able to view SVG files; there is a free plugin for IrfanView. w. -- http://mail.python.org/mailman/listinfo/python-list

Re: Saving output of Turtle Graphics?

2007-04-07 Thread Dick Moores
At 08:48 AM 4/7/2007, =?ISO-8859-2?Q?Wojciech_Mu=B3a?= wrote: >Dick Moores wrote: > >> Turtle module uses Tk canvas element to draw graphics ('_canvas' > >> attribute). I've written module, that exports canvas graphics to SVG > >> file: http://wmula.republika.pl/proj/canvas2svg/ -- it may be useful

Re: Saving output of Turtle Graphics?

2007-04-07 Thread Wojciech Muła
Dick Moores wrote: >> Turtle module uses Tk canvas element to draw graphics ('_canvas' >> attribute). I've written module, that exports canvas graphics to SVG >> file: http://wmula.republika.pl/proj/canvas2svg/ -- it may be useful >> for you. > > I afraid I'm totally unfamiliar with SVG. Would it

Re: Saving output of Turtle Graphics?

2007-04-07 Thread Dick Moores
At 06:50 AM 4/7/2007, =?ISO-8859-2?Q?Wojciech_Mu=B3a?= wrote: >Dick Moores wrote: > > I accidentally stumbled across the Turtle Graphics module (turtle.py) > > the other day and have been having some fun with it. > > > > Now I'm wondering if there is a way to build into a script the saving of > > e

Re: Saving output of Turtle Graphics?

2007-04-07 Thread Wojciech Muła
Dick Moores wrote: > I accidentally stumbled across the Turtle Graphics module (turtle.py) > the other day and have been having some fun with it. > > Now I'm wondering if there is a way to build into a script the saving of > each window just before it is cleared. For example, here are a couple

Re: saving Python process state for later debugging

2007-04-01 Thread yossi . kreinin
On Apr 1, 2:57 pm, "aspineux" wrote: > > A context in python is no more than 2 dictionaries ( globals() and > locals()). > You can easily serialize both to store them. I don't think it will work with objects defined by extension modules, except if they somehow support serialization, will it? I gue

Re: saving Python process state for later debugging

2007-04-01 Thread aspineux
On 1 avr, 09:39, [EMAIL PROTECTED] wrote: > On Apr 1, 2:07 am, "aspineux" <[EMAIL PROTECTED]> wrote: > > > > > Pylon has something like > > that.http://pylonshq.com/docs/0.9.4.1/interactive_debugger.html > > > Turbogears has the same with option tg.fancy_exception > > I could get it wrong, but the

Re: saving Python process state for later debugging

2007-03-31 Thread yossi . kreinin
On Apr 1, 2:07 am, "aspineux" <[EMAIL PROTECTED]> wrote: > > Pylon has something like > that.http://pylonshq.com/docs/0.9.4.1/interactive_debugger.html > > Turbogears has the same with option tg.fancy_exception > I could get it wrong, but these things seem to be about debugging crashed processes

Re: saving Python process state for later debugging

2007-03-31 Thread aspineux
On 31 mar, 16:48, [EMAIL PROTECTED] wrote: > Hi! > > Is there a way to save the state of a Python process for later > inspection with a debugger? One way to do this is to dump core, but is > the result usable for debugging with pdb (it can be debugged by gdb, > which can inspect PyObjects in a CPyt

Re: saving algorithm

2007-03-25 Thread Gabriel Genellina
En Fri, 23 Mar 2007 20:42:33 -0300, mona bin jubair <[EMAIL PROTECTED]> escribió: > i want to ask about the algorithm's steps of saving > games(sudoku,battleship)? First determine what goes into the game "state" (that is, what defines the current state of the game). Perhaps you also want

Re: saving path to modules permanently

2007-02-16 Thread Steve Holden
Frank wrote: > Hi, > > I want to create some modules to use them in my programs. Now the > problem is, how to add the path to these modules permanently to the > python search path. > > For example: > > import sys > sys.path.append('path to my modules') > > > works fine for one session but does

Re: Saving PyOpenGl figures as ps

2007-02-11 Thread Mike C. Fletcher
Frank wrote: > Hi, > > I installed pyopengl (opengl for python) on my linux box and > everything works fine. But now I want to save the generated images as, > e.g., ps or eps. How can I do that and how can I adjust the resolution > (if necessary)? This is probably simple but for some reason I can n

Re: Saving PyOpenGl figures as ps

2007-02-11 Thread Vasily Sulatskov
On Feb 12, 3:11 am, "Frank" <[EMAIL PROTECTED]> wrote: > Hi, > > I installed pyopengl (opengl for python) on my linux box and > everything works fine. But now I want to save the generated images as, > e.g., ps or eps. How can I do that and how can I adjust the resolution > (if necessary)? This is p

Re: saving an exception

2006-10-03 Thread Gabriel G
At Tuesday 3/10/2006 02:15, Bryan wrote: >i would like to save an exception and reraise it at a later time. >def foo(): >Â Â try: >Â Â Â Â 1/0 >Â Â except Exception, e: >Â Â Â Â exception = e > >if exception: raise exception > >with the above code, i'm able to successfully raise the ex

  1   2   >