id int64 0 25.6k | text stringlengths 0 4.59k |
|---|---|
5,800 | form and opened by filename in browsers when their links are clickedrelying again on browsers to do the right thing text attachments for sends are also subject to the cgi upload limitations described in the note just ahead beyond all thispython appears to have an issue printing some types of unicode text to the standar... |
5,801 | structureand should probably not be necessitated by regression in python in any event rewrite (pymailria?will have to await final verdict on python cgi support fixes new in the prior edition (version in the third editionpymailcgi was upgraded to use the new mailtools module package of employ the pycrypto package for pa... |
5,802 | in your inbox (and as confessed in have thousands in one of minea better solution would somehow cache mails to limit reloadsat least for the duration of browser session for examplewe might load headers of only newly arrived messagesand cache headers of mails already fetchedas done in the pymailgui client of due to the ... |
5,803 | you have the overall design in mind running this examples the html pages and cgi scripts of pymailcgi can be installed on any web server to which you have access to keep things simple for this bookthoughwe're going to use the same policy as in --we'll be running the python-coded webserver py script from example - local... |
5,804 | if you do install this example' code on different serversimply replace the "localhost /cgi-binpart of the urls we'll use here with your server' nameportand path details in practicea system such as pymailcgi would be much more useful if it were installed on remote serverto allow mail processing from any web client as wi... |
5,805 | let' start off by implementing main page for this example the file shown in example - is primarily used to publish links to the send and view functionspages it is coded as static html filebecause there is nothing to generate on the fly here example - pp \internet\web\pymailcgi\pymailcgi html pymailcgi main page pymailc... |
5,806 | email attachments for single userand avoids some of the prior version' exhaustive mail downloads it only fetches message headers for the list pageand only downloads the full text of the single message selected for viewing new in version pymailcgi now runs on python (only)and employs many of the new features of the mail... |
5,807 | accounts without either typing an explicit and unsafe url or doing bit of installation and configuration this is on purposeand it has to do with security constraintsas we'll see laterpymailcgi is written such that it never associates your email username and password together without encryption this isn' an issue if you... |
5,808 | function is the simplestlet' start with its pages and scripts first the message composition page the root page send function steps users through two other pagesone to edit message and one to confirm delivery when you click on the send link on the main page in figure - the python cgi script in example - runs on the web ... |
5,809 | example - pp \internet\web\pymailcgi\cgi-bin\oneditpagesend py #!/usr/bin/python ""###############################################################################on submit in edit windowfinish writereplyor forwardin +we reuse the send tools in mailtools to construct and send the messageinstead of older manual string sc... |
5,810 | def saveattachments(formmaxattach= savedir=savedir)""save uploaded attachment files in local files on server from which mailtools will add to mailthe fieldstorage parser and other parts of cgi module can fail for many upload typesso we don' try very hard to handle unicode encodings here""partnames [for in range( maxatt... |
5,811 | trytext encode(bodyencodingexcept (unicodeerrorlookuperror)bodyencoding 'utf- try ascii first (or latin- ?else use tuf as fallback (or config?tbdthis is more limited than pymailgui use utf for all attachmentswe can' ask here attachencodings ['utf- 'len(attachesignored for non-text parts encode and send sender mailtools... |
5,812 | notice that there are no usernames or passwords to be found hereas we saw in smtp usually requires only server that listens on the smtp portnot user account or password as we also saw in that smtp send operations that fail either raise python exception ( if the server host can' be reachedor return dictionary of failed ... |
5,813 | most importantif we ever change the header and footer format functions in the commonhtml moduleall our page' headers and footers will automatically be updated if you are interested in seeing how this encapsulated logic works right nowflip ahead to example - we'll explore its code after we study the rest of the mail sit... |
5,814 | url string is lot to type into browser' address fieldof coursebut it might be useful if generated automatically by another script as we saw in and the module urllib request can then be used to submit such url string to the server from within python program example - shows one way to automate this example - pp \internet... |
5,815 | the html reply printed by this script would normally be rendered into new web page if caught by browser such cryptic output might be less than idealbut you could easily search the reply string for its components to determine the result ( using the string find method or an in membership test to look for "successful")par... |
5,816 | if you flip back to the main page in figure - you'll see view linkpressing it triggers the script in example - to run on the server example - pp \internet\web\pymailcgi\cgi-bin\onrootviewlink py #!/usr/bin/python ""###############################################################################on view link click on main... |
5,817 | embedded in html code instead and run to produce valuessince this is scriptwe can also use the commonhtml page header and footer routines to render the generated reply page with common look-and-feelas shown in figure - figure - pymailcgi view password login page at this pagethe user is expected to enter the password fo... |
5,818 | import cgi import loadmailcommonhtml from externs import mailtools from secret import encode maxhdr user-defined encoder module max length of email hdrs in list only pswd comes from page hererest usually in module formdata cgi fieldstorage(mailusermailpswdmailsite commonhtml getstandardpopfields(formdataparser mailtool... |
5,819 | generates html to display passed-in list of tuples (texturlparameterdictionaryas list of hyperlinks in the reply pageparameter values show up as query parameters at the end of urls in the response the maillist list built here is used to create the body of the next page-- clickable email message selection list each gene... |
5,820 | figure - shows one that gives the python exception and details as part of the reply after python-raised exception is caughtas usualthe exception details are fetched from sys exc_infoand python' traceback module is used to generate stack trace passing state information in url link parameters the central mechanism at wor... |
5,821 | limitationshere is what one of those link lines looks likereformatted with line breaks and spaces to make it easier to understand< href="onviewlistlink pypswd=wtgmpsjeb mnum= user=pp % learning-python comsite=pop secureserver net">view among our weapons are these cardinal@hotmail com fri may : pymailcgi generates relat... |
5,822 | urllib parse quote_plus("there' bugger all down here on earth"'there% +bugger+all+down+here+on+earththe module commonhtmlthoughcalls the higher-level urllib parse urlencode functionwhich translates dictionary of name:value pairs into complete url query parameter stringready to add after marker in url for instancehere i... |
5,823 | in contrastpymailcgi runs on the web server machine and simply displays mail text on the client' browser--mail is downloaded from the pop server machine to the web serverwhere cgi scripts are run due to the autonomous nature of cgi scriptspymailcgi by itself has no automatic memory that spans pages and may need to relo... |
5,824 | net in transit here' how it works when this script is invoked by the password input page' formit gets only one input parameterthe password typed into the form the username is imported from mailconfig module installed on the serverit is not transmitted together with the unencrypted password because such combination coul... |
5,825 | listand they remain encoded in urls and hidden form fields thereafter but you shouldn' use url like thisunless you don' care about exposing your email password sending your unencrypted mail user id and password strings across the net in url such as this is unsafe and open to interception in factit' like giving away you... |
5,826 | ""save fetched email' parts to files on server to be viewed in user' web browser ""import os if not os path exists(savedir)in cgi script' cwd on server os mkdir(savedirwill open per your browser for filename in os listdir(savedir)clean up last messagetempdirpath os path join(savedirfilenameos remove(dirpathtypesandname... |
5,827 | message is fetched they are also currently stored in single directory and so apply to only single user if the message can be loaded and parsed successfullythe result pageshown in figure - allows us to viewbut not editthe mail' text the function commonhtml view page generates "read-onlyhtml option for all the text widge... |
5,828 | the file type for instanceclicking on the txtfile will likely open it in either the browser or text editor in other mailsclicking on jpgfiles may open an image viewerpdfmay open adobe readerand so on figure - shows the result of clicking the pyattachment part of figure - ' message in chrome passing state information in... |
5,829 | figure - shows part of the source code generated for another message' view pagethe hidden input fields used to pass selected mail state information are embedded near the top the net effect is that hidden input fields in htmljust like parameters at the end of generated urlsact like temporary storage areas and retain sta... |
5,830 | notice that everything you see on the message view page' html in figure - is escaped with cgi escape header fields and the text of the mail itself might contain characters that are special to html and must be translated as usual for instancebecause some mailers allow you to send messages in html formatit' possible that... |
5,831 | original message beyond the normal textthe password gets special html escapes treatment as well though not shown in our examplesthe hidden password field of the generated html screenshot (figure - can look downright bizarre when encryption is applied it turns out that the pop password is still encrypted when placed in ... |
5,832 | need to care about things such as passing state in urls or hidden fields (it saves state in python in-process variables and memory)and there' no notion of escaping html and url strings (there are no browsersand no network transmission steps once mail is downloadedit also doesn' have to rely on temporary server file lin... |
5,833 | userpswdsite commonhtml getstandardpopfields(formpswd secret decode(pswdtryif form['action'value ='reply'headers {'from'mailconfig myaddress commonhtml decodes 'to'getfield(form'from')'cc'mailconfig myaddress'subject''regetfield(form'subject')commonhtml editpage('reply'headersquotetext(form)elif form['action'value ='fo... |
5,834 | same confirmation page we got earlier when writing new mail from scratch (figure - forward operations are virtually the sameexcept for few email header differences all of this busy-ness comes "for free,because reply and forward pages are generated by calling commonhtml editpagethe same utility used to create new mail c... |
5,835 | silent call that prevents print call statements in the utility from showing up in the html reply stream (they are just status messagesnot html codein this versionwe get the same capability from the "silentclasses in mailtools figure - shows delete operation in action figure - pymailcgi view pagedelete selected by the w... |
5,836 | format an edit pagewhich ultimately sends message to the smtp serverno pop information is needed or passed but at this point in the interactionthe pop password has racked up more than few frequent flyer miles in factit may have crossed phone linessatellite linksand continents on its journey from machine to machine let'... |
5,837 | password is embedded in the view page itself as html hidden input fieldsencrypted or obfuscatedand html escaped delete message (client to cgi server to pop server)finallythe password is again passed from client to cgi serverthis time as hidden form field valuesthe cgi script decodes it and passes it to the pop server t... |
5,838 | note that you probably should click the "back to root pagelink in figure - after successful deletion--don' use your browser' back button to return to the message selection list at this point because the delete has changed the relative numbers of some messages in the list the pymailgui client program worked around this ... |
5,839 | three sections outline suggested improvements and potential exercises alternativepassing header text in hidden input fields (pymailcgi_ perhaps the simplest way to guarantee accurate deletions is to embed the displayed message' full header text in the message view page itselfas hidden form fieldsusing the following sch... |
5,840 | implemented in the following directory of the book' examples distributionpp \internet\web\dev\pymailcgi_ when developedit worked under the firefox web browser and it requires just more than lines of code changes among three source fileslisted here (search for "#experimentalto find the changes made in the source files y... |
5,841 | more details alternativeserver-side files for headers the main limitation of the prior section' technique is that it addressed only deletions of already fetched emails to catch other kinds of inbox synchronization errorswe would have to also record headers fetched when the index list page was constructed since the inde... |
5,842 | pymailcgiyou should not delete mails with it in an important accountunless you employ one of the solution schemes described or you use other tools to save mails to be deleted before deletion adding state retention to ensure general inbox synchronization may make an interesting exercisebut would also add more code than ... |
5,843 | in and expanded in but it simply loads all attributes from the version we wrote in to avoid redundancyand customizes as desiredthe local version is listed in example - example - pp \internet\email\pymailcgi\cgi-bin\mailconfig py ""user configuration settings for various email programs (pymailcgi version)email scripts g... |
5,844 | mailtools silentmailfetcher class (reused here from uses the python poplib module to fetch mail over sockets the silent class prevents mailtools print call statements from going to the html reply stream (although any exceptions are allowed to propagate there normallyin this versionloadmail loads just the header text po... |
5,845 | running server deployed for this book still does not support https in python -the ultimate solution to web securitywhich 'll say more about in moment because of all the foregoingthis fourth edition has legacy support for both rotor and pycrypto if they are installedbut falls back on simplistic password obfuscator which... |
5,846 | rotor newrotor('pymailcgi' decrypt(' \ \ py''spam can be decrypted in new process use "\asciiescapes for two chars our secret module by default simply used rotor to encrypt and did no additional encoding of its own it relies on url encoding when the password is embedded in url parameter and on html escaping when the pa... |
5,847 | algorithms aes is popular private key encryption algorithm it requires fixed length key and data string to have length that is multiple of bytes unfortunatelythis is not part of standard pythonmay be subject to (and other countries'export controls in binary form at this writingand is too large and complex topic for us ... |
5,848 | it' possible to replace the form fields and query parameter pymailcgi currently generates with client-side cookies marked as secure such cookies are automatically encrypted when sent unfortunately againmarking cookie as secure simply means that it can be transmitted only if the communications channel with the host is s... |
5,849 | ##########################################################don' do anything by defaultthe urllib parse quote or cgi escape calls in commonhtml py will escape the password as needed to embed in url or htmlthe cgi module undoes escapes automatically for us##########################################################def strin... |
5,850 | from crypto cipher import aes mykey 'pymailcgi ljust( '-'key must be or bytes def do_encode(pswd)over len(pswd if overpswd +'\ ( -overpadlen must be multiple of aesobj aes new(mykeyaes mode_ecbreturn aesobj encrypt(pswddef do_decode(pswd)aesobj aes new(mykeyaes mode_ecbpswd aesobj decrypt(pswdreturn pswd rstrip('\ 'eli... |
5,851 | return res ##############################################################################top-level entry points ##############################################################################def encode(pswd)return stringify(do_encode(pswd)encrypt plus string encode def decode(pswd)return do_decode(unstringify(pswd)in ad... |
5,852 | as ispymailcgi avoids ever passing the pop account username and password across the net together in single transactionunless the password is encrypted or obfuscated according to the module secret py on the server this module can be different everywhere pymailcgi is installedand it can be uploaded anew in the future--en... |
5,853 | the browser (dumpstatepage)and that wrap calls to functions that print status messages so that their output isn' added to the html stream (runsilenta version addition also attempts to work around the fact that built-in print calls can fail in python for some types of unicode text ( non-ascii character sets in internati... |
5,854 | print('content-typetext/html\ 'print('% % page (pp )(appkind)print('% % (colorapp(info or kind))def pagefooter(root='pymailcgi html')print('< href="print('<img src=/pythonpoweredsmall gif'print('align=left alt="[python logo]border= hspace= >'print('back to root pagerootprint(''def formatlink(cgiurlparmdict)""make "%url... |
5,855 | print('extraprint('% \ (cgi escape(textor '?')if has def viewattachmentlinks(partnames)""create hyperlinks to locally saved part/attachment files when clickeduser' web browser will handle opening assumes just one useronly valid while viewing msg ""print('parts:'for filename in partnamesbasename os path basename(filenam... |
5,856 | on sendview+select+replyview+select+fwd pageheader(kind=kindprint('<form enctype="multipart/form-datamethod=post'end='print('action="%soneditpagesend py">urlrootif mailconfig mysignaturetext '\ % \ % (mailconfig mysignaturetextmessagearea(headerstextsendattachmentwidgets(print(''print(''print(''pagefooter(def errorpage... |
5,857 | def write(selfline)pass save_stdout sys stdout sys stdout silent(tryresult func(*argsfinallysys stdout save_stdout return result send print to dummy object which has write method try to return func result but always restore stdout def dumpstatepage(exhaustive= )""for debuggingcall me at top of cgi to generate new page ... |
5,858 | conclusion pymailcgi versus pymailgui besides illustrating larger cgi applications in generalthe pymailgui and pymailcgi examples were chosen for this book on purpose to underscore some of the trade-offs you run into when building applications to run on the web pymailgui and pymailcgi do roughly the same things but are... |
5,859 | of coursethese systemsspecific functionality isn' exactly the same--pymailcgi is roughly functional subset of pymailgui--but they are close enough to capture common trade-offs on basic levelboth of these systems use the python pop and smtp modules to fetch and send email through sockets the implementation alternatives ... |
5,860 | gui api such as tkinter witnessfor exampleall the care we've taken to escape html and urls in this examplessuch constraints are grounded in the nature of html furthermorechanging the system to retain loaded-mail list state in database between pages would introduce further complexities to the cgi-based solution (andmost... |
5,861 | all you need is browser on clients on the upsidebecause pymailcgi runs over the webit can be run on any machine with web browserwhether that machine has python and tkinter installed or not that ispython needs to be installed on only one computer--the web server machine where the scripts actually live and run in factthi... |
5,862 | is akin to stepping backward in time--to the time of centralized mainframes and dumb terminals some would include the emerging cloud computing model in this analysisarguably in part throwback to older computing models whichever way we stepoffloading and distributing processing to client machines at least partially avoi... |
5,863 | and that are transferred back to the server when page is revisited (data is sent back and forth in http header linescookies are more complex than program variables and are somewhat controversial and optionalbut they can offload some simple state retention tasks alternative models such as fastcgi and mod_python offer ad... |
5,864 | languages to the mix though this can varythe net result is often something of web-hosted tower of babelwhose development might require simultaneously programming in pythonhtmlsqljavascripta server-side templating languagean object-relational mapping apiand moreand even nested and embedded combinations of these the resu... |
5,865 | concurrent updatessince any number of users out in cyberspace may be accessing the site at the same timeso pyerrata also introduces file-locking techniques along the way no longer maintain the website described by this extra and the material itself is slightly out of date in some ways for instancethe os open call is pr... |
5,866 | tools and techniques this part of the book presents collection of additional python application topics most of the tools presented along the way can be used in wide variety of application domains you'll find the following here this covers commonly used and advanced python techniques for storing information between prog... |
5,867 | databases and persistence "give me an order of persistencebut hold the picklesso far in this bookwe've used python in the system programminggui developmentand internet scripting domains--three of python' most common applicationsand representative of its use as an application programming language at large in the next fo... |
5,868 | serialized python objects saved to files and streams shelve files pickled python objects saved in dbm keyed files object-oriented databases (oodbspersistent python objects stored in persistent dictionaries (zodbdurussql relational databases (rdbmsstable-based storage that supports sql queries (sqlitemysqlpostgresqletc ... |
5,869 | flat files are handy for simple persistence tasksbut they are generally geared toward sequential processing mode although it is possible to jump around to arbitrary locations with seek callsflat files don' provide much structure to data beyond the notion of bytes and text lines dbm filesa standard tool in the python li... |
5,870 | file close(close sometimes required internallyimporting the dbm standard library module automatically loads whatever dbm interface is available in your python interpreter (attempting alternatives in fixed order)and opening the new dbm file creates one or more external files with names that start with the string 'movie(... |
5,871 | file['batman''ka-boom!del file['robin'file close(change batman slot delete the robin entry close it after changes apart from having to import the interface and open and close the dbm filepython programs don' have to know anything about dbm itself dbm modules achieve this integration by overloading the indexing operatio... |
5,872 | despite the dictionary-like interfacedbm files really do map to one or more external files for instancethe underlying default dbm interface used by python on windows writes two files--movie dir and movie dat--when dbm file called movie is madeand saves movie bak on later opens if your python has access to different und... |
5,873 | when calling dbm opento force python to create the file if it does not yet exist and to simply open it for reads and writes otherwise this used to be the default behavior but is no longer you do not need the 'cargument when opening shelves discussed ahead--they still use an "open or create'cmode by default if passed no... |
5,874 | generally precludes using pickled objects directly as cross-process shared statepickling works on almost any python datatype--numberslistsdictionariesclass instancesnested structuresand more--and so is general way to store data because pickles contain native python objectsthere is almost no database api to be foundthe ... |
5,875 | particularfile can be an instance of python class that provides the read/write methods ( the expected file-like interfacethis lets you map pickled streams to inmemory objects with classesfor arbitrary use for instancethe io bytesio class in the standard library discussed in provides an interface that maps file calls to... |
5,876 | the originalbut it is located at different address in memory this is true whether the object is unpickled in the same or future process againthe unpickled object is =but is not isc:\pp \dbasepython import pickle open('temp''wb' ['hello'('pickle''world')pickle dump(xff close( open('temp''rb' pickle load(fy ['hello'('pic... |
5,877 | from filepickle import table loaddbase('myfile'table {' '[ ]' '{' '[ ]' ' }table[' '][ savedbase('myfile'tablec:\pp \dbase>python from filepickle import print(loaddbase('myfile'){' '[ ]' '{' '[ ]' ' }reload/unpickle change shared object rewrite to the file both ' updated as expected besides built-in types like the list... |
5,878 | in later python releasesthe pickler introduced the notion of protocols--storage formats for pickled data specify the desired protocol by passing an extra parameter to the pickling calls (but not to unpickling callsthe protocol is automatically determined from the pickled data)pickle dump(objectfileprotocolor protocol= ... |
5,879 | here in the interest of space also check out marshala module that serializes an object toobut can handle only simple object types pickle is more general than marshal and is normally preferred an additional related module_pickleis -coded optimization of pickleand is automatically used by pickle internally if availableit... |
5,880 | in other wordsshelve is just go-betweenit serializes and deserializes objects so that they can be placed in string-based dbm files the net effect is that shelves let you store nearly arbitrary python objects on file by key and fetch them back later with the same key your scripts never see all of this interfacingthough ... |
5,881 | action description index file keys(index fetch the stored keys list (an iterable viewfound 'keyin file query see if there' an entry for key del file['key'delete remove the entry for key for key in fileiterate iterate over stored keys file close(close manual closenot always needed because shelves export dictionary-like ... |
5,882 | object ['the''bright'('side''of')['life']object {'name''brian''age' 'motto'object dbase['brian'object dbase['knight'{'name''knight''motto''ni!'dbase close(herewe open shelve and store two fairly complex dictionary and list data structures away permanently by simply assigning them to shelve keys because shelve uses pick... |
5,883 | programs we can also use the underlying pickle module to serialize instances to flat files and other file-like objects ( network sockets)but the higher-level shelve module also gives us convenient keyed-access storage medium for instanceconsider the simple class shown in example - which is used to model people in hypot... |
5,884 | class in this last session python is smart enough to link this object back to its original class when unpickledsuch that all the original methods are available through fetched objects changing classes of objects stored in shelves technicallypython reimports class to re-create its stored instances as they are fetched an... |
5,885 | self pay job pay real instance data def __getattr__(selfattr)if attr ='tax'return self pay elseraise attributeerror(on person attr computed on access other unknown names def info(self)return self nameself jobself payself tax this revision has new tax rate ( percent)introduces __getattr__ qualification overload methodan... |
5,886 | objects are unique only within key although the shelve module is smart enough to detect multiple occurrences of nested object and re-create only one copy when fetchedthis holds true only within given slotdbase[key[objectobjectokonly one copy stored and fetched dbase[key object dbase[key object bad?two copies of object ... |
5,887 | with shelvesthe files created by an underlying dbm system used to store your persistent objects are not necessarily compatible with all possible dbm implementations or pythons for instancea file generated by gdbm on linuxor by the bsddb library on windowsmay not be readable by python with other dbm modules installed th... |
5,888 | moved or renamedit might not be found in applications where pickled objects are shipped over network socketsit' possible to satisfy this constraint by shipping the text of the class along with stored instancesrecipients may simply store the class in local module file on the import search path prior to unpickling receiv... |
5,889 | on zodblet' move on to the next section the zodb object-oriented database zodbthe zope object databaseis full-featured and python-specific object-oriented database (oodbsystem zodb can be thought of as more powerful alternative to python' shelves of the preceding section it allows you to store nearly arbitrary python o... |
5,890 | if your program crashesyour changes are not retained unless you explicitly commit them to the database automatic updates for some types of in-memory object changes objects in zodb derived from persistence superclass are smart enough to know the database must be updated when an attribute is assigned automatic caching of... |
5,891 | operation in python once we've installed compatible zodbwe begin by first creating database\pp \dbase\zodb- xpython from zodb import filestoragedb storage filestorage filestorage( ' :\temp\mydb fs'db db(storageconnection db open(root connection root(this is mostly standard "boilerplatecode for connecting to zodb databa... |
5,892 | general database undo operations pulling persistent objects back from zodb in another session or program is just as straightforwardreopen the database as before and index the root to fetch objects back into memory like shelvesthe database root supports dictionary interfaces--it may be indexedhas dictionary methods and ... |
5,893 | know that they are persistentbecause zodb does not yet work with python xthat' as much as we can say about it in this book for more detailssearch for zodb and zope resources on the weband see the examples package resources listed earlier herelet' move on to see how python programs can make use of very different sort of... |
5,894 | sql-based database systems provide industrial-strength persistence support for enterprise-level data todaythere are freely available interfaces that let python scripts utilize all common relational database systemsboth free and commercialmysqloraclesybaseinformixinterbasepostgresql (postgres)sqliteodbcand more in addit... |
5,895 | represent an sql statement submitted as string and can be used to access and step through sql statement results query results of sql select statements are returned to scripts as python sequences of sequences ( list of tuples)representing database tables of rows within these row sequencescolumn field values are normal p... |
5,896 | rows changed (for dml changesor fetched (for dql queries)and the cursor' description attribute gives column names and types after queryexecute also returns the number of rows affected or fetched in the most vendor interfaces for dql query statementsyou must call one of the fetch methods to complete the operationtuple c... |
5,897 | such as postgresqlmysqland oracle are used almost identicallythe initial call to log in to the database will be all that normally requires different argument values for scripts that use standard sql code because of thiswe can use the sqlite system both as prototyping tool in applications development and as an easy way ... |
5,898 | usually the only thing that can vary across different database systems for examplein the mysql interface this call accepts network host' domain nameuser nameand passwordpassed as keyword arguments insteadand the oracle example sketched earlier expects more specific sting syntax once we've gotten past this platformspeci... |
5,899 | to work on other database systems parameters to substitute into the sql statement string are generally passed in as sequence ( list or tuplenotice the module' paramstyle--this tells us what style it uses for substitution targets in the statement string hereqmark means this module accepts for replacement targets other d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.