Re: Having trouble deleting objects from a list...

2005-10-19 Thread Jason Stitt
ewObjList I don't know how the performance of the two would compare. The second involves creating a new list, but Python is supposed to optimize the heck out of list comprehension, and removing items from a list in place isn't free, either. Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs Ruby

2005-10-19 Thread Jason Stitt
g, you're right! Lua's got Ruby beat two-fold! And lack of vowels is definitive proof that PHP is not-so-good, right? How can we improve Python's competitiveness in this arena? "Pie"? Or can we do even better than Lua? Ptooey! - Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlstring -- a library to build a SELECT statement

2005-10-19 Thread Jason Stitt
er than **, it works, because the << operator would make a 'join' object and then the ** could be interpreted as an 'on' clause. But if ** binds tighter you get an extra 'where' clause on the address table, and then a join... Some functions might be more workable. - Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I call a subclass method from parent class ?

2005-10-20 Thread Jason Lai
If you use a newstyle class, e.g. class A(object), then you can get the superclass with cls.__base__. You could also use super(cls,cls), although note that it returns a object that isn't exactly the same thing as a class -- but good enough for just accessing attributes. Make sure to check that yo

Re: sqlstring -- a library to build a SELECT statement

2005-10-20 Thread Jason Stitt
On Oct 20, 2005, at 2:19 AM, Steve Holden wrote: > Jason Stitt wrote: >> Using // for 'in' looks really weird, too. It's too bad you can't >> overload Python's 'in' operator. (Can you? It seems to be hard-coded >> to iterate through an i

Re: sqlstring -- a library to build a SELECT statement

2005-10-20 Thread Jason Stitt
On Oct 19, 2005, at 11:55 PM, [EMAIL PROTECTED] wrote: > > Jason Stitt wrote: > >> >> Using // for 'in' looks really weird, too. It's too bad you can't >> overload Python's 'in' operator. (Can you? It seems to be hard-coded >>

Re: C replacement for Queue module

2005-10-21 Thread Jason Lai
How about Python 2.4's collections.deque class? Supposedly it's thread-safe, and it's implemented in C. - Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: C replacement for Queue module

2005-10-22 Thread Jason Lai
As far as Queues go, the adding/popping is apparently done with deque which are implemented in C. The Queue class pretty much just provides blocking operations and is otherwise a very thin layer around deque. As far as primitives go, only threading.Lock is written in C and the others are pure Pytho

Re: tkinter and cygwin

2005-11-21 Thread Jason Tishler
ram from an x-win terminal , a normal XP window is > opened up. For better or worse, Cygwin's tcltk package is essentially a Win32 build. So, the behavior you are observing is expected although not necessarily desired. Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key

PIL and ReportsLab error

2005-01-05 Thread Jason Koch
s not available" % decoder_name) IOError: decoder group4 not available Thanks, -- Jason Koch NovaSys Health [EMAIL PROTECTED] Work: 501-219- ext. 608 Work: 1-800-294-3557 ext. 608 Mobile: 501-977-6701 This email and any attachments to it are privileged and confidential and are intended s

Re: Cygwin Popen object

