ffff.py :  » Business-Application » ThanCad » thancad-0.0.9 » p_gfil » Python Open Source

Home
Python Open Source
1.3.1.2 Python
2.Ajax
3.Aspect Oriented
4.Blog
5.Build
6.Business Application
7.Chart Report
8.Content Management Systems
9.Cryptographic
10.Database
11.Development
12.Editor
13.Email
14.ERP
15.Game 2D 3D
16.GIS
17.GUI
18.IDE
19.Installer
20.IRC
21.Issue Tracker
22.Language Interface
23.Log
24.Math
25.Media Sound Audio
26.Mobile
27.Network
28.Parser
29.PDF
30.Project Management
31.RSS
32.Search
33.Security
34.Template Engines
35.Test
36.UML
37.USB Serial
38.Web Frameworks
39.Web Server
40.Web Services
41.Web Unit
42.Wiki
43.Windows
44.XML
Python Open Source » Business Application » ThanCad 
ThanCad » thancad 0.0.9 » p_gfil » ffff.py
# -*- coding: iso-8859-7 -*-


from math import pi

#c      program x
#c      implicit none
#c      character*35 dline
#c
#c      call hhhh
#c100   continue
#c          read 10, dline
#c10        format (a)
#c          if (dline .eq. ' ') go to 200
#c
#c          DLINE = '  A.  S T A M O S  S. A.'
#c          dline = '\\31samba\runprogs\tif\var\sat.tif'
#c          call ffff (dline)
#c          print 20, dline
#c20        format (1x, a)
#c
#c          dline = 'x:\tif\var\sat.tif'
#c          call ffff (dline)
#c          print 20, dline
#c
#c          dline = 'XYZZYXYZZY'
#c          call ffff (dline)
#c          print 20, dline
#c
#c          dline = 'A. STAMOS Library not found'
#c          call ffff (dline)
#c          print 20, dline
#c      go to 100
#c
#c200   continue
#c          read 10, dline
#c          if (dline .eq. ' ') go to 100
#c          dline = '!E/%)U&Y!E!R)Q&X!$T3)C4%'
#c          call gggg (dline)
#c          print 10, dline
#c      go to 200
#c      end

#============================================================================

def fff():
      f = '!$3)"%$%"%$!7"3'
      return gggg(f)

#============================================================================


#      subroutine ffff (dl)
#      implicit none
#      character*(*) dl
#      real*8 PI
#      parameter (PI=3.14159265358979323d0)
#      integer*4 i, j, k(8)
#      real*8 a
#
#      a = PI - dint(PI)
#      do i=1, 8
#          a = a * 10.0d0
#          k(i) = idint(a)
#          a = a - dint(a)
#      end do
#
#      do i=1, len(dl)
#          j = ichar(dl(i:i))
#          j = j + k(mod(i-1, 8)+1)
#          dl(i:i) = char(j)
#      end do
#      return
#      end
#
#c============================================================================
#
def gggg(dl):
      a = pi - int(pi)
      k = []
      for i in xrange(8):
          a *= 10.0
          k.append(int(a))
          a = a - int(a)

      dl1 = []
      for i,c in enumerate(dl):
          j = ord(c)
          j = j - k[i % 8]
          dl1.append(chr(j))
      return "".join(dl1)

#c============================================================================
#
#      subroutine hhhh
#      include 'fildat.inc'
#      integer*4 ierr
#      character*10 dline
#      character*35 f
#
#c-----try to open file
#
#c      f = '\\51thanasis\d\tif\var\sat.tif'
#      f = ']`46|csgb`szwrxthw]yrhb{bv]xjv4yjj!' ! \\31samba\runprogs\tif\var\sat.tif
#      call gggg (f)
#      open (uArx, file=f, iostat=ierr)
#      if (ierr .ne. 0) then
#          f = ']`itvgxasyou{qmx]xjkexgw]wby7vok!$!' ! \\homer\runprogs\tif\var\sat.tif
#          call gggg (f)
#          open (uArx, file=f, iostat=ierr)
#          if (ierr .ne. 0) go to 200
#      end if
#
#c-----Try to validate
#
#      read (uArx, 20, iostat=ierr) dline
#20    format (a)
#      if (ierr .ne. 0) go to 100
#      call gggg (dline)
#      if (dline .ne. 'XYZZYXYZZY') go to 100    ! Magic word
#      close (uArx)
#      return
#
#c-----Validation failed
#
#100   continue
#      close (uArx)
#200   continue
#      f = 'B2!X]CSTT$Mnktgwz$ot}"ltvre%)"&%!$!' ! A. STAMOS Library not found
#      call gggg (f)
#      print 10, f
#10    format (1x, a)
#      stop
#      end
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.