2005-01-17 Thread Jason Tishler
ne 914, in > _execute_child > self.pid = os.fork() > OSError: [Errno 11] Resource temporarily unavailable Try rebasing your Cygwin installation. See the README: /usr/share/doc/Cygwin/python-2.4.README for more information. Does it solve your problem? Jason -- PGP/GPG Key: http://w

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-02-01 Thread Jason Tishler
he libtcl8.4.a and libtk8.4.a libraries for use. But I don't think > that Python is looking for this. If you've built Python with Tcl/Tck, > is it possible for you to send me instructions on how you did it? See the Cygwin Python README: http://www.tishler.net/jason/software/python/pyt

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-02-02 Thread Jason Tishler
ned 1 exit status Hence, you were unsuccessful building _tkinter. This is why the import above fails. > [snip] > > What else am I missing to do? Using the pre-built Python and Tcl/Tk packages that are part of the standard Cygwin distribution instead of attempting to build your own. Ja

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-02-02 Thread Jason Tishler
be good to go. > thanks again for all your help... You are welcome. Maybe three times is a charm? :,( Why don't you use the pre-built Python that is part of the standard Cygwin distribution? Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6 -- http://mail.python.org/mailman/listinfo/python-list

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-02-02 Thread Jason Tishler
hink this is why idle fails. So I did the above: > > [Dean [EMAIL PROTECTED] ...ASD_work/bin]$ rebaseall > ReBaseImage (/usr/bin/cygexpat-0.dll) failed with last error = 6 > > What am I doing wrong here? It appears you did not follow step b above. Did you shutdown *all* Cygwin p

Re: Changing size of Win2k/XP console?

2005-07-14 Thread Jason Drew
SetConsoleWindowInfo looks like a better candidate. See http://tinyurl.com/budzk (I.e. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/setconsolewindowinfo.asp) Haven't tried it though. Good luck! -- http://mail.python.org/mailman/listinfo/python-list

Re: IDLE in Jython

2005-07-15 Thread Jason Mobarak
Casey Hawthorne wrote: > How about the following: > > - making Jython mostly work up to Python 2.4? http://www.python.org/psf/grants (see the first grant) There's already a grant in place for this. So hopefully someone associated with Jython is working on it. > - making a PVM (Python Virtual

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-18 Thread Jason Tishler
Dean, On Tue, Feb 08, 2005 at 12:55:15PM -0500, Jason Tishler wrote: > On Tue, Feb 08, 2005 at 08:01:11AM -0800, Dean N. Williams wrote: > > $ rebaseall > > /usr/bin/rebaseall: line 70: [: too many arguments > > /usr/bin/rebaseall: line 75: [: too many arguments > >

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-19 Thread Jason Tishler
Dean, On Mon, Jul 18, 2005 at 05:59:20AM -0700, Dean N. Williams wrote: > Thanks for fixing this problem. You are quite welcome. Thanks for your patience. Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC E

Re: tuple to string?

2005-07-22 Thread Jason Drew
''.join((chr(e) for e in (0x73, 0x70, 0x61, 0x6D))) -- http://mail.python.org/mailman/listinfo/python-list

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-22 Thread Jason Tishler
_socket". What do I need to install from Cygwin in > order for this to work? AFAICT, nothing. The above seems to indicate your Python installation is broken. Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers Fingerprint: 7A73 1405 7F2B E669 C19

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-22 Thread Jason Tishler
t know what "ash" was. Any help on this is appreciated. If Cygwin's bin is not in your Windows PATH, then give the full path to ash. For example: C:\Cygwin\bin\ash.exe Then start rebaseall is follows: $ PATH=/bin rebaseall Jason -- PGP/GPG Key: http://www.tishler.net/

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-25 Thread Jason Tishler
has something to do > >>with the _ssl extension. > > > >Is the above from building Python or CDAT? > > > The above is building Python. Why are you trying to build Cygwin Python? Why can't you use the pre-built version? Jason -- PGP/GPG Key: http://www

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-25 Thread Jason Tishler
> '/bin/rebaseall' from ash." Did you read the error message? In particular, the following: Exit all Cygwin processes and stop all Cygwin services. Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-25 Thread Jason Tishler
why INET_ADDRSTRLEN is not defined under Cygwin and submit a patch to Cygwin or Python as appropriate. Thanks for bringing this problem to my attention. Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-27 Thread Jason Tishler
have a workaround. Unfortunately, you will have to live with your workaround until Cygwin 1.5.19 is released. :,( Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6 -- http://mail.python.org/mailman/listinfo/python-list

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-27 Thread Jason Tishler
et this error. Did you forgot to install one of the libdb${version}-devel packages: $ cygcheck -cd | grep 'libdb.*-devel' libdb2-devel2.7.7-4 libdb3.1-devel 3.1.17-2 libdb4.1-devel 4.1.25-1 libdb4.2-devel 4.2.52-1 Jason -- PGP/GP

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-28 Thread Jason Tishler
for everything > (that is, all packages show "install") shouldn't this include the > above? It should, but I wasn't looking over your shoulder when you ran Cygwin's setup.exe. :,) Anyway, please run the following and post the results to the list: $ cygcheck -cd |

Re: retrieve data from 2 database

2005-07-28 Thread Jason Drew
For a start, asking a better question will get better answers: http://www.catb.org/~esr/faqs/smart-questions.html Googling for python odbc gives this as the first result: http://www.python.org/windows/win32/odbc.html In general, how you compare database tables will depend a lot on the nature of t

Re: Hiding

2005-07-29 Thread Jason Drew
Well, using the open function in Python doesn't launch any application associated with the file (such as Media Player). It just makes the contents of the file accessible to your Python code. Also, I think using file("C:\file.txt") is now preferred to open("C:\file.txt"). To answer the specific que

Re: Hiding

2005-08-01 Thread Jason Drew
Ah, good point, thanks. Must stop forgetting that "C:\file.txt" is bad. The whole open()/file() clairification is useful too. The Python docs for the file() constructor simply state that, "File objects ... can be created with the built-in constructor file() described in section 2.1, 'Built-in Func

Re: Documentation

2005-08-10 Thread Jason Drew
The standard pydoc module is very useful. A simple example of how you could use it: >>> import pydoc >>> mymodule = pydoc.importfile(r"C:\My Py\my_foo.py") >>> html = pydoc.html.page(pydoc.describe(mymodule), >>> pydoc.html.document(mymodule)) >>> open("foo.html", "w").write(html) Then you have

Re: What is Python?!

2005-08-10 Thread Jason Drew
at Python bytecode is much the same _idea_ as Java bytecode. Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: How to quit a Windows GUI program gracefully with Python under Cygwin?

2005-08-12 Thread Jason Tishler
ou installed the SendKeys binary, then it will not work with Cygwin Python since it is a Windows Python shared extension module. It may be possible to port SendKeys to Cygwin. Unfortunately, this may not solve your problem... :,( Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or ke

Re: Sorta noob question - file vs. open?

2005-08-23 Thread Jason Drew
e-or-open discussion, but there you go). Hope this helps, Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: Socket Support When Compiling Python 2.3.5 On Cygwin

2005-08-26 Thread Jason Tishler
e list. Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6 -- http://mail.python.org/mailman/listinfo/python-list

Re: Cygwin font problems

2005-08-28 Thread Jason Tishler
Steve, On Sat, Aug 27, 2005 at 11:43:23PM -0400, Steve Holden wrote: > Cygwin runs Python 2.4.1, Windows runs 2.4. Any light on this mystery > gratefully received. You may get better traction on the Cygwin mailing list. I recommend trying there. Jason -- PGP/GPG Key: http://www.tishl

Re: Dictionary sorting problem

2005-09-16 Thread Jason Mobarak
You can't sort dictionaries (as implemented by hash tables), they are unordered data types, so by definition there's no way to force an order on them. http://en.wikipedia.org/wiki/Hash_tables -- http://mail.python.org/mailman/listinfo/python-list

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-02-08 Thread Jason Tishler
rebaseall to deal better with spaces in shell variables. Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6 -- http://mail.python.org/mailman/listinfo/python-list

ANN: Constrict 0.1.0 DNS message parsing library

2005-02-08 Thread Jason Smith
ew is quite intuitive for day-to-day queries and responses. Constrict is known to work with Python 2.3 and BIND 9 on Linux/i386 and Linux/ppc. -- Jason Smith Open Enterprise Systems Bangkok, Thailand http://www.oes.co.th -- http://mail.python.org/mailman/listinfo/python-list

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-02-10 Thread Jason Tishler
scribe to cygwin-announce@, then you will be notified when rebase and other Cygwin packages are released. Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6 -- http://mail.python.org/mailman/listinfo/python-list

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-02-28 Thread Jason Tishler
sr/X11R6/lib -lXp > -lXpm -lXaw -lXmu -lXext -lXt -lX11 /usr/lib/libm.a -lc > Info: resolving _XtStrings by linking to __imp__XtStrings (auto-import) > Info: resolving _widgetClass by linking to __imp__widgetClass (auto-import) However, I also recommend providing more informatio

Re: cygwin python.exe symlink breaks when called from .bat file

2004-12-16 Thread Jason Tishler
George, Please keep your replies on-list. On Wed, Dec 15, 2004 at 01:36:03PM -0500, george young wrote: > On Wed, 15 Dec 2004 10:56:17 -0500 > Jason Tishler <[EMAIL PROTECTED]> threw this fish to the penguins: > > On Wed, Dec 15, 2004 at 07:21:31AM -0800, gry wrote: >

better lambda support in the future?

2004-12-17 Thread Jason Zheng
I'm wondering why python still has limited lambda support. What's stopping the developers of python to support more lisp-like lambda function? -- http://mail.python.org/mailman/listinfo/python-list

Re: better lambda support in the future?

2004-12-17 Thread Jason Zheng
Steven Bethard wrote: Jason Zheng wrote: I'm wondering why python still has limited lambda support. What's stopping the developers of python to support more lisp-like lambda function? This comes up every few weeks on the list. If you haven't already, check the archive

Re: cygwin python.exe symlink breaks when called from .bat file

2004-12-15 Thread Jason Tishler
5470&atid=305470 BTW, many other Cygwin commands have this issue too: $ find /bin -type l -name '*.exe' /bin/awk.exe /bin/c++.exe /bin/captoinfo.exe /bin/cc.exe ... Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers Fingerprint: 7A7

Re: change windows system path from cygwin python?

2004-12-15 Thread Jason Tishler
u just need to send a special Windows event: http://support.microsoft.com/?kbid=104011 There are tools that will set environment variables and send the required event. For example, see the following: http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/setx-o.asp Jason -

Re: Problems compiling PIL under Cygwin

2005-04-04 Thread Jason Tishler
done to solve this? See the following: http://www.google.com/search?hl=en&lr=&q=%22cygwin+python%22+%22unable+to+remap%22+%22same+address+as+parent%22 Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6 -- http://mail.python.org/mailman/listinfo/python-list

Re: How to compile ScientificPython-2.4.9 under XP cygwin environment?

2005-04-19 Thread Jason Tishler
formation shows as fillows: > > [snip] > > Does anyone meet same problem? I was able to build ScientificPython-2.4.9 with the following configuration: netcdf 3.6.1-beta3 Numeric 24.0 Python 2.4 gcc 3.3.1 Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.

Re: How remove directories with the content in the platform independent way?

2005-04-26 Thread Jason Mobarak
There's also the shutil module, which is platform independant. http://docs.python.org/lib/module-shutil.html ...see the rmtree function -- http://mail.python.org/mailman/listinfo/python-list

Re: Lexicographical sort for numarray

2005-04-27 Thread Jason Mobarak
import numarray as na import random # example array arr = range(100) random.shuffle(arr) arr = na.array(arr) arr = na.reshape(arr, (10,10)) print arr # not rowsort'ed arr.flat.sort() # key line print arr # rowsort'ed -- http://mail.python.org/mailman/listinfo/python-list

Re: Lexicographical sort for numarray

2005-04-27 Thread Jason Mobarak
It does what the OPs example does, but with numeric types. -- http://mail.python.org/mailman/listinfo/python-list

Re: Lexicographical sort for numarray

2005-04-27 Thread Jason Mobarak
Ah, okay, I didn't remember correctly what arr.tolist did. My mistake. -- http://mail.python.org/mailman/listinfo/python-list

Re: Shutting down twisted reacotr

2005-04-27 Thread Jason Mobarak
Why do you want to do this in a thread? What's wrong with reactor.callLater? import time from twisted.internet import reactor def shutdown(): time.sleep(3) print "stopping" reactor.callFromThread(reactor.stop) reactor.callInThread(shutdown) reactor.run() -- http://mail.python.org/

Re: Trying to write CGI script with python...

2005-04-28 Thread Jason Mobarak
Probably going to need more information about how mplayer is not being accessed correctly. CGI uses the shell environment to pass web information to a program... so maybe this is messing up mplayer. You'll need to augment or wrap your partners program in order to give you more information about wh

Re: Shutting down twisted reacotr

2005-04-28 Thread Jason Mobarak
You might not need threads to get user input from the console. Jp posted this in response to a similar query on the twisted-python mailing list: http://article.gmane.org/gmane.comp.python.twisted/9019 -- http://mail.python.org/mailman/listinfo/python-list

Re: Fwd: how to find the drive in python/cygwin?

2005-04-30 Thread Jason Tishler
t been ported to Cygwin Python. Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6 -- http://mail.python.org/mailman/listinfo/python-list

Re: Fwd: how to find the drive in python/cygwin?

2005-04-30 Thread Jason Tishler
Ivan, On Sat, Apr 30, 2005 at 07:29:32AM -0600, Ivan Van Laningham wrote: > Jason Tishler wrote: > > On Tue, Apr 26, 2005 at 07:02:48PM -0600, Ivan Van Laningham wrote: > > > Use win32api to find drives: > > > > > > cut here > > >

Re: Fwd: how to find the drive in python/cygwin?

2005-04-30 Thread Jason Tishler
Ivan, On Sat, Apr 30, 2005 at 08:44:55AM -0600, Ivan Van Laningham wrote: > Jason Tishler wrote: > > I was just clarifying that the win32api module is not supported > > under Cygwin Python. > > Could you clarify? I always thought that the only thing really > differe

Re: Suggest an open-source issue tracker, with github integration and kanban boards?

2013-11-15 Thread Jason Friedman
> Can you recommend an open source project (or two) written in Python; > which covers multi project + sub project issue tracking linked across > github repositories? > Why does it need to be written in Python? -- https://mail.python.org/mailman/listinfo/python-list

Re: Python project

2013-11-30 Thread Jason Friedman
> To be perfectly honest, this is much too large a project for you. First > read some python tutorials and learn how to code in python. If you work it > every day, maybe you can kind of understand what its about in a very > superficial sense in a month. However, if you are having fun learning, t

Re: multiprocessing: child process share changes to global variable

2013-12-03 Thread Jason Friedman
> #--- temp.py - > #run at Python 2.7 command prompt > import time > import multiprocessing as mp > lst = [] > lstlst = [] > > def alist(x): > lst.append(x) > lstlst.append(lst) > print "a" > return lst > > if __name__=='__main__': > pool = mp

Re: Using Python inside Programming Without Coding Technology (PWCT) environment.

2013-12-13 Thread Jason Friedman
> > http://www.codeproject.com/Articles/693408/Using-Python-inside-Programming-Without-Coding-Tec > That page references a license file at http://www.codeproject.com/info/cpol10.aspx but _that_ page would display for me. -- https://mail.python.org/mailman/listinfo/python-list

PDFMiner install question

2013-12-17 Thread Jason Mellone
Hello, I have python up and running using the exact setup as recommended by http://learnpythonthehardway.org/ I am now trying to use pdfminer. I have python here: C:\USERS\Python27 using "import os", i am able to cwd to C:\users\python where i have C:\users\python\pdfminer-master\. when i na

Re: PDFMiner install question

2013-12-17 Thread Jason Mellone
On Tuesday, December 17, 2013 3:32:56 PM UTC-5, MRAB wrote: > On 17/12/2013 20:06, Jason Mellone wrote: > > > Hello, > > > > > > I have python up and running using the exact setup as recommended by > > http://learnpythonthehardway.org/ > >

Re: PDFMiner install question

2013-12-17 Thread Jason Mellone
On Tuesday, December 17, 2013 3:53:24 PM UTC-5, Jason Mellone wrote: > On Tuesday, December 17, 2013 3:32:56 PM UTC-5, MRAB wrote: > > > On 17/12/2013 20:06, Jason Mellone wrote: > > > > > > > Hello, > > > > > > > > > >

Re: PDFMiner install question

2013-12-19 Thread Jason Mellone
MRAB: Thank you your exact solution worked perfectly. Now I am trying to run some code from (http://www.unixuser.org/~euske/python/pdfminer/programming.html) under basic usage. If I try to run from pdfminer.pdfparser import PDFParser from pdfminer.pdfdocument import PDFDocument from pdfminer.

Re: How to check the date validity?

2013-12-23 Thread Jason Friedman
> In this file I have 3 different kind of fields: one consist of the > sole date, one - sole time and one - datetime. The time includes > milliseconds, i.e. "12:55:55.705" > All fields of the file including those 3 I am reading as the string. > All those strings after validating will go into mySQL

Re: Getting updates and restarting a long running url request.

2013-12-25 Thread Jason Friedman
> I am using the following code to submit the query/ > def get_BLAST(taxid, queryseq, args=None): > ''' > Input taxid to BLAST queryseq against > ''' > e_query = "txid" + taxid + " [ORGN]" > #, other_advanced='-G 4 -E 1' > blast_result = NCBIWWW.qblast("blastn", "nt", querys

Re: Getting updates and restarting a long running url request.

2013-12-26 Thread Jason Friedman
> Would this not keep requesting/submitting additional (duplicate) BLAST > queries? >> >> try: >> this_result = get_BLAST(id) >> result_dict[id] = True > I assumed that NCBIWWW.qblast waits for a response from the server. Are you saying that instead it queues a request, a

Re: Tkinter problem: TclError> couldn't connect to display ":0

2013-12-29 Thread Jason Swails
On Sun, Dec 29, 2013 at 10:29 PM, Steven D'Aprano wrote: > On Mon, 30 Dec 2013 10:30:11 +1100, Chris Angelico wrote: > > > On Mon, Dec 30, 2013 at 10:22 AM, Steven D'Aprano > > wrote: > >> So you need to X-forward from the remote machine to the machine you are > >> physically on, or perhaps it's

Re: lookup xpath (other?) to value in html

2013-12-31 Thread Jason Friedman
> I have a about 255 data fields that I am trying to verify on thousands of > webpages. > For example: > value: 255,000 > sqft: 1800 > > Since I have the correct answer for several pages I would like to lookup get > the location (xpath?) of the data/field value in the page so that I can > chec

Re: lookup xpath (other?) to value in html

2013-12-31 Thread Jason Friedman
> For example this URL; > http://jeffco.us/ats/displaygeneral.do?sch=001690 > The the land sqft is 11082. > Google Chrome gives me the xpath to that data as; > //*[@id="content"]/p[1]/table[4]/tbody/tr[2]/td[8] > > What I would like to do (using python) is given 11082 at what xpath can that > be fo

Flip a graph

2014-01-04 Thread Jason Friedman
I am teaching Python to a class of six-graders as part of an after-school enrichment. These are average students. We wrote a non-GUI "rocket lander" program: you have a rocket some distance above the ground, a limited amount of fuel and a limited burn rate, and the goal is to have the rocket tou

Re: Process datafeed in one MySql table and output to another MySql table

2014-01-16 Thread Jason Friedman
> > I have a datafeed which is constantly sent to a MySql table. The table > grows constantly as the data feeds in. I would like to write a python > script which process the data in this table and output the processed data > to another table in another MySql database in real-time. > > Which are the

Re: Unwanted Spaces and Iterative Loop

2014-01-26 Thread Jason Friedman
> > > outHandler.write("FarmID\tAddress\tStreetNum\tStreetName\tSufType\tDir\tCity\tProvince\tPostalCode") > > ... > FarmID Address > 1 1067 Niagara Stone Rd, Niagara-On-The-Lake, ON L0S 1J0 > 2 4260 Mountainview Rd, Lincoln, ON L0R 1B2 > 3 25 Hunter Rd, Grimsby, ON L3M 4A3 > 4

Re: Unwanted Spaces and Iterative Loop

2014-01-26 Thread Jason Friedman
> > I`m not reading and writing to the same file, I just changed the actual > paths to directory. > > This is for a school assignment, and we haven`t been taught any of the > stuff you`re talking about. Although I appreciate your help, everything > needs to stay as is and I just need to create the

Google API and Python 2

2014-02-09 Thread Jason Friedman
I started Python programming in the last few years and so I started with version 3 and 99% of my code is in version 3. Much of Google API Python code seems to be Python 2. I can convert the occasional file to version 3 with 2to3, but for an entire 3rd-party library, could it be as simple as using

Re: reading from a txt file

2015-11-26 Thread Jason Friedman
> > Hey, I'm wondering how to read individual strings in a text file. I can > read a text file by lines with .readlines() , > but I need to read specifically by strings, not including spaces. Thanks > in advance > How about: for a_string in open("/path/to/file").read().split(): print(a_stri

Re: Exclude text within quotation marks and words beginning with a capital letter

2015-12-04 Thread Jason Friedman
> > I am working on a program that is written in Python 2.7 to be compatible > with the POS tagger that I import from Pattern. The tagger identifies all > the nouns in a text. I need to exclude from the tagger any text that is > within quotation marks, and also any word that begins with an upper ca

Re: Python and multiple user access via super cool fancy website

2015-12-24 Thread Jason Friedman
> I am not sure if this is the correct venue for my question, but I'd like to > submit my question just in case. I am not a programmer but I do have an > incredible interest in it, so please excuse my lack of understanding if my > question isn't very thorough. > > As an example, a website backend

Re: Python and multiple user access via super cool fancy website

2015-12-25 Thread Jason Friedman
>> I have a hunch that you do not want to write the program, nor do you >> want to see exactly how a programmer would write it? >> >> The question is more like asking a heart surgeon how she performs >> heart surgery: you don't plan to do it yourself, but you want a >> general idea of how it is do

Re: What use of these _ prefix members?

2016-01-12 Thread Jason Swails
to implement directly is _process_arg1. This reduces code duplication and improves maintainability, and is a pattern I've used myself and like enough to use again (not necessarily in __init__, but outside of being automatically called during construction I don't see anything else inherently "specialer" about __init__ than any other method). All the best, Jason -- https://mail.python.org/mailman/listinfo/python-list

Re: Why generators take long time?

2016-01-19 Thread Jason Swails
adness to have code actually relying on this behavior :). At the end of the day, I use list comprehensions in the following circumstances: - I *know* I won't blow memory with a too-large list - I want to iterate over the object multiple times or I want/may want non-sequential access - I know

Re: Why generators take long time?

2016-01-19 Thread Jason Swails
On Tue, Jan 19, 2016 at 3:19 PM, Jason Swails wrote: > > I use generator expressions when > > - I *might* want to > ​I forgot to finish my thought here. I use generator expressions when I don't want to worry about memory, there's a decent chance of short-circuiting​,

Re: ts.plot() pandas: No plot!

2016-02-01 Thread Jason Swails
; to have all plots sent directly to the ipython console you are typing commands in. I've found that kind of workflow quite convenient for directly interacting with data. HTH, Jason -- https://mail.python.org/mailman/listinfo/python-list

Re: [STORY-TIME] THE BDFL AND HIS PYTHON PETTING ZOO

2016-02-08 Thread Jason Swails
On Sun, Feb 7, 2016 at 2:58 AM, Chris Angelico wrote: > > Would writing a script to figure out whether there are more > statisticians or programmers be a statistician's job or a > programmer's? > ​Yes. -- https://mail.python.org/mailman/listinfo/python-list

Re: [Off-topic] Requests author discusses MentalHealthError exception

2016-02-27 Thread Jason Friedman
Yes, thank you for sharing. Stories from people we know, or know of, leads to normalization: mental illness is a routine illness like Type I diabetes or appendicitis. On Sat, Feb 27, 2016 at 2:37 AM, Steven D'Aprano wrote: > The author of Requests, Kenneth Reitz, discusses his recent recovery fr

Re: Computational Chemistry Analysis

2016-02-28 Thread Jason Swails
aces to start. FWIW, I did all my work with the AMBER and OpenMM software suites, (and wrote a substantial amount of code for both projects). But those are far from the only options out there. HTH, Jason -- Jason M. Swails BioMaPS, Rutgers University Postdoctoral Researcher -- https://mail.python.org/mailman/listinfo/python-list

Re: Python extension using a C library with one 'hello' function

2014-11-04 Thread Jason Swails
he double quotes). Also, NULL is no longer acceptable as a METH_XXXARGS replacement, you need to set it to METH_NOARGS (or MET_VARARGS if you plan on accepting arguments). I've found that you also need a NULL sentinel in the hellomethods array to avoid segfaults on my Linux box. After fi

Re: Python extension using a C library with one 'hello' function

2014-11-04 Thread Jason Swails
On Tue, 2014-11-04 at 21:45 +0630, Veek M wrote: > Jason Swails wrote: > > > I've submitted a PR to your github repo showing you the changes > > necessary to get your module working on my computer. > > Segfaults :p which is an improvement :) What operating system

Re: Python extension using a C library with one 'hello' function

2014-11-04 Thread Jason Swails
too Linux). It also works on Python 3.1 and 3.0 (but obviously doesn't work for Python 2.X). I can't tell why you're having so many problems...​ Try doing a "git clean -fxd" to make sure you don't have leftover files lying around somewhere that are causing grief. Als

Re: Python extension using a C library with one 'hello' function

2014-11-04 Thread Jason Swails
On Tue, 2014-11-04 at 23:03 +0630, Veek M wrote: > okay got it working - thanks Jason! The 3.2 docs are slightly different. What did you need to do to get it working? -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Script to convert firewall rules

2014-12-11 Thread Jason Friedman
> I am network engineer and not expert in programming. I would like to make > one python script to convert juniper netscreen firewall configuration into > juniper SRX firewall configuration. > Looks pretty tricky, do you have a specification for each format containing all the possible keywords/val

Re: Python Script to convert firewall rules

2014-12-12 Thread Jason Friedman
> > > Thanks for the reply. Yes I can make the all possible keywords/values for > both formate. But after that what gonna be the logic to convert one format > to other format. Like to convert one line below are the keywords: > > set interface ethernet2/5 ip 10.17.10.1/24 (format 1) > set interfaces

Re: Python Script to convert firewall rules

2014-12-13 Thread Jason Friedman
> Thanks for the reply. I am learning python using CBT nuggets for python. But > If you can refer me some good course, that should be practical then it would > be great. > > For my requirement, if you can give me the best approach to start with or > high level steps or give me some sample cod, I

Re: Python Script to convert firewall rules

2014-12-14 Thread Jason Friedman
> Thank you very much. Appreciated ! But the first requirement was to convert > format1 to format2 as below: > > set interface ethernet2/5 ip 10.17.10.1/24 (format 1) > set interfaces ge-0/0/0 unit 0 family inet address 10.17.10.1/24 (format 2) > (set, interface, ip) = (set, interfaces, family inet

Neat little programming puzzle

2014-12-15 Thread Jason Swails
he challenge is to write a program to compute the sum of https://gist.github.com/swails/17ef52f3084df708816d. I liked this problem because naive solutions scale as O(2^N), begging for a more efficient approach. Have fun, Jason -- https://mail.python.org/mailman/listinfo/python-list

Logger not logging

2015-01-01 Thread Jason Friedman
What am I missing? I expect logger.info("hello") to emit. $ python Python 3.4.0 (default, Apr 18 2014, 19:16:28) [GCC 4.8.1] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import logging >>> logger = logging.getLogger() >>> logger.setLevel(logging.INFO) >>> lo

Re: Logger not logging

2015-01-01 Thread Jason Friedman
>> Python 3.4.0 (default, Apr 18 2014, 19:16:28) >> [GCC 4.8.1] on linux >> Type "help", "copyright", "credits" or "license" for more information. > import logging > logger = logging.getLogger() > logger.setLevel(logging.INFO) > logger.info("hello") > logger.warn("hello") >> hel

<    1   2   3   4   5   6   7   8   9   10   